From e37b2b0b2fe1facd2787ccc1aaad7cbd90dc33bc Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Sun, 23 Nov 2025 21:31:22 +0100 Subject: [PATCH] wip: dnsc-machine setup --- modules/wm/swaync/config/config.json | 68 --------------------- modules/wm/swaync/default.nix | 77 ++++++++++++++++++++++-- modules/wm/swaync/{config => }/style.css | 0 3 files changed, 73 insertions(+), 72 deletions(-) delete mode 100644 modules/wm/swaync/config/config.json rename modules/wm/swaync/{config => }/style.css (100%) diff --git a/modules/wm/swaync/config/config.json b/modules/wm/swaync/config/config.json deleted file mode 100644 index 450c542..0000000 --- a/modules/wm/swaync/config/config.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "control-center-layer": "top", - "control-center-margin-bottom": 0, - "control-center-margin-left": 0, - "control-center-margin-right": 0, - "control-center-margin-top": 0, - "cssPriority": "application", - "layer": "overlay", - "layer-shell": true, - "notification-2fa-action": true, - "notification-body-image-height": 100, - "notification-body-image-width": 200, - "notification-icon-size": 32, - "notification-inline-replies": false, - "positionX": "right", - "positionY": "top", - "widget-config": { - "buttons-grid": { - "actions": [ - { - "command": "iwgtk", - "label": " 󰖩 " - }, - { - "command": "wezterm start -- bluetui", - "label": " 󰂯 " - }, - { - "command": "niri msg action quit", - "label": " 󰍃 " - }, - { - "command": "swaylock", - "label": " 󰌾 " - }, - { - "command": "systemctl reboot", - "label": " 󰜉 " - }, - { - "command": "systemctl poweroff", - "label": " 󰐥 " - } - ], - "buttons-per-row": 3 - }, - "dnd": { - "clear-all-button": true, - "text": "Do Not Disturb" - }, - "mpris": { - "autohide": true, - "loop-carousel": false, - "show-album-art": "always" - }, - "title": { - "clear-all-button": false, - "text": "Control Panel" - } - }, - "widgets": [ - "title", - "dnd", - "buttons-grid", - "notifications", - "mpris" - ] -} diff --git a/modules/wm/swaync/default.nix b/modules/wm/swaync/default.nix index 04cde03..7341d43 100644 --- a/modules/wm/swaync/default.nix +++ b/modules/wm/swaync/default.nix @@ -1,8 +1,77 @@ { config, ... }: - { - xdg.configFile."swaync" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/swaync/config"; + xdg.configFile."swaync/style.css" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/swaync/style.css"; + }; + 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 = 32; + notification-body-image-height = 100; + notification-body-image-width = 200; + widgets = [ + "title" + "dnd" + "buttons-grid" + "notifications" + "mpris" + ]; + widget-config = { + title = { + text = "Control Panel"; + clear-all-button = false; + }; + buttons-grid = { + buttons-per-row = 3; + actions = [ + { + label = " 󰖩 "; + command = "iwgtk"; + } + { + label = " 󰂯 "; + command = "wezterm start -- bluetui"; + } + { + label = " 󰍃 "; + command = "niri msg action quit"; + } + { + label = " 󰌾 "; + command = "swaylock"; + } + { + label = " 󰜉 "; + command = "systemctl reboot"; + } + { + label = " 󰐥 "; + command = "systemctl poweroff"; + } + ]; + }; + dnd = { + text = "Do Not Disturb"; + clear-all-button = true; + }; + mpris = { + autohide = true; + show-album-art = "always"; + loop-carousel = false; + }; + }; + }; }; - services.swaync.enable = true; } diff --git a/modules/wm/swaync/config/style.css b/modules/wm/swaync/style.css similarity index 100% rename from modules/wm/swaync/config/style.css rename to modules/wm/swaync/style.css