From 18c4e4b2319144c4b2fbd72ce59c6407307086b6 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Sun, 23 Nov 2025 21:07:14 +0100 Subject: [PATCH] wip: dnsc-machine setup --- modules/wm/swaync/config/style.css | 234 ++++++++++++++++++++++ modules/wm/swaync/default.nix | 312 +---------------------------- 2 files changed, 237 insertions(+), 309 deletions(-) diff --git a/modules/wm/swaync/config/style.css b/modules/wm/swaync/config/style.css index e69de29..8bec3c9 100644 --- a/modules/wm/swaync/config/style.css +++ b/modules/wm/swaync/config/style.css @@ -0,0 +1,234 @@ +@define-color bg #0f0b15; +@define-color bg-secondary #1d202f; +@define-color fg #ffffff; +@define-color fg_alt #bf8a9f; +@define-color fg_dim #807c9f; +@define-color bg #0f0b15; +@define-color bg_secondary #1d202f; +@define-color grey #807c9f; +@define-color grey_bright #807c9f; +@define-color red #f47359; +@define-color red_bright #ff6a7a; +@define-color red_subtle_bg #67182f; +@define-color green #29a444; +@define-color green_bright #00a392; +@define-color green_subtle_bg #10452f; +@define-color yellow #b58a52; +@define-color yellow_bright #df9080; +@define-color yellow_brighter #FCC1B6; +@define-color yellow_subtle_bg #54362a; +@define-color blue #3f95f6; +@define-color blue_bright #029fff; +@define-color blue_subtle_bg #2a346e; +@define-color blue_subtle_dark_bg #003045; +@define-color magenta #d369af; +@define-color magenta_bright #af85ea; +@define-color magenta_brighter #c57faf; +@define-color magenta_subtle_bg #572454; +@define-color magenta_subtle_bg_darker #331531; +@define-color cyan #4fbaef; +@define-color cyan_bright #35afbf; +@define-color cyan_subtle_bg #133d56; +@define-color silver #b8c6d5; +@define-color silver_bright #ffffff; + +* { + border-radius: 0; +} + +.control-center .notification-row:focus, +.control-center .notification-row:hover { + opacity: 1; + background: @bg; +} + +.notification-row { + outline: none; + margin: 0; + padding: 0; + background: @bg; +} + +.notification, +.notification-content, +.notification-action, +.notification-default-action, +.inline-reply-entry, +.inline-reply-button, +.widget-title, +.widget-title>button, +.widget-dnd, +.widget-dnd>switch, +.widget-dnd>switch slider, +.widget-label>label, +.widget-buttons-grid, +.widget-buttons-grid>flowbox>flowboxchild>button, +.widget-volume, +.widget-backlight, +.widget-mpris, +.widget-mpris>box>button, +.widget-mpris-player, +.widget-mpris-album-art { + border-radius: 5px; +} + +.notification { + opacity: 0.9; + border: none; +} + +.close-button { + background: @magenta_subtle_bg_darker; + color: @magenta_brighter; + text-shadow: none; + padding: 0; + border-radius: 50%; + border: none; +} + +.close-button:hover { + cursor: pointer; + background: @red_subtle_bg; + color: @red_bright; + box-shadow: none; +} + +.notification-action { + border: 2px solid @cyan_subtle_bg; + border-top: none; +} + +.inline-reply-entry { + background: @bg_secondary; + color: @fg; + caret-color: @fg; + border: 1px solid @cyan_subtle_bg; +} + +.inline-reply-button { + margin-top: 4px; + margin-left: 4px; + background: @bg; + border: 1px solid @cyan_subtle_bg; + color: @fg; +} + +.inline-reply-button:disabled { + background: transparent; + color: @fg_dim; + border: 1px solid transparent; +} + +.inline-reply-button:hover { + background: @bg; +} + +.summary { + font-size: 16px; + font-weight: 700; + background: transparent; + color: @fg; + text-shadow: none; +} + +.time { + font-size: 16px; + font-weight: 400; + background: transparent; + color: @fg_dim; + text-shadow: none; + margin-right: 12px; +} + +.body { + margin-top: 8px; + font-size: 14px; + font-weight: 400; + background: transparent; + color: @fg_dim; + text-shadow: none; +} + +.control-center { + background: @bg; + padding: 0; +} + +.widget-title { + margin: 12px; + font-size: 1.8rem; +} + +.widget-dnd { + background: @noti-bg-darker; + padding: 5px 10px; + margin: 5px 10px; + font-size: large; + color: @blue-base; +} + +.widget-dnd>switch { + background: @blue-base; + border-radius: 0; +} + +.widget-dnd>switch:checked { + background: @red-base; + border: 1px solid @red-base; +} + +.widget-label>label { + font-size: 1rem; + color: @text-color; + margin: 10px; +} + +.widget-buttons-grid { + font-size: x-large; + padding: 5px; + margin: 10px; + background: @noti-bg-darker; +} + +.widget-buttons-grid>flowbox>flowboxchild>button { + margin: 3px; + background: @cc-bg; + color: @text-color; + transition: background-color 0.15s ease-in-out; +} + +.widget-buttons-grid>flowbox>flowboxchild>button:hover { + background: @blue-base; + color: @cc-bg; +} + +.widget-buttons-grid>flowbox>flowboxchild>button:checked { + background: @green-base; + color: @cc-bg; +} + +.widget-volume, +.widget-backlight { + background: @noti-bg-darker; + padding: 5px; + margin: 5px 10px; + font-size: 2rem; + color: @blue-base; +} + +.widget-mpris { + color: @text-color; + background: @noti-bg-darker; + padding: 5px 10px; + margin: 5px 10px 5px 10px; + box-shadow: none; +} + +.widget-mpris>box>button, +.widget-mpris-player, +.widget-mpris-album-art { + border-radius: 0; + box-shadow: none; + padding: 5px 10px; + margin: 10px 0 0 0; +} diff --git a/modules/wm/swaync/default.nix b/modules/wm/swaync/default.nix index f10904e..2ef5e8c 100644 --- a/modules/wm/swaync/default.nix +++ b/modules/wm/swaync/default.nix @@ -1,312 +1,6 @@ { - # xdg.configFile."swaync" = { - # source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/swaync/config"; - # }; - 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; - }; - }; - }; - style = '' - @define-color bg #0f0b15; - @define-color bg-secondary #1d202f; - @define-color fg #ffffff; - @define-color fg_alt #bf8a9f; - @define-color fg_dim #807c9f; - @define-color bg #0f0b15; - @define-color bg_secondary #1d202f; - @define-color grey #807c9f; - @define-color grey_bright #807c9f; - @define-color red #f47359; - @define-color red_bright #ff6a7a; - @define-color red_subtle_bg #67182f; - @define-color green #29a444; - @define-color green_bright #00a392; - @define-color green_subtle_bg #10452f; - @define-color yellow #b58a52; - @define-color yellow_bright #df9080; - @define-color yellow_brighter #FCC1B6; - @define-color yellow_subtle_bg #54362a; - @define-color blue #3f95f6; - @define-color blue_bright #029fff; - @define-color blue_subtle_bg #2a346e; - @define-color blue_subtle_dark_bg #003045; - @define-color magenta #d369af; - @define-color magenta_bright #af85ea; - @define-color magenta_brighter #c57faf; - @define-color magenta_subtle_bg #572454; - @define-color magenta_subtle_bg_darker #331531; - @define-color cyan #4fbaef; - @define-color cyan_bright #35afbf; - @define-color cyan_subtle_bg #133d56; - @define-color silver #b8c6d5; - @define-color silver_bright #ffffff; - - * { - border-radius: 0; - } - - .control-center .notification-row:focus, - .control-center .notification-row:hover { - opacity: 1; - background: @bg; - } - - .notification-row { - outline: none; - margin: 0; - padding: 0; - background: @bg; - } - - .notification, - .notification-content, - .notification-action, - .notification-default-action, - .inline-reply-entry, - .inline-reply-button, - .widget-title, - .widget-title>button, - .widget-dnd, - .widget-dnd>switch, - .widget-dnd>switch slider, - .widget-label>label, - .widget-buttons-grid, - .widget-buttons-grid>flowbox>flowboxchild>button, - .widget-volume, - .widget-backlight, - .widget-mpris, - .widget-mpris>box>button, - .widget-mpris-player, - .widget-mpris-album-art { - border-radius: 5px; - } - - .notification { - opacity: 0.9; - border: none; - } - - .close-button { - background: @magenta_subtle_bg_darker; - color: @magenta_brighter; - text-shadow: none; - padding: 0; - border-radius: 50%; - border: none; - } - - .close-button:hover { - cursor: pointer; - background: @red_subtle_bg; - color: @red_bright; - box-shadow: none; - } - - .notification-action { - border: 2px solid @cyan_subtle_bg; - border-top: none; - } - - .inline-reply-entry { - background: @bg_secondary; - color: @fg; - caret-color: @fg; - border: 1px solid @cyan_subtle_bg; - } - - .inline-reply-button { - margin-top: 4px; - margin-left: 4px; - background: @bg; - border: 1px solid @cyan_subtle_bg; - color: @fg; - } - - .inline-reply-button:disabled { - background: transparent; - color: @fg_dim; - border: 1px solid transparent; - } - - .inline-reply-button:hover { - background: @bg; - } - - .summary { - font-size: 16px; - font-weight: 700; - background: transparent; - color: @fg; - text-shadow: none; - } - - .time { - font-size: 16px; - font-weight: 400; - background: transparent; - color: @fg_dim; - text-shadow: none; - margin-right: 12px; - } - - .body { - margin-top: 8px; - font-size: 14px; - font-weight: 400; - background: transparent; - color: @fg_dim; - text-shadow: none; - } - - .control-center { - background: @bg; - padding: 0; - } - - .widget-title { - margin: 12px; - font-size: 1.8rem; - } - - .widget-dnd { - background: @noti-bg-darker; - padding: 5px 10px; - margin: 5px 10px; - font-size: large; - color: @blue-base; - } - - .widget-dnd>switch { - background: @blue-base; - border-radius: 0; - } - - .widget-dnd>switch:checked { - background: @red-base; - border: 1px solid @red-base; - } - - .widget-label>label { - font-size: 1rem; - color: @text-color; - margin: 10px; - } - - .widget-buttons-grid { - font-size: x-large; - padding: 5px; - margin: 10px; - background: @noti-bg-darker; - } - - .widget-buttons-grid>flowbox>flowboxchild>button { - margin: 3px; - background: @cc-bg; - color: @text-color; - transition: background-color 0.15s ease-in-out; - } - - .widget-buttons-grid>flowbox>flowboxchild>button:hover { - background: @blue-base; - color: @cc-bg; - } - - .widget-buttons-grid>flowbox>flowboxchild>button:checked { - background: @green-base; - color: @cc-bg; - } - - .widget-volume, - .widget-backlight { - background: @noti-bg-darker; - padding: 5px; - margin: 5px 10px; - font-size: 2rem; - color: @blue-base; - } - - .widget-mpris { - color: @text-color; - background: @noti-bg-darker; - padding: 5px 10px; - margin: 5px 10px 5px 10px; - box-shadow: none; - } - - .widget-mpris>box>button, - .widget-mpris-player, - .widget-mpris-album-art { - border-radius: 0; - box-shadow: none; - padding: 5px 10px; - margin: 10px 0 0 0; - } - ''; + xdg.configFile."swaync" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/swaync/config"; }; + services.swaync.enable = true; }