Something went wrong. Try again.
awm config
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137local naughty = require("naughty")local beautiful = require("beautiful")local wibox = require("wibox")local gears = require("gears")local awful = require("awful")local help = require("module.helpers")
return function(n) local close_button = wibox.widget({ widget = wibox.widget.imagebox, image = "/home/pita/.config/awesome/theme/icons/google/window-close.svg", forced_width = 18, forced_height = 18, buttons = { awful.button({}, 1, function() n:destroy(naughty.notification_closed_reason.dismissed_by_user) end), }, }) close_button:connect_signal("mouse::enter", function() close_button.image = gears.color.recolor_image("/home/pita/.config/awesome/theme/icons/google/window-close.svg", "#ef5a5a") end) close_button:connect_signal("mouse::leave", function() close_button.image = "/home/pita/.config/awesome/theme/icons/google/window-close.svg" end)
local actions = nil if n.actions and #n.actions > 0 then actions = wibox.widget({ notification = n, base_layout = wibox.widget({ spacing = 3, layout = wibox.layout.flex.horizontal, }), widget_template = { { { { id = "text_role", widget = wibox.widget.textbox, }, left = 6, right = 6, widget = wibox.container.margin, }, widget = wibox.container.place, }, bg = beautiful.bg1, forced_height = 25, forced_width = 70, widget = wibox.container.background, shape = help.rrect(10), }, style = { underline_normal = false, underline_selected = true, }, widget = naughty.list.actions, }) end
local titlebar = wibox.widget({ { { { widget = wibox.widget.textbox, markup = help.colortext(n.app_name:gsub("^%l", string.upper), beautiful.fg1), ellipsize = "end", forced_width = 200, forced_height = 0, }, layout = wibox.layout.fixed.horizontal, spacing = 5, }, nil, close_button, layout = wibox.layout.align.horizontal, }, { widget = wibox.widget.separator, forced_height = 1, color = beautiful.grey, }, spacing = 5, layout = wibox.layout.fixed.vertical, })
local widget = naughty.layout.box({ notification = n, type = "notification", shape = help.rrect(10), maximum_width = 400, maximum_height = 220, widget_template = { { { titlebar, { { image = n.icon or "/home/pita/.config/awesome/theme/icons/google/notification.svg", clip_shape = gears.shape.circle, halign = "center", valign = "top", widget = wibox.widget.imagebox, forced_height = 50, forced_width = 50, resize = true, }, { { widget = wibox.widget.textbox, text = n.title:gsub("^%l", string.upper), }, { widget = wibox.widget.textbox, text = n.message, }, layout = wibox.layout.fixed.vertical, }, layout = wibox.layout.fixed.horizontal, spacing = 7, }, actions, layout = wibox.layout.fixed.vertical, spacing = 7, }, widget = wibox.container.margin, margins = 8, }, widget = wibox.container.background, bg = beautiful.bg, }, }) widget.buttons = {}end