diff options
author | delta <darkussdelta@gmail.com> | 2024-03-05 14:48:59 +0100 |
---|---|---|
committer | delta <darkussdelta@gmail.com> | 2024-03-05 14:48:59 +0100 |
commit | 510ef8e178929cf5e0c7fd5a5120fecf5f1b79f2 (patch) | |
tree | 3582e5cd7d000335ca94f2a009f3aed57bd86919 /.config/awesome/ui/wicked/_default.lua | |
parent | 95ba8030f722a616cff06c122dcfb2f63e25cf45 (diff) |
idk anymore
Diffstat (limited to '.config/awesome/ui/wicked/_default.lua')
-rw-r--r-- | .config/awesome/ui/wicked/_default.lua | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/.config/awesome/ui/wicked/_default.lua b/.config/awesome/ui/wicked/_default.lua deleted file mode 100644 index 25283f9..0000000 --- a/.config/awesome/ui/wicked/_default.lua +++ /dev/null @@ -1,94 +0,0 @@ ----------------------------------------------------------------------------- ---- The default widget template for the notifications. --- --- @author Emmanuel Lepage Vallee <elv1313@gmail.com> --- @copyright 2019 Emmanuel Lepage Vallee --- @classmod naughty.widget._default ----------------------------------------------------------------------------- - -local wibox = require("wibox") -local actionlist = require("naughty.list.actions") -local wtitle = require("naughty.widget.title") -local wmessage = require("naughty.widget.message") -local wicon = require("naughty.widget.icon") -local wbg = require("naughty.container.background") -local beautiful = require("beautiful") -local dpi = require("beautiful").xresources.apply_dpi - --- It is not worth doing a special widget for this. -local function notif_size() - local constraint = wibox.container.constraint() - constraint:set_strategy("max") - constraint:set_width(beautiful.notification_max_width or dpi(500)) - - rawset(constraint, "set_notification", function(_, notif) - constraint._private.notification = setmetatable({notif}, {__mode = "v"}) - local s = false - - if notif.width and notif.width ~= beautiful.notification_max_width then - constraint.width = notif.width - s = true - end - if notif.height then - constraint.height = notif.height - s = true - end - - constraint.strategy = s and "exact" or "max" - end) - - rawset(constraint, "get_notification", function() - return constraint._private.notification[1] - end) - - return constraint -end - --- It is not worth doing a special widget for this either. -local function notif_margins() - local margins = wibox.container.margin() - margins:set_margins(beautiful.notification_margin or 4) - - rawset(margins, "set_notification", function(_, notif) - if notif.margin then - margins:set_margins(notif.margin) - end - end) - - return margins -end - --- Used as a fallback when no widget_template is provided, emulate the legacy --- widget. -return { - { - { - { - { - wicon, - { - widget = wibox.container.place, - valign = "center", - halign = "center", - { - wtitle, - wmessage, - -- spacing = 4, - layout = wibox.layout.fixed.vertical, - } - }, - fill_space = true, - -- spacing = 4, - layout = wibox.layout.fixed.horizontal - }, - actionlist, - -- spacing = 10, - layout = wibox.layout.fixed.vertical, - }, - widget = notif_margins, - }, - id = "background_role", - widget = wbg, - }, - widget = notif_size, -} |