diff --git a/config/awesome/notifications/themes/amarena.lua b/config/awesome/notifications/themes/amarena.lua index df8c635..e5ce4b1 100644 --- a/config/awesome/notifications/themes/amarena.lua +++ b/config/awesome/notifications/themes/amarena.lua @@ -10,18 +10,16 @@ local helpers = require("helpers") -- For antialiasing -- The real background color is set in the widget_template -local notification_bg = beautiful.notification_bg beautiful.notification_bg = "#00000000" local default_icon = "" -local default_color = x.color6 -- Custom text icons according to the notification's app_name -- plus whether the title should be visible or not -- (This will be removed when notification rules are released) -- Using icomoon font local app_config = { - ['battery'] = { icon = "", title = false }, + ['battery'] = { icon = "", title = false }, ['charger'] = { icon = "", title = false }, ['volume'] = { icon = "", title = false }, ['brightness'] = { icon = "", title = false }, @@ -36,10 +34,10 @@ local app_config = { ['email'] = { icon = "", title = true }, } -local urgency_bg = { - ['low'] = x.color4, - ['normal'] = x.color11, - ['critical'] = x.color1, +local urgency_color = { + ['low'] = x.color2, + ['normal'] = x.color4, + ['critical'] = x.color11, } -- Template @@ -60,8 +58,7 @@ naughty.connect_signal("request::display", function(n) } local icon, title_visible - local color = default_color - local bg = urgency_bg[n.urgency] or urgency_bg['normal'] + local color = urgency_color[n.urgency] -- Set icon according to app_name if app_config[n.app_name] then icon = app_config[n.app_name].icon @@ -87,7 +84,7 @@ naughty.connect_signal("request::display", function(n) }, widget = wibox.container.place }, - bg = x.foreground.."22", + bg = x.color8.."32", forced_height = dpi(25), widget = wibox.container.background }, @@ -116,67 +113,59 @@ naughty.connect_signal("request::display", function(n) { { { - { - markup = helpers.colorize_text(icon, color), - align = "center", - valign = "center", - widget = custom_notification_icon, - }, - forced_height = dpi(50), - bg = x.foreground, - widget = wibox.container.background, + markup = helpers.colorize_text(icon, color), + align = "center", + valign = "center", + widget = custom_notification_icon, }, + forced_width = dpi(50), + bg = x.background, + widget = wibox.container.background, + }, + { { { - { - { - align = "center", - visible = title_visible, - font = beautiful.notification_font, - markup = ""..n.title.."", - widget = wibox.widget.textbox, - -- widget = naughty.widget.title, - }, - { - align = "center", - widget = naughty.widget.message, - }, - { - helpers.vertical_pad(dpi(10)), - { - actions, - shape = gears.shape.rounded_bar, - widget = wibox.container.background, - }, - visible = n.actions and #n.actions > 0, - layout = wibox.layout.fixed.vertical - }, - layout = wibox.layout.align.vertical, - }, - margins = beautiful.notification_margin, - widget = wibox.container.margin, + align = "center", + visible = title_visible, + font = beautiful.notification_font, + markup = ""..n.title.."", + widget = wibox.widget.textbox, + -- widget = naughty.widget.title, }, - bg = bg, - widget = wibox.container.background, + { + align = "center", + wrap = "char", + widget = naughty.widget.message, + }, + { + helpers.vertical_pad(dpi(10)), + { + actions, + shape = helpers.rrect(dpi(4)), + widget = wibox.container.background, + }, + visible = n.actions and #n.actions > 0, + layout = wibox.layout.fixed.vertical + }, + layout = wibox.layout.align.vertical, }, - layout = wibox.layout.fixed.vertical, + margins = beautiful.notification_margin, + widget = wibox.container.margin, }, - strategy = "min", - width = dpi(200), - widget = wibox.container.constraint, + layout = wibox.layout.fixed.horizontal, }, - strategy = "max", - width = beautiful.notification_max_width or dpi(350), - height = beautiful.notification_max_height or dpi(180), + strategy = "min", + width = dpi(100), widget = wibox.container.constraint, }, - -- Anti-aliasing container - bg = notification_bg, - shape = helpers.prrect(dpi(30), true, true, false, true), - widget = wibox.container.background + strategy = "max", + width = beautiful.notification_max_width or dpi(350), + height = beautiful.notification_max_height or dpi(180), + widget = wibox.container.constraint, }, -- Anti-aliasing container shape = helpers.rrect(beautiful.notification_border_radius), + bg = x.color0, widget = wibox.container.background } } diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 64403bf..5d5bd5f 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -51,7 +51,7 @@ local icon_theme = icon_themes[2] local notification_themes = { "lovelace", -- 1 -- Plain with standard image icons "ephemeral", -- 2 -- Outlined text icons and a rainbow stripe - "amarena", -- 3 -- Speech bubble shape with filled text icons + "amarena", -- 3 -- Filled text icons on the right, text on the left } local notification_theme = notification_themes[3] -- ===================================================================