summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2020-04-16 11:32:43 -0700
committerMike Crute <mike@crute.us>2020-04-16 11:32:43 -0700
commit5a63595f9e4de43f6e891a7af9b36f5c028c1f9e (patch)
treeb27e78b9abf607ffe99f4e19d36014cfb12ffe54 /.config
parentc97908cca1002c078d6b2002f9f62ee9ce882b81 (diff)
downloaddotfiles-5a63595f9e4de43f6e891a7af9b36f5c028c1f9e.tar.bz2
dotfiles-5a63595f9e4de43f6e891a7af9b36f5c028c1f9e.tar.xz
dotfiles-5a63595f9e4de43f6e891a7af9b36f5c028c1f9e.zip
awesome: add titlebars to floating windows
Diffstat (limited to '.config')
-rw-r--r--.config/awesome/mcrute.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/awesome/mcrute.lua b/.config/awesome/mcrute.lua
index 7bc2f07..4bf6734 100644
--- a/.config/awesome/mcrute.lua
+++ b/.config/awesome/mcrute.lua
@@ -266,6 +266,32 @@ end
266function connect_signals() 266function connect_signals()
267 awesome.connect_signal("screen::change", configure_displays) 267 awesome.connect_signal("screen::change", configure_displays)
268 268
269 -- When title bars are added to floating windows a border should also be
270 -- set. Setting these properties in the floating callback doesn't work
271 -- because they don't get applied until after the layout arrange has
272 -- happened.
273 awful.screen.connect_for_each_screen(function(s)
274 s:connect_signal("arrange", function()
275 for _, c in pairs(awful.client.visible(s)) do
276 if awful.client.floating.get(c) then
277 c.border_width = dpi(3)
278 c.border_color = beautiful.border_focus
279 else
280 c.border_width = dpi(0)
281 end
282 end
283 end)
284 end)
285
286 -- Add title bars to floating windows
287 client.connect_signal("property::floating", function(c)
288 if c.floating then
289 awful.titlebar.show(c)
290 else
291 awful.titlebar.hide(c)
292 end
293 end)
294
269 awesome.connect_signal("startup", function() 295 awesome.connect_signal("startup", function()
270 awful.spawn.spawn("systemctl --user start desktop.target") 296 awful.spawn.spawn("systemctl --user start desktop.target")
271 configure_displays() 297 configure_displays()