chore: install new swaync files

This commit is contained in:
Ahwx 2025-08-17 13:45:49 +02:00
parent 4891753215
commit d6b69dc2fe

View file

@ -1,381 +1,233 @@
{ pkgs, username, ... }: { pkgs, username, ... }:
{ {
home = { home = {
packages = with pkgs; [ swaynotificationcenter ]; packages = with pkgs; [
swaynotificationcenter
wlogout
];
file."/home/${username}/.config/swaync/config.json".text = '' file."/home/${username}/.config/swaync/config.json".text = ''
{ {
"positionX": "right", "$schema": "/etc/xdg/swaync/configSchema.json",
"positionY": "top", "positionX": "right",
"layer": "overlay", "positionY": "top",
"layer-shell": "true", "layer": "overlay",
"cssPriority": "application", "layer-shell": true,
"control-center-margin-top": 10, "cssPriority": "user",
"control-center-margin-bottom": 10,
"control-center-margin-right": 10, "control-center-width": 380,
"control-center-margin-left": 10, "control-center-height": 860,
"notification-icon-size": 64, "control-center-margin-top": 8,
"notification-body-image-height": 128, "control-center-margin-bottom": 8,
"notification-body-image-width": 200, "control-center-margin-right": 8,
"timeout": 10, "control-center-margin-left": 8,
"timeout-low": 5,
"timeout-critical": 0, "notification-window-width": 400,
"fit-to-screen": true, "notification-icon-size": 48,
"control-center-width": 400, "notification-body-image-height": 160,
"control-center-height": 650, "notification-body-image-width": 200,
"notification-window-width": 350,
"keyboard-shortcuts": true, "widgets": ["buttons-grid", "title", "dnd", "notifications", "mpris"],
"image-visibility": "when-available", "widget-config": {
"transition-time": 200, "title": {
"hide-on-clear": false, "text": "Notifications",
"hide-on-action": true, "clear-all-button": true,
"script-fail-notify": true, "button-text": "Clear All"
"widgets": [ },
"title", "dnd": {
"dnd", "text": "Do Not Disturb"
"notifications" },
], "label": {
"widget-config": { "max-lines": 1,
"title": { "text": " "
"text": "Notifications", },
"clear-all-button": true, "mpris": {
"button-text": " Clear all " "image-size": 60,
}, "image-radius": 12
"dnd": { },
"text": " Do not disturb" "buttons-grid": {
}, "actions": [
} {
"label": " ",
"command": "kitty -e nmtui-connect"
},
{
"label": "󰂯",
"command": "waybar-bluetooth toggle"
},
{
"label": "󰏘",
"command": "kitty -e walp"
},
{
"label": "",
"command": "wlogout"
}
]
}
}
} }
''; '';
file = { file."/home/${username}/.config/swaync/style.css".text = ''
"/home/${username}/.config/swaync/style.css".text = '' @import "../../.cache/wal/colors-waybar.css";
* {
all: unset;
font-size: 14px;
font-family: "GohuFont 14 Nerd Font Mono";
transition: 200ms;
}
trough highlight { @define-color text @foreground;
background: #cdd6f4; @define-color bg @color1;
} @define-color selected @color6;
@define-color hover alpha(@selected, .4);
scale trough { * {
margin: 0rem 1rem; outline: none;
background-color: #313244; transition: 200ms;
min-height: 8px; padding: 1px;
min-width: 70px; background: transparent;
} }
slider { .notification-row {
background-color: #89b4fa; outline: none;
} margin: 0;
padding: 0px;
}
.floating-notifications.background .notification-row .notification-background { .notification-row .notification-background .close-button {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; /* The notification Close Button */
margin: 18px; background: transparent;
background-color: #000000; color: @text;
color: #cdd6f4; text-shadow: none;
padding: 0; box-shadow: none;
} margin-top: 2px;
margin-right: 2px;
padding: 0;
border: none;
border-radius: 100%;
min-width: 24px;
min-height: 24px;
}
.floating-notifications.background .notification-row .notification-background .notification { .notification-row .notification-background .close-button:hover {
padding: 7px; box-shadow: none;
} background: transparent;
transition: background 0.15s ease-in-out;
border: 0px;
}
.floating-notifications.background .notification-row .notification-background .notification.critical { .notification-row .notification-background .notification {
box-shadow: inset 0 0 7px 0 #f38ba8; /* The actual notification */
} background: transparent;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content { .notification-group .notification-group-headers {
margin: 7px; /* Notficiation Group Headers */
} margin-top: 10px;
margin-bottom: 10px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary { .notification-group .notification-group-headers .notification-group-header {
color: #cdd6f4; font-size: 20px;
} margin-left: 3px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time { .notification-group.collapsed .notification-row .notification {
color: #a6adc8; background: alpha(@background, 0.55);
} }
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body { .control-center {
color: #cdd6f4; /* The Control Center which contains the old notifications + widgets */
} margin: 18px;
padding: 14px;
box-shadow: 0px 2px 5px black;
background: alpha(@background, 0.55);
border: 2px solid @selected;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * { .control-center-clear-all {
min-height: 3.4em; /* Clear All button */
} background: transparent;
padding: 5px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action { .control-center-clear-all:hover {
color: #cdd6f4; background: @hover;
background-color: #000000; }
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { .control-center-clear-all:active {
box-shadow: inset 0 0 0 1px #45475a; background: @selected;
background-color: #000000; }
color: #cdd6f4;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active { /*** Widgets ***/
box-shadow: inset 0 0 0 1px #45475a; /* Title widget */
background-color: #000000; .widget-title {
color: #cdd6f4; background: transparent;
} margin-top: 15px;
margin-left: 15px;
margin-right: 15px;
}
.floating-notifications.background .notification-row .notification-background .close-button { /* Do Not Disturb widget */
margin: 7px; .widget-dnd {
padding: 2px; background: transparent;
color: #1e1e2e; margin-left: 15px;
background-color: #000000; margin-right: 15px;
} }
.floating-notifications.background .notification-row .notification-background .close-button:hover { .widget-dnd > switch {
background-color: #000000; background: @bg;
color: #1e1e2e; font-size: initial;
} border-radius: 12px;
box-shadow: none;
padding: 2px;
}
.floating-notifications.background .notification-row .notification-background .close-button:active { /* Media Player widget */
background-color: #000000; @define-color mpris-album-art-overlay rgba(0, 0, 0, 0.55);
color: #1e1e2e; @define-color mpris-button-hover rgba(0, 0, 0, 0.50);
}
.control-center { .widget-mpris {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; }
margin: 18px;
background-color: #000000;
color: #cdd6f4;
padding: 14px;
}
.control-center .widget-title > label { .widget-mpris .widget-mpris-player {
color: #cdd6f4; padding: 10px;
font-size: 1.3em; margin: 8px 15px;
} /* background-color: @mpris-album-art-overlay; */
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.75);
border: 2px;
}
.control-center .widget-title button { .widget-mpris .widget-mpris-player .widget-mpris-title {
color: #cdd6f4; font-size: 16px;
background-color: #313244; }
box-shadow: inset 0 0 0 1px #45475a;
padding: 8px;
}
.control-center .widget-title button:hover { .widget-mpris .widget-mpris-player .widget-mpris-subtitle {
box-shadow: inset 0 0 0 1px #45475a; font-size: 14px;
background-color: #585b70; }
color: #cdd6f4;
}
.control-center .widget-title button:active { /* Buttons widget */
box-shadow: inset 0 0 0 1px #45475a; .widget-buttons-grid {
background-color: #74c7ec; /* background-color: alpha(@color2, 0.5); */
color: #1e1e2e; }
}
.control-center .notification-row .notification-background { .widget-buttons-grid > flowbox > flowboxchild > button {
color: #cdd6f4; /* background: alpha(@color2, 0.5); */
background-color: #313244; /* border-radius: 12px; */
box-shadow: inset 0 0 0 1px #45475a; min-width: 45px;
margin-top: 14px; }
}
.control-center .notification-row .notification-background .notification { .control-center .notification-row .notification-background .notification {
padding: 7px; padding: 10px;
} }
.control-center .notification-row .notification-background .notification.critical { .floating-notifications.background .notification-row .notification-background .close-button {
box-shadow: inset 0 0 7px 0 #f38ba8; margin: 10px;
} padding: 2px;
}
.control-center .notification-row .notification-background .notification .notification-content { .floating-notifications.background .notification-row .notification-background {
margin: 7px; margin: 18px;
} padding: 0;
}
.control-center .notification-row .notification-background .notification .notification-content .summary { .floating-notifications.background .notification-row .notification-background .notification {
color: #cdd6f4; padding: 7px;
} }
'';
.control-center .notification-row .notification-background .notification .notification-content .time {
color: #a6adc8;
}
.control-center .notification-row .notification-background .notification .notification-content .body {
color: #cdd6f4;
}
.control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
color: #cdd6f4;
background-color: #11111b;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
color: #1e1e2e;
background-color: #eba0ac;
}
.close-button {
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center .notification-row .notification-background .close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #7f849c;
color: #cdd6f4;
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.notification.critical progress {
background-color: #f38ba8;
}
.notification.low progress,
.notification.normal progress {
background-color: #89b4fa;
}
.control-center-dnd {
margin-top: 5px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.control-center-dnd:checked {
background: #313244;
}
.control-center-dnd slider {
background: #45475a;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #313244;
}
.widget-dnd > switch slider {
background: #45475a;
border: 1px solid #6c7086;
}
.widget-mpris .widget-mpris-player {
background: #313244;
padding: 7px;
}
.widget-mpris .widget-mpris-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: #f38ba8;
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: #313244;
}
.control-center .widget-label > label {
color: #cdd6f4;
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: #74c7ec;
}
.widget-volume trough highlight {
background: #74c7ec;
}
.widget-backlight trough highlight {
background: #f9e2af;
}
.widget-backlight scale {
margin-right: 1rem;
}
.widget-backlight label {
font-size: 1.5rem;
color: #f9e2af;
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
'';
};
}; };
} }