diff --git a/modules/home/default.nix b/modules/home/default.nix index f4d1f06..5d67d2a 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -16,6 +16,7 @@ ./screenshot.nix ./ssh.nix ./stylix.nix + ./swaync.nix ./vscode.nix ./walker.nix ./wallpaper.nix diff --git a/modules/home/hypr/hyprland.nix b/modules/home/hypr/hyprland.nix index b333bd5..436869e 100644 --- a/modules/home/hypr/hyprland.nix +++ b/modules/home/hypr/hyprland.nix @@ -57,6 +57,7 @@ "systemctl --user enable --now hyprpolkitagent.service" "systemctl --user enable app-com.mitchellh.ghostty.service" "wpaperd -d" + "swaync" "pypr" ]; diff --git a/modules/home/hypr/keybinds.nix b/modules/home/hypr/keybinds.nix index 2da0be4..b1b198c 100644 --- a/modules/home/hypr/keybinds.nix +++ b/modules/home/hypr/keybinds.nix @@ -45,6 +45,9 @@ ", XF86AudioMute, exec, pamixer -t" "ALT, XF86AudioMute, exec, pamixer --default-source -t" + # Notification Center + "$mod, n, exec, swaync-client -t -sw" + # Scratchpads "$mod, TAB, exec, pypr toggle term" ] diff --git a/modules/home/stylix.nix b/modules/home/stylix.nix index 183044c..a228ad3 100644 --- a/modules/home/stylix.nix +++ b/modules/home/stylix.nix @@ -31,6 +31,7 @@ foot.enable = true; lazygit.enable = true; starship.enable = true; + swaync.enable = true; yazi.enable = true; }; }; diff --git a/modules/home/swaync.nix b/modules/home/swaync.nix new file mode 100644 index 0000000..19a4b35 --- /dev/null +++ b/modules/home/swaync.nix @@ -0,0 +1,104 @@ +{ + ... +}: +{ + services.swaync = { + enable = true; + settings = { + positionX = "right"; + positionY = "top"; + cssPriority = "user"; # "application" + + control-center-width = 380; + control-center-height = 860; + control-center-margin-top = 10; + control-center-margin-bottom = 10; + control-center-margin-right = 10; + control-center-margin-left = 10; + + notification-window-width = 400; + notification-icon-size = 48; + notification-body-image-height = 100; + notification-body-image-width = 200; + + timeout = 4; + timeout-low = 2; + timeout-critical = 6; + + fit-to-screen = false; + keyboard-shortcuts = true; + image-visibility = "when-available"; + transition-time = 200; + hide-on-clear = false; + hide-on-action = false; + script-fail-notify = true; + scripts = { + example-script = { + exec = "echo 'Do something...'"; + urgency = "Normal"; + }; + }; + notification-visibility = { + example-name = { + state = "muted"; + urgency = "low"; + app-name = "Spotify"; + }; + }; + widgets = [ + "label" + "buttons-grid" + "mpris" + "dnd" + "title" + "notifications" + ]; + widget-config = { + title = { + text = "Notifications"; + clear-all-button = true; + button-text = " 󰎟 "; + }; + dnd = { + text = "Do Not Disturb"; + }; + label = { + max-lines = 1; + text = " "; + }; + mpris = { + image-size = 96; + image-radius = 12; + }; + volume = { + label = "󰕾"; + show-per-app = true; + }; + buttons-grid = { + actions = [ + { + label = ""; + command = "pamixer -t"; + } + { + label = ""; + command = "pamixer --default-source -t"; + } + { + label = ""; + command = "nmtui"; + } + # { + # label = "󰂯"; + # command = "blueman-manager"; + # } + # { + # label = "󰏘"; + # command = "nwg-look"; + # } + ]; + }; + }; + }; + }; +}