making awesome more awesome

This commit is contained in:
Chris Cochrun 2020-06-03 21:27:00 -05:00
parent 0a7fe89729
commit 3643ba277e
361 changed files with 41182 additions and 26 deletions

View file

@ -0,0 +1,53 @@
local wibox = require('wibox')
local beautiful = require('beautiful')
function build(widget)
local container =
wibox.widget {
widget,
widget = wibox.container.background
}
local old_cursor, old_wibox
container:connect_signal(
'mouse::enter',
function()
container.bg = beautiful.groups_bg
-- Hm, no idea how to get the wibox from this signal's arguments...
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = 'hand1'
end
end
)
container:connect_signal(
'mouse::leave',
function()
container.bg = beautiful.transparent
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
container:connect_signal(
'button::press',
function()
container.bg = beautiful.groups_title_bg
end
)
container:connect_signal(
'button::release',
function()
container.bg = beautiful.groups_bg
end
)
return container
end
return build