use mako notification daemon on wayland

This commit is contained in:
LordMZTE 2023-09-30 16:06:51 +02:00
parent d1ab82fe9e
commit 9df507ac2e
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
5 changed files with 61 additions and 24 deletions

View file

@ -82,4 +82,6 @@ exec-once = waybar
exec-once = swww-daemon
exec-once = sleep 1 && randomwallpaper
exec-once = hyprctl setcursor <% opt.cursor.theme %> <% opt.cursor.size %>
exec-once = wired # wired works meh on WL
<! if opt.commands.notification_daemon.wl then !>
exec-once = <% opt.commands.notification_daemon.wl %>
<! end !>

View file

@ -226,9 +226,9 @@ exec picom -f -i 1 -c
# conky
exec conky
<! if opt.commands.notification_daemon then !>
<! if opt.commands.notification_daemon.x then !>
# notification daemon
exec <% opt.commands.notification_daemon %>
exec <% opt.commands.notification_daemon.x %>
<! end !>
<! if opt.commands.file_manager_daemon then !>

15
.config/mako/config.cgt Normal file
View file

@ -0,0 +1,15 @@
# vim: ft=conf
# Dismiss all notifications on middle click
on-button-middle=dismiss-all
font=<% opt.font %> 10
default-timeout=8000
anchor=top-left
# Colors
background-color=<% opt.catppuccin.base %>E0
text-color=<% opt.catppuccin.text %>FF
border-color=<% opt.catppuccin.red %>FF
progress-color=source <% opt.catppuccin.surface0 %>E0

View file

@ -1,15 +1,3 @@
<!
-- Catppuccin Theme definitions
local text = "#cdd6f4"
local base = "#1e1e2e"
local mantle = "#181825"
local surface0 = "#313244"
local sky = "#89dceb"
local peach = "#fab387"
local red = "#f38ba8"
local teal = "#81c8be"
!>
(
notifications_spawn_paused: false,
max_notifications: 0,
@ -26,10 +14,10 @@ local teal = "#81c8be"
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 25.0, y: 25.0),
params: NotificationBlock((
background_color: Color(hex: "<% mantle %>"),
border_color: Color(hex: "<% red %>"),
border_color_critical: Color(hex: "<% peach %>"),
border_color_low: Color(hex: "<% sky %>"),
background_color: Color(hex: "<% opt.catppuccin.mantle %>"),
border_color: Color(hex: "<% opt.catppuccin.red %>"),
border_color_critical: Color(hex: "<% opt.catppuccin.peach %>"),
border_color_low: Color(hex: "<% opt.catppuccin.sky %>"),
border_rounding: 0.0,
border_width: 4.0,
gap: Vec2(x: 0.0, y: 12.0),
@ -44,7 +32,7 @@ local teal = "#81c8be"
hook: Hook(parent_anchor: TR, self_anchor: TL),
offset: Vec2(x: 0.0, y: 0.0),
params: ScrollingTextBlock((
color: Color(hex: "<% red %>"),
color: Color(hex: "<% opt.catppuccin.red %>"),
ellipsize: End,
font: "<% opt.font %> Bold 12",
lhs_dist: 25.0,
@ -64,7 +52,7 @@ local teal = "#81c8be"
offset: Vec2(x: 0.0, y: 0.0),
params: TextBlock((
text: "%b",
color: Color(hex: "<% text %>"),
color: Color(hex: "<% opt.catppuccin.text %>"),
ellipsize: End,
font: "<% opt.font %> Bold 12",
padding: Padding(left: 8.0, right: 8.0, top: 0.0, bottom: 8.0),
@ -97,10 +85,10 @@ local teal = "#81c8be"
render_criteria: [Or([Progress])],
params: ProgressBlock((
background_color: Color(hex: "#00000000"),
border_color: Color(hex: "<% surface0 %>"),
border_color: Color(hex: "<% opt.catppuccin.surface0 %>"),
border_rounding: 0.0,
border_width: 0.4,
fill_color: Color(hex: "<% teal %>"),
fill_color: Color(hex: "<% opt.catppuccin.teal %>"),
fill_rounding: 0.0,
height: 10.0,
padding: Padding(left: 8.0, right: 8.0, top: 0.0, bottom: 8.0),

View file

@ -48,7 +48,10 @@ opts.commands = {
file_manager_daemon = "thunar --daemon",
-- zenity-compatible dialoger
zenity = "yad",
notification_daemon = "wired",
notification_daemon = {
x = "wired",
wl = "mako",
},
screen_lock = string.format("i3lock -ti %s/.local/share/backgrounds/mzte.png", os.getenv "HOME"),
}
@ -59,4 +62,33 @@ opts.gamemode = {
opts.dev_dir = os.getenv "HOME" .. "/dev"
opts.catppuccin = {
base = "#1e1e2e",
blue = "#89b4fa",
crust = "#11111b",
flamingo = "#f2cdcd",
green = "#a6e3a1",
lavender = "#b4befe",
mantle = "#181825",
maroon = "#eba0ac",
mauve = "#cba6f7",
overlay0 = "#6c7086",
overlay1 = "#7f849c",
overlay2 = "#9399b2",
peach = "#fab387",
pink = "#f5c2e7",
red = "#f38ba8",
rosewater = "#f5e0dc",
sapphire = "#74c7ec",
sky = "#89dceb",
subtext0 = "#a6adc8",
subtext1 = "#bac2de",
surface0 = "#313244",
surface1 = "#45475a",
surface2 = "#585b70",
teal = "#94e2d5",
text = "#cdd6f4",
yellow = "#f9e2af",
}
return opts