From 0f93bb6ad11e2f4ae246c9eeb81e1ea5549fde4c Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Tue, 16 May 2023 16:27:13 +0200 Subject: Add opacity rice --- .config/awesome/rc.lua | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 66e4eec..3aa284a 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -165,7 +165,11 @@ awful.screen.connect_for_each_screen(function(s) } -- Create the wibox - s.mytaskbar = awful.wibar({ position = "bottom", screen = s }) + s.mytaskbar = awful.wibar({ + position = "bottom", + screen = s, + bg = beautiful.bg_normal .. "cc", + }) -- Add widgets to the wibox s.mytaskbar:setup { @@ -402,20 +406,23 @@ root.keys(globalkeys) -- {{{ Rules -- Rules to apply to new clients (through the "manage" signal). awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - raise = true, - keys = clientkeys, - buttons = clientbuttons, - screen = awful.screen.preferred, - placement = awful.placement.no_overlap+awful.placement.no_offscreen - } - }, + { -- All clients will match this rule. + rule = { }, + properties = { + border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = awful.client.focus.filter, + raise = true, + keys = clientkeys, + buttons = clientbuttons, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen, + opacity = 0.8, + }, + }, -- KDE Rules + { -- Remove the default desktop rule_any = { name = { "^Desktop " } @@ -587,6 +594,7 @@ end) -- ensure that removing screens doesn't kill tags tag.connect_signal("request::screen", function(t) t.selected = false + for s in screen do if s ~= t.screen then t.screen = s @@ -637,9 +645,18 @@ 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}) + 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) +client.connect_signal("focus", function(c) + c.border_color = beautiful.border_focus + c.opacity = 1 + + -- Mouse follows focus +end) + +client.connect_signal("unfocus", function(c) + c.border_color = beautiful.border_normal + c.opacity = 0.8 +end) -- }}} -- cgit v1.1