diff options
Diffstat (limited to 'func')
| -rw-r--r-- | func/noborders.lua | 6 | ||||
| -rw-r--r-- | func/sloppyfocus.lua | 3 | ||||
| -rw-r--r-- | func/tagnames.lua | 20 | ||||
| -rw-r--r-- | func/xdgautostart.lua | 5 |
4 files changed, 19 insertions, 15 deletions
diff --git a/func/noborders.lua b/func/noborders.lua index fe67024..83069af 100644 --- a/func/noborders.lua +++ b/func/noborders.lua @@ -2,14 +2,16 @@ local beautiful = require("beautiful") -- TODO this function will call arrange multiple times. once per each change of c.border_width local function update_borders(s) - local max = s.selected_tag.layout.name == "max" + if s.selected_tag == nil then return end + local max = s.selected_tag.layout.name == "max" + local floating = s.selected_tag.layout.name == "floating" local only_one = #s.tiled_clients == 1 -- use tiled_clients so that other floating windows don't affect the count -- but iterate over clients instead of tiled_clients as tiled_clients doesn't include maximized windows for _, c in pairs(s.clients) do if c.prevent_kill then c.border_width = beautiful.border_width * 3 - elseif (max or only_one or c.maximized) and not c.floating then + elseif (max or only_one or c.maximized) and not floating and not c.floating then c.border_width = 0 else c.border_width = beautiful.border_width diff --git a/func/sloppyfocus.lua b/func/sloppyfocus.lua index d044498..298059b 100644 --- a/func/sloppyfocus.lua +++ b/func/sloppyfocus.lua @@ -1,4 +1,5 @@ -- Enable sloppy focus, so that focus follows mouse. client.connect_signal("mouse::enter", function(c) - c:emit_signal("request::activate", "mouse_enter", { raise = true }) + --c:emit_signal("request::activate", "mouse_enter", { raise = true }) + c:emit_signal("request::activate", "mouse_enter") end) diff --git a/func/tagnames.lua b/func/tagnames.lua index 0274b7e..528c7b9 100644 --- a/func/tagnames.lua +++ b/func/tagnames.lua @@ -14,7 +14,7 @@ function nametag(t, name) t.name = string.format(nametag_format, t.basename, name) end -function nametagc_t(t, c) +function nametag_t(t, c) local cs = t.screen:get_all_clients(true) if c then table.insert(cs, c) @@ -31,18 +31,14 @@ function nametagc_t(t, c) nametag(t) end --- without client -function nametagc_t_u(t) - nametagc_t(t) -end - -function nametagc_c(c) +function nametag_c(c) for _, ct in ipairs(c:tags()) do - nametagc_t(ct, c) + --nametagc_t(ct, c) + nametag(ct, c.newclass or c.class) end end -tag.connect_signal("tagged", nametagc_t) -tag.connect_signal("untagged", nametagc_t_u) -client.connect_signal("raised", nametagc_c) -client.connect_signal("property::class", nametagc_c) + +tag.connect_signal("tagged", nametag_t) +tag.connect_signal("untagged", nametag_t) +client.connect_signal("focus", nametag_c) diff --git a/func/xdgautostart.lua b/func/xdgautostart.lua new file mode 100644 index 0000000..5c5b0a1 --- /dev/null +++ b/func/xdgautostart.lua @@ -0,0 +1,5 @@ +local awful = require("awful") + +if startup then + awful.spawn("dex --environment Awesome --autostart") +end |
