Focus border color

This commit is contained in:
Thomas Avé 2022-07-31 13:04:34 +02:00
parent fca800eb99
commit 349ff683b1
4 changed files with 20 additions and 11 deletions

View File

@ -587,6 +587,9 @@ keys.clientkeys = gears.table.join(
awful.key({modkey}, "q",
function(c)
c:kill()
for i, c in ipairs(client.get()) do
c.minimized = false
end
end,
{description = "close", group = "client"}
),

View File

@ -137,7 +137,7 @@ require("awesomewm-vim-tmux-navigator") {
experimental = true
}
local handle_single_win = function(focused)
client.connect_signal("property::maximized", function(focused)
local hide = focused.maximized or focused.fullscreen
for i, c in ipairs(client.get()) do
if not c.floating and c.screen == focused.screen then
@ -146,7 +146,12 @@ local handle_single_win = function(focused)
end
focused.minimized = false
end
--
-- client.connect_signal("property::fullscreen", handle_single_win)
client.connect_signal("property::maximized", handle_single_win)
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)

View File

@ -42,15 +42,15 @@ theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
-- Window Gap Distance
theme.useless_gap = dpi(5)
theme.useless_gap = dpi(3)
-- Show Gaps if Only One Client is Visible
theme.gap_single_client = false
-- Window Borders
theme.border_width = dpi(0)
theme.border_normal = theme.bg_normal
theme.border_focus = "#ff0000"
theme.border_width = dpi(3)
theme.border_normal = "#00000000"
theme.border_focus = "#2c3496"
theme.border_marked = theme.fg_urgent
-- Tasklist

View File

@ -114,8 +114,9 @@ local function list_update(w, buttons, label, data, objects)
else
-- truncate when title is too long
local text_only = text:match('>(.*)<')
if (text_only:len() > 25) then
text = text:gsub('>(.*)<', '>' .. utf8.char(utf8.codepoint(text_only, 1, 25)) .. '...<')
local max_length = 10
if (text_only:len() > max_length) then
text = text:gsub('>(.*)<', '>' .. utf8.char(utf8.codepoint(text_only, 1, max_length)) .. '...<')
tt:set_text(text)
tt:add_to_object(tb)
else