diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2024-09-17 19:17:49 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2024-09-17 19:17:49 -0500 |
commit | 36b45cb895303f4b8bdd99a737259740129e1fb9 (patch) | |
tree | c463be93caa340eb389a7b85ba155d2855b1e244 /awesome/signals.lua | |
parent | 3d98a08123c0c79641dd27516ef776747710ad4a (diff) | |
download | dotconfig-36b45cb895303f4b8bdd99a737259740129e1fb9.tar.xz dotconfig-36b45cb895303f4b8bdd99a737259740129e1fb9.zip |
add current awesome configs
Diffstat (limited to 'awesome/signals.lua')
-rw-r--r-- | awesome/signals.lua | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/awesome/signals.lua b/awesome/signals.lua new file mode 100644 index 0000000..f0d0149 --- /dev/null +++ b/awesome/signals.lua @@ -0,0 +1,66 @@ +local awful = require("awful") +local beautiful = require("beautiful") + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup + and not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +---- Add a titlebar if titlebars_enabled is set to true in the rules. +--client.connect_signal("request::titlebars", function(c) +-- -- buttons for the titlebar +-- local buttons = gears.table.join( +-- awful.button({ }, 1, function() +-- c:emit_signal("request::activate", "titlebar", {raise = true}) +-- awful.mouse.client.move(c) +-- end), +-- awful.button({ }, 3, function() +-- c:emit_signal("request::activate", "titlebar", {raise = true}) +-- awful.mouse.client.resize(c) +-- end) +-- ) +-- +-- awful.titlebar(c) : setup { +-- { -- Left +-- awful.titlebar.widget.iconwidget(c), +-- buttons = buttons, +-- layout = wibox.layout.fixed.horizontal +-- }, +-- { -- Middle +-- { -- Title +-- align = "center", +-- widget = awful.titlebar.widget.titlewidget(c) +-- }, +-- buttons = buttons, +-- layout = wibox.layout.flex.horizontal +-- }, +-- { -- Right +-- awful.titlebar.widget.floatingbutton (c), +-- awful.titlebar.widget.maximizedbutton(c), +-- awful.titlebar.widget.stickybutton (c), +-- awful.titlebar.widget.ontopbutton (c), +-- awful.titlebar.widget.closebutton (c), +-- layout = wibox.layout.fixed.horizontal() +-- }, +-- layout = wibox.layout.align.horizontal +-- } +--end) + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + c:emit_signal("request::activate", "mouse_enter", {raise = false}) +end) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} |