diff options
| author | delta <darkussdelta@gmail.com> | 2026-01-19 06:30:33 +0100 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2026-01-19 06:30:33 +0100 |
| commit | 225eeafcea67d63a608f9c666faf2a2ef014be4a (patch) | |
| tree | 7bc59e81983a02d44085545a385058a35de0a8ef /.config/awesome/ui/wicked | |
| parent | d7c66522cf365f516babcfeb1d4a2d36c3ea41af (diff) | |
sync: electric boogaloo
Diffstat (limited to '.config/awesome/ui/wicked')
| -rw-r--r-- | .config/awesome/ui/wicked/consts.lua | 6 | ||||
| -rw-r--r-- | .config/awesome/ui/wicked/init.lua | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/.config/awesome/ui/wicked/consts.lua b/.config/awesome/ui/wicked/consts.lua index c864483..31e31d5 100644 --- a/.config/awesome/ui/wicked/consts.lua +++ b/.config/awesome/ui/wicked/consts.lua @@ -3,6 +3,12 @@ local qcolor = require "quarrel.color" local C = {} C.NOTIF_TIMEOUT = 3 +C.LEVEL_PRIORITIES = { + debug = 0, + info = 1, + warn = 2, + error = 3 +} C.LEVEL_COLORS = { debug = qcolor.palette.purple(), info = qcolor.palette.blue(), diff --git a/.config/awesome/ui/wicked/init.lua b/.config/awesome/ui/wicked/init.lua index dd3324d..e82d408 100644 --- a/.config/awesome/ui/wicked/init.lua +++ b/.config/awesome/ui/wicked/init.lua @@ -12,6 +12,7 @@ local consts = require "ui.wicked.consts" local gtimer = require "gears.timer" local qcolor = require "quarrel.color" local qmarkup = require "quarrel.markup" +local dnd = require "services.dnd" local M = require "ui.wicked.consts" @@ -28,6 +29,11 @@ function M.new(n, _, n_args) local w_progress, t_progress + if ((consts.LEVEL_PRIORITIES[n_args.level] or 0) < consts.LEVEL_PRIORITIES.warn and n.urgency ~= "critical") and dnd.dnd then + n:destroy() + return + end + local level_color = consts.LEVEL_COLORS[n_args.level] or (n.urgency == "critical" and qcolor.palette.yellow()) if n.timeout > 0 then @@ -68,9 +74,6 @@ function M.new(n, _, n_args) + qui.CHAR_HEIGHT + qui.BORDER_WIDTH + qui.BIG_PADDING * 2 - -- + title_height - -- + message_height - -- + intertext_margin, + (n.icon and qui.CHAR_HEIGHT * 2 + qui.PADDING or (title_height + message_height + intertext_margin)), strategy = "exact", @@ -78,7 +81,6 @@ function M.new(n, _, n_args) qui.styled { widget = wibox.container.background, forced_width = beautiful.notification_max_width, - -- border_color = border_color, point = function(geo, args) return { x = args.parent.width, @@ -158,20 +160,14 @@ function M.new(n, _, n_args) }, }, }, - -- { - -- widget = wibox.container.constraint, - -- strategy = "max", - -- widget = wibox.container.place, { forced_width = qui.PADDING, widget = wibox.container.background, bg = level_color, shape = qui.shape, - -- }, }, layout = wibox.layout.fixed.horizontal, spacing = level_color and qui.BIG_PADDING, - -- expand = "outside" }, }, id = "bg", |
