aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/ui/statusbar/widgets/dnd.lua
diff options
context:
space:
mode:
authordelta <darkussdelta@gmail.com>2026-01-19 06:30:33 +0100
committerdelta <darkussdelta@gmail.com>2026-01-19 06:30:33 +0100
commit225eeafcea67d63a608f9c666faf2a2ef014be4a (patch)
tree7bc59e81983a02d44085545a385058a35de0a8ef /.config/awesome/ui/statusbar/widgets/dnd.lua
parentd7c66522cf365f516babcfeb1d4a2d36c3ea41af (diff)
sync: electric boogaloo
Diffstat (limited to '.config/awesome/ui/statusbar/widgets/dnd.lua')
-rw-r--r--.config/awesome/ui/statusbar/widgets/dnd.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/.config/awesome/ui/statusbar/widgets/dnd.lua b/.config/awesome/ui/statusbar/widgets/dnd.lua
new file mode 100644
index 0000000..37d96b7
--- /dev/null
+++ b/.config/awesome/ui/statusbar/widgets/dnd.lua
@@ -0,0 +1,34 @@
+local qvars = require "quarrel.vars"
+local wibox = require "wibox"
+local dnd = require "services.dnd"
+local qcolor = require "quarrel.color"
+local phosphor = require "assets.phosphor"
+local qui = require "quarrel.ui"
+local qdebug = require "quarrel.debug"
+
+local w = wibox.widget {
+ widget = wibox.container.background,
+ shape = qui.shape,
+ qui.padded {
+ widget = wibox.container.place,
+ qui.icon {
+ icon = phosphor.bell_simple_slash_fill,
+ color = qcolor.palette.bg(),
+ widget = {
+ forced_height = qui.CHAR_HEIGHT - qui.PADDING * 2,
+ forced_width = qui.CHAR_HEIGHT - qui.PADDING * 2
+ }
+ }
+ },
+ -- visible = false
+}
+
+dnd:connect_signal("dnd", function (_, value)
+ -- this is a giant hack
+ -- why is it here? cause otherwise the align layout freaks out
+ -- and counts the hidden widget when reserving space *and* when drawing, offsetting the rest of the widgets in the process
+ -- w.visible = value
+ w.bg = qcolor.palette[value and "yellow" or "bg"]()
+end)
+
+return w