From 7c0679ee6ef2f10713dc4c08cb5cb1d9f5a69f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sat, 3 May 2025 02:05:16 +0200 Subject: [PATCH] Home Gen506 @ 2025-05-03-01:41 by jonas@comfy-station --- home/jonas@comfy-station.nix | 2 +- modules/default.nix | 1 + modules/home/rofi/config.nix | 10 --- modules/home/rofi/default.nix | 6 -- modules/home/rofi/rofi.nix | 3 - modules/home/swaync/config.nix | 108 --------------------------- modules/home/swaync/default.nix | 125 ++++++++++++++++++++++++++++++-- modules/home/swaync/swaync.nix | 3 - 8 files changed, 122 insertions(+), 136 deletions(-) delete mode 100644 modules/home/rofi/config.nix delete mode 100644 modules/home/rofi/default.nix delete mode 100644 modules/home/rofi/rofi.nix delete mode 100644 modules/home/swaync/config.nix delete mode 100644 modules/home/swaync/swaync.nix diff --git a/home/jonas@comfy-station.nix b/home/jonas@comfy-station.nix index 60dadf0..96ac3cc 100644 --- a/home/jonas@comfy-station.nix +++ b/home/jonas@comfy-station.nix @@ -4,7 +4,6 @@ ../modules/home/firefox.nix ../modules/home/kdeconnect.nix ../modules/home/ssh.nix - ../modules/home/swaync ../modules/home/themes/gtk ../modules/home/themes/qt ../modules/home/waybar @@ -28,6 +27,7 @@ hive.kitty.enable = true; hive.nextcloud.enable = true; hive.ranger.enable = true; + hive.swaync.enable = true; hive.nix-scripts.enable = true; hive.doom.enable = true; hive.doom.enableCopilot = true; diff --git a/modules/default.nix b/modules/default.nix index 0bc3df2..9809fa1 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -33,5 +33,6 @@ ./home/kitty ./home/nextcloud ./home/ranger + ./home/swaync ]; } diff --git a/modules/home/rofi/config.nix b/modules/home/rofi/config.nix deleted file mode 100644 index c71b757..0000000 --- a/modules/home/rofi/config.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.rofi = { - location = "left"; - theme = "${pkgs.rofi}/share/rofi/themes/sidebar-v2.rasi"; - }; -} diff --git a/modules/home/rofi/default.nix b/modules/home/rofi/default.nix deleted file mode 100644 index b5d1319..0000000 --- a/modules/home/rofi/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - imports = [ - ./config.nix - ./rofi.nix - ]; -} diff --git a/modules/home/rofi/rofi.nix b/modules/home/rofi/rofi.nix deleted file mode 100644 index 0f1fecd..0000000 --- a/modules/home/rofi/rofi.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - programs.rofi.enable = true; -} diff --git a/modules/home/swaync/config.nix b/modules/home/swaync/config.nix deleted file mode 100644 index 960e45f..0000000 --- a/modules/home/swaync/config.nix +++ /dev/null @@ -1,108 +0,0 @@ -{pkgs, ...}: { - xdg.enable = true; - xdg.configFile = { - "swaync/themes" = { - source = ./themes; - }; - "swaync/icons" = { - source = ./icons; - recursive = true; - }; - }; - services.swaync.style = '' - @import 'themes/nova-dark/notifications.css'; - @import 'themes/nova-dark/central_control.css'; - ''; - services.swaync.settings = { - positionX = "right"; - positionY = "top"; - cssPriority = "user"; - - control-center-width = 380; - control-center-height = 860; - control-center-margin-top = 2; - control-center-margin-bottom = 2; - control-center-margin-right = 1; - control-center-margin-left = 0; - - notification-window-width = 400; - notification-icon-size = 48; - notification-body-image-height = 160; - 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" - "title" - "dnd" - "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 = "${pkgs.alsa-utils}/bin/amixer set Master toggle"; - } - { - label = ""; - command = "${pkgs.alsa-utils}/bin/amixer set Capture toggle"; - } - { - label = " "; - command = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; - } - { - label = "󰂯"; - command = "${pkgs.blueman}/bin/blueman-manager"; - } - ]; - }; - }; - }; -} diff --git a/modules/home/swaync/default.nix b/modules/home/swaync/default.nix index a3b154c..3c87a33 100644 --- a/modules/home/swaync/default.nix +++ b/modules/home/swaync/default.nix @@ -1,6 +1,121 @@ -{...}: { - imports = [ - ./config.nix - ./swaync.nix - ]; +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.hive.swaync; +in { + options.hive.swaync = { + enable = lib.mkEnableOption "Enable swaync"; + }; + config = lib.mkIf cfg.enable { + xdg.enable = true; + xdg.configFile = { + "swaync/themes" = { + source = ./themes; + }; + "swaync/icons" = { + source = ./icons; + recursive = true; + }; + }; + services.swaync.enable = true; + services.swaync.style = '' + @import 'themes/nova-dark/notifications.css'; + @import 'themes/nova-dark/central_control.css'; + ''; + services.swaync.settings = { + positionX = "right"; + positionY = "top"; + cssPriority = "user"; + + control-center-width = 380; + control-center-height = 860; + control-center-margin-top = 2; + control-center-margin-bottom = 2; + control-center-margin-right = 1; + control-center-margin-left = 0; + + notification-window-width = 400; + notification-icon-size = 48; + notification-body-image-height = 160; + 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" + "title" + "dnd" + "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 = "${pkgs.alsa-utils}/bin/amixer set Master toggle"; + } + { + label = ""; + command = "${pkgs.alsa-utils}/bin/amixer set Capture toggle"; + } + { + label = " "; + command = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; + } + { + label = "󰂯"; + command = "${pkgs.blueman}/bin/blueman-manager"; + } + ]; + }; + }; + }; + }; } diff --git a/modules/home/swaync/swaync.nix b/modules/home/swaync/swaync.nix deleted file mode 100644 index 0af5444..0000000 --- a/modules/home/swaync/swaync.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - services.swaync.enable = true; -}