diff --git a/homes/emenel/default.nix b/homes/emenel/default.nix index fed742d..91e4ca5 100644 --- a/homes/emenel/default.nix +++ b/homes/emenel/default.nix @@ -2,7 +2,7 @@ { imports = with nix-config.homeModules; [ - mako + # mako mpv yazi hyprlock diff --git a/homes/emenel/dotfiles/dot_config/waybar/config b/homes/emenel/dotfiles/dot_config/waybar/config index 7e4b766..12c9c7d 100644 --- a/homes/emenel/dotfiles/dot_config/waybar/config +++ b/homes/emenel/dotfiles/dot_config/waybar/config @@ -12,9 +12,31 @@ "network", "wireplumber", "power-profiles-daemon", - "upower" + "upower", + "custom/notification", ], + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "", + "inhibited-notification": "", + "inhibited-none": "", + "dnd-inhibited-notification": "", + "dnd-inhibited-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + "power-profiles-daemon": { "format": "{icon}", "tooltip-format": "Power profile: {profile}\nDriver: {driver}", diff --git a/hosts/eddie/configuration.nix b/hosts/eddie/configuration.nix index 320cc8d..1260d0e 100644 --- a/hosts/eddie/configuration.nix +++ b/hosts/eddie/configuration.nix @@ -68,7 +68,6 @@ psutils util-linux libgtop - ulauncher fontconfig freetype egl-wayland diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 9ec66d6..84372c8 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -49,7 +49,6 @@ trayscale font-manager - squirreldisk papers newsflash @@ -145,6 +144,46 @@ ]; }; + services.swaync = { + enable = true; + settings = { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + cssPriority = "application"; + control-center-margin-top = 0; + control-center-margin-bottom = 0; + control-center-margin-right = 0; + control-center-margin-left = 0; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + }; + style = +'' + .notification-row { + outline: none; + } + + .notification-row:focus, + .notification-row:hover { + background: @noti-bg-focus; + } + + .notification { + border-radius: 12px; + margin: 6px 12px; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), + 0 2px 6px 2px rgba(0, 0, 0, 0.3); + padding: 0; + } +''; + }; + programs = { eww = { enable = true; @@ -153,6 +192,7 @@ firefox.enable = true; }; - xdg.configFile."halloy/config.toml".source = ../../homes/emenel/dotfiles/dot_config/halloy/config.toml; + xdg.configFile."halloy/config.toml".source = + ../../homes/emenel/dotfiles/dot_config/halloy/config.toml; } diff --git a/modules/home/niri.nix b/modules/home/niri.nix index 15cbee7..f1e7b29 100644 --- a/modules/home/niri.nix +++ b/modules/home/niri.nix @@ -15,7 +15,7 @@ in { { command = ["clipse" "-listen"]; } { command = ["swayosd-server"]; } { command = ["waybar"]; } - { command = [ "systemctl" "--user" "restart" "mako.service" "hypridle.service" "xwayland-satellite.service" ]; } + { command = [ "systemctl" "--user" "restart" "hypridle.service" "xwayland-satellite.service" ]; } ]; workspaces = { @@ -192,6 +192,7 @@ in { "Mod+Ctrl+B".action = spawn "firefox"; "Mod+Ctrl+V".action = wezlaunch "clipse"; "Mod+Ctrl+F".action = wez "yazi"; + "Mod+Ctrl+N".action = spawn "swaync-client" "-t"; "Mod+Shift+A".action = spawn "hyprlock"; diff --git a/modules/home/waybar.nix b/modules/home/waybar.nix index 2cf85ee..32fda52 100644 --- a/modules/home/waybar.nix +++ b/modules/home/waybar.nix @@ -62,10 +62,15 @@ window#waybar { #tray, #window, #workspaces, -#clock { +#clock +#custom-notification { padding: 0 20px; } +#custom-notification { + min-width: 30px; +} + #power-profiles-daemon { min-width: 40px; }