summaryrefslogtreecommitdiff
path: root/lib/manage.lua
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-18 21:49:17 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-18 21:49:17 -0500
commit923eb46350b1102749eb05cd2120c96cc6a715d0 (patch)
tree811da20b4195d4b5c65c8ac0090982a4a23f6a7d /lib/manage.lua
downloadawesome-923eb46350b1102749eb05cd2120c96cc6a715d0.tar.xz
awesome-923eb46350b1102749eb05cd2120c96cc6a715d0.zip
initial commit
Diffstat (limited to 'lib/manage.lua')
-rw-r--r--lib/manage.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/manage.lua b/lib/manage.lua
new file mode 100644
index 0000000..5b1bd40
--- /dev/null
+++ b/lib/manage.lua
@@ -0,0 +1,15 @@
+local awful = require("awful")
+
+-- 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)