aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/ui/wicked/init.lua
diff options
context:
space:
mode:
authordelta <darkussdelta@gmail.com>2023-03-04 22:04:55 +0100
committerdelta <darkussdelta@gmail.com>2023-03-04 22:18:21 +0100
commitf0b32f45746c026d402651013b7e98315d6956a1 (patch)
treef42609e98522da081cebdd21a674a702d1054bbc /.config/awesome/ui/wicked/init.lua
parenta0f8b5fa6acdd1c2477fb1881dd9067956bf0ae6 (diff)
restructure awesome config, add fresnel
Diffstat (limited to '.config/awesome/ui/wicked/init.lua')
-rw-r--r--.config/awesome/ui/wicked/init.lua101
1 files changed, 101 insertions, 0 deletions
diff --git a/.config/awesome/ui/wicked/init.lua b/.config/awesome/ui/wicked/init.lua
new file mode 100644
index 0000000..5687b81
--- /dev/null
+++ b/.config/awesome/ui/wicked/init.lua
@@ -0,0 +1,101 @@
+local awful = require "awful"
+local vars = require "misc.vars"
+local wibox = require "wibox"
+local debug = require "gears.debug"
+local gtimer = require "gears.timer"
+local naughty = require "naughty"
+-- local rubato = require "lib.rubato"
+local default = require "ui.wicked._default"
+local h = require "misc.helpers"
+
+local beautiful = require "beautiful"
+local xresources = require "beautiful.xresources"
+local dpi = xresources.apply_dpi
+
+local wicked = {}
+
+wicked._active_notififcations = {}
+
+function wicked:notify(n)
+ -- local notif = wibox.widget {
+ local notif = h.popup {
+ -- widget = {
+ -- {
+ -- {
+ -- widget = naughty.widget.icon,
+ -- notification = n,
+ -- forced_height = 0,
+ -- forced_width = 0,
+ -- clip_shape = vars.shape,
+ -- id = "icon_role"
+ -- },
+ -- {
+ -- {
+ -- widget = naughty.widget.title,
+ -- notification = n
+ -- },
+ -- {
+ -- widget = naughty.widget.message,
+ -- notification = n
+ -- },
+ -- layout = wibox.layout.fixed.vertical
+ -- },
+ -- layout = wibox.layout.fixed.horizontal,
+ -- spacing = vars.padding
+ -- },
+ -- widget = wibox.container.margin,
+ -- margins = vars.padding
+ -- },
+ widget = {
+ -- {
+ {
+ widget = naughty.widget.icon,
+ notification = n
+ },
+ {
+ widget = wibox.container.place,
+ valign = "center",
+ halign = "center",
+ {
+ {
+ widget = naughty.widget.title,
+ notification = n
+ },
+ {
+ widget = naughty.widget.message,
+ notification = n
+ },
+ -- 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,
+ },
+ placement = awful.placement.centered,
+ ontop = true
+ }
+
+ gtimer {
+ timeout = vars.notif_timeout,
+ autostart = true,
+ callback = function()
+ notif.visible = false
+ notif = nil
+ end
+ }
+
+ -- local icon = notif.widget:get_children_by_id("icon_role")[1]
+
+ -- if n.image then
+ -- icon.forced_height = dpi(32)
+ -- icon.forced_width = dpi(32)
+ -- end
+end
+
+return wicked