From 5969049b295413af0bda81ab0fa3fe550228c4cd Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Tue, 26 Oct 2021 17:30:31 +0200 Subject: [PATCH] swaync: Init --- modules/programs/swaync/config.json | 8 ++ modules/programs/swaync/default.nix | 8 ++ modules/programs/swaync/style.css | 146 ++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 modules/programs/swaync/config.json create mode 100644 modules/programs/swaync/default.nix create mode 100644 modules/programs/swaync/style.css diff --git a/modules/programs/swaync/config.json b/modules/programs/swaync/config.json new file mode 100644 index 0000000..ee603e0 --- /dev/null +++ b/modules/programs/swaync/config.json @@ -0,0 +1,8 @@ +{ + "positionX": "right", + "positionY": "top", + "timeout": 10, + "timeout-low": 5, + "keyboard_shortcuts": true, + "image-visibility": "always" +} diff --git a/modules/programs/swaync/default.nix b/modules/programs/swaync/default.nix new file mode 100644 index 0000000..31a555d --- /dev/null +++ b/modules/programs/swaync/default.nix @@ -0,0 +1,8 @@ +{ config, ... }: + +{ + home-manager.users."${config.system.singleUser}".xdg.configFile = { + "swaync/config.json".source = ./config.json; + "swaync/style.css".source = ./style.css; + }; +} diff --git a/modules/programs/swaync/style.css b/modules/programs/swaync/style.css new file mode 100644 index 0000000..f622daf --- /dev/null +++ b/modules/programs/swaync/style.css @@ -0,0 +1,146 @@ +/* + * vim: ft=less + */ + +@define-color border-color rgb(7, 7, 7); +@define-color bg rgb(58, 58, 58); +@define-color bg-hover rgb(68, 68, 68); +@define-color bg-focus rgba(68, 68, 68, 0.6); +@define-color bg-selected rgb(0, 128, 255); + +.notification-row { + outline: none; +} +.notification-row:focus { + background: @bg-focus; +} + +.notification { + border-radius: 10px; + margin: 6px 12px; + box-shadow: 0px 2px 4px 2px rgba(0, 0, 0, 0.3); + padding: 0; +} + +.notification-content { + background: transparent; + padding: 6px; + border-radius: 10px; +} + +.close-button { + background: black; + color: white; + text-shadow: none; + padding: 0; + box-shadow: 0px 2px 4px 2px rgba(0, 0, 0, 0.3); +} +.close-button:hover { + background: rgb(30, 30, 30); + transition: all 0.15s ease-in-out; +} + +.notification-default-action, +.notification-action { + padding: 4px; + box-shadow: none; + background: @bg; + border: 1px solid @border-color; +} + +.notification-default-action:hover, +.notification-action:hover { + background: @bg-hover; +} + +.notification-default-action { + border-radius: 10px; +} + +/* When alternative actions are visible */ +.notification-default-action:not(:only-child) { + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; +} + +.notification-action { + border-radius: 0px; + border-top: none; + border-right: none; +} + +/* add bottom border radius to eliminate clipping */ +.notification-action:first-child { + border-bottom-left-radius: 10px; +} +.notification-action:last-child { + border-bottom-right-radius: 10px; + border-right: 1px solid @border-color; +} + +.image { +} + +.body-image { + margin-top: 6px; + background-color: white; + border-radius: 10px; +} + +.summary { + color: white; + text-shadow: none; +} + +.time { + color: white; + text-shadow: none; +} + +.body { + background: transparent; + color: white; + text-shadow: none; +} + +.top-action-title { + color: white; + text-shadow: none; +} + +.control-center-clear-all { + color: white; + text-shadow: none; + background: @bg; + border: 1px solid @border-color; + box-shadow: none; + border-radius: 10px; +} +.control-center-clear-all:hover { + background: @bg-hover; +} + +.control-center-dnd { + border-radius: 10px; + background: @bg; + border: 1px solid @border-color; + box-shadow: none; +} + +.control-center-dnd:checked { + background: @bg-selected; +} +.control-center-dnd slider { + background: @bg-hover; +} + +.control-center { + background: rgba(0, 0, 0, 0.7); +} +.control-center-list { + background: transparent; +} + +.floating-notifications { + background: transparent; +}