added more widgets, rewritten folder structure

This commit is contained in:
Crylia
2021-11-28 14:58:07 +01:00
parent 7f28224bf1
commit 32ba8ff3a8
65 changed files with 832 additions and 1873 deletions

View File

@@ -2,7 +2,6 @@
local awful = require("awful")
local beautiful = require("beautiful")
client.connect_signal(
"manage",
function (c)
@@ -56,4 +55,82 @@ end)
client.connect_signal("unfocus", function (c)
c.border_color = beautiful.border_normal
end)
end)
function hover_signal (widget, bg, fg)
local old_wibox, old_cursor, old_bg, old_fg
widget:connect_signal(
"mouse::enter",
function ()
if bg then
old_bg = widget.bg
if string.len(bg) == 7 then
widget.bg = bg .. 'dd'
else
widget.bg = bg
end
end
if fg then
old_fg = widget.fg
widget.fg = fg
end
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
widget:connect_signal(
"button::press",
function ()
if bg then
if bg then
if string.len(bg) == 7 then
widget.bg = bg .. 'bb'
else
widget.bg = bg
end
end
end
if fg then
widget.fg = fg
end
end
)
widget:connect_signal(
"button::release",
function ()
if bg then
if bg then
if string.len(bg) == 7 then
widget.bg = bg .. 'dd'
else
widget.bg = bg
end
end
end
if fg then
widget.fg = fg
end
end
)
widget:connect_signal(
"mouse::leave",
function ()
if bg then
widget.bg = old_bg
end
if fg then
widget.fg = old_fg
end
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
end