reconfigure swaync

This commit is contained in:
Adithya 2024-05-19 15:58:14 +05:30
parent 6c4f1338b9
commit f9d77aa137
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 243 additions and 234 deletions

View file

@ -1,55 +1,50 @@
_: { { pkgs, ... }: {
services.swaync = { services.swaync = {
enable = true; enable = true;
settings = { settings = {
"positionX" = "right"; positionX = "right";
"positionY" = "top"; positionY = "top";
"control-center-margin-top" = 20; layer = "overlay";
"control-center-margin-bottom" = 0; control-center-margin-top = 0;
"control-center-margin-right" = 20; control-center-margin-bottom = 0;
"control-center-margin-left" = 0; control-center-margin-right = 0;
"control-center-width" = 500; control-center-margin-left= 0;
"control-center-height" = 600; control-center-layer = "overlay";
"fit-to-screen" = false; timeout = 10;
timeout-low = 5;
timeout-critical = 0;
notification-window-width = 500;
keyboard-shortcuts = true;
image-visibility = "when-available";
fit-to-screen = true;
control-center-width = 500;
transition-time = 50;
hide-on-clear = true;
hide-on-action = true;
script-fail-notify = true;
"layer" = "top"; widgets = [
"cssPriority" = "user";
"notification-icon-size" = 64;
"notification-body-image-height" = 100;
"notification-body-image-width" = 200;
"timeout" = 10;
"timeout-low" = 5;
"timeout-critical" = 0;
"notification-window-width" = 500;
"keyboard-shortcuts" = true;
"image-visibility" = "when-available";
"transition-time" = 200;
"hide-on-clear" = true;
"hide-on-action" = true;
"script-fail-notify" = true;
"widgets" = [
"title" "title"
"dnd" "dnd"
"mpris" "mpris"
"notifications" "notifications"
]; ];
"widget-config" = { widget-config = {
"title" = { title = {
"text" = "Notifications"; text = "Notifications";
"clear-all-button" = true; clear-all-button = true;
"button-text" = "Clear All"; button-text = "󰆴 Clear";
}; };
"dnd" = { dnd = {
"text" = "Do Not Disturb"; text = "Do Not Disturb";
}; };
"label" = { label = {
"max-lines" = 5; max-lines = 5;
"text" = "Label Text"; text = "Notifications";
}; };
"mpris" = { mpris = {
"image-size" = 96; image-size = 96;
"image-radius" = 12; image-radius = 12;
}; };
}; };
}; };

View file

@ -1,297 +1,311 @@
/* Dracula Theme */ @define-color cc-bg rgba(26, 27, 38, 1);
@define-color foreground rgb(248, 248, 242); @define-color noti-border-color rgba(255, 255, 255, 0.15);
@define-color background rgb(40, 42, 54); @define-color noti-bg rgb(17, 17, 27);
@define-color background-alpha rgba(40, 42, 54, 0.8); @define-color noti-bg-darker rgb(43, 43, 57);
@define-color accent rgba(189, 147, 249, 0.8); @define-color noti-bg-hover rgb(27, 27, 43);
@define-color current-line rgb(68, 71, 90); @define-color noti-bg-focus rgba(27, 27, 27, 0.6);
@define-color comment rgb(98, 114, 164); @define-color noti-close-bg rgba(255, 255, 255, 0.1);
@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15);
@define-color text-color rgba(169, 177, 214, 1);
@define-color text-color-disabled rgb(150, 150, 150);
@define-color bg-selected rgb(0, 128, 255);
.notification-row { * {
transition: all 200ms ease; font-family: JetBrainsMono NFM SemiBold;
outline: none;
margin-bottom: 4px;
margin-right: 13px;
margin-top: 8px;
border-radius: 80px;
} }
.control-center .notification-row:focus, .control-center .notification-row:focus,
.control-center .notification-row:hover { .control-center .notification-row:hover {
opacity: 1; opacity: 1;
background: transparent; background: @noti-bg-darker;
} }
.notification-row:focus .notification, .notification-row {
.notification-row:hover .notification { outline: none;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5); margin: 0px;
border: 0px solid @accent; padding: 0px;
background: @current-line;
}
.control-center .notification {
box-shadow: none;
}
.control-center .notification-row {
opacity: 0.5;
margin: -5px;
} }
.notification { .notification {
transition: all 200ms ease; background: @cc-bg;
border-radius: 8px; border: 2px solid #34548a;
margin: 12px 7px 0px 7px; border-radius: 5px;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5); margin: 3px -2px 3px 0px;
padding: 0;
} }
/* Uncomment to enable specific urgency colors
.low {
background: yellow;
padding: 6px;
border-radius: 12px;
}
.normal {
background: green;
padding: 6px;
border-radius: 12px;
}
.critical {
background: red;
padding: 6px;
border-radius: 12px;
}
*/
.notification-content { .notification-content {
background: transparent; background: @cc-bg;
padding: 6px; }
border-radius: 8px;
.notification-default-action {
margin: 0;
padding: 0;
border-radius: 5px;
} }
.close-button { .close-button {
background: @current-line; background: #f7768e;
color: @foreground; color: @cc-bg;
text-shadow: none; text-shadow: none;
padding: 0; padding: 0px;
border-radius: 100%; border-radius: 5px;
margin-top: 17px; margin-top: 5px;
margin-right: 10px; margin-right: 5px;
box-shadow: none;
border: none;
min-width: 24px;
min-height: 24px;
} }
.close-button:hover { .close-button:hover {
box-shadow: none; box-shadow: none;
background: @comment; background: #f7768e;
transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out;
border: none; border: none;
} }
.notification-default-action,
.notification-action { .notification-action {
padding: 4px; border: 2px solid #34548a;
margin: 0; border-top: none;
box-shadow: none; border-radius: 5px;
background: @current-line;
border: 2px solid @accent;
color: @foreground;
} }
.notification-default-action:hover, .notification-default-action:hover,
.notification-action:hover { .notification-action:hover {
-gtk-icon-effect: none; color: #7aa2f7;
background: @current-line; background: @cc-bg;
} }
.notification-default-action { .notification-default-action {
border-radius: 8px; border-radius: 5px;
margin: 0px;
} }
/* When alternative actions are visible */
.notification-default-action:not(:only-child) { .notification-default-action:not(:only-child) {
border-bottom-left-radius: 0px; border-bottom-left-radius: 7px;
border-bottom-right-radius: 0px; border-bottom-right-radius: 7px;
} }
.notification-action {
border-radius: 0px;
border-top: none;
border-right: none;
}
/* add bottom border radius to eliminate clipping */
.notification-action:first-child { .notification-action:first-child {
border-bottom-left-radius: 8px; border-bottom-left-radius: 10px;
background: #1b1b2b;
} }
.notification-action:last-child { .notification-action:last-child {
border-bottom-right-radius: 8px; border-bottom-right-radius: 10px;
border-right: 1px solid @accent; background: #1b1b2b;
}
.inline-reply {
margin-top: 8px;
}
.inline-reply-entry {
background: @noti-bg-darker;
color: @text-color;
caret-color: @text-color;
border: 1px solid @noti-border-color;
border-radius: 5px;
}
.inline-reply-button {
margin-left: 4px;
background: @noti-bg;
border: 1px solid @noti-border-color;
border-radius: 5px;
color: @text-color;
}
.inline-reply-button:disabled {
background: initial;
color: @text-color-disabled;
border: 1px solid transparent;
}
.inline-reply-button:hover {
background: @noti-bg-hover;
} }
.image { .image {
} border-radius: 5px;
margin-right: 10px;
.body-image {
margin-top: 6px;
background-color: @foreground;
border-radius: 8px;
} }
.summary { .summary {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: 700;
background: transparent; background: transparent;
color: @foreground; color: rgba(158, 206, 106, 1);
text-shadow: none; text-shadow: none;
} }
.time { .time {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: 700;
background: transparent; background: transparent;
color: @foreground; color: @text-color;
text-shadow: none; text-shadow: none;
margin-right: 18px; margin-right: 18px;
} }
.body { .body {
font-size: 15px; font-size: 15px;
font-weight: normal; font-weight: 400;
background: transparent; background: transparent;
color: @foreground; color: @text-color;
text-shadow: none; text-shadow: none;
} }
/* The "Notifications" and "Do Not Disturb" text widget */
.top-action-title {
color: @foreground;
text-shadow: none;
}
.control-center-clear-all {
color: @foreground;
text-shadow: none;
background: @background;
border: 2px solid @accent;
box-shadow: none;
border-radius: 8px;
}
.control-center-clear-all:hover {
background: @background;
}
.control-center-dnd {
border-radius: 8px;
background: @background;
border: 1px solid @accent;
box-shadow: none;
}
.control-center-dnd:checked {
background: @accent;
}
.control-center-dnd slider {
background: @background;
border-radius: 8px;
}
.control-center { .control-center {
background: @background-alpha; background: @cc-bg;
border-radius: 10px; border: 2px solid #34548a;
background-clip: border-box; border-radius: 5px;
padding: 4px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
0 2px 6px 2px rgba(0, 0, 0, 0.3);
color: @foreground;
border: 2px solid @accent;
} }
.control-center-list { .control-center-list {
background: transparent; background: transparent;
} }
.control-center-list-placeholder {
opacity: 0.5;
}
.floating-notifications { .floating-notifications {
background: transparent; background: transparent;
} }
/* Window behind control center and on all other monitors */
.blank-window { .blank-window {
background: transparent; background: alpha(black, 0.1);
} }
/*** Widgets ***/
/* Title widget */
.widget-title { .widget-title {
margin: 8px; color: #7aa2f7;
background: @noti-bg-darker;
padding: 5px 10px;
margin: 10px 10px 5px 10px;
font-size: 1.5rem; font-size: 1.5rem;
border-radius: 5px;
} }
.widget-title>button { .widget-title>button {
font-size: initial; font-size: 1rem;
color: @foreground; color: @text-color;
text-shadow: none; text-shadow: none;
background: @background; background: @noti-bg;
border: 2px solid @accent;
box-shadow: none; box-shadow: none;
border-radius: 8px; border-radius: 5px;
} }
.widget-title>button:hover { .widget-title>button:hover {
background: @background; background: #f7768e;
color: @cc-bg;
} }
/* DND widget */
.widget-dnd { .widget-dnd {
margin: 8px; background: @noti-bg-darker;
font-size: 1.1rem; padding: 5px 10px;
margin: 5px 10px;
border-radius: 5px;
font-size: large;
color: #7aa2f7;
} }
.widget-dnd>switch { .widget-dnd>switch {
font-size: initial; border-radius: 5px;
border-radius: 8px; background: #7aa2f7;
background: @background;
border: 1px solid @accent;
box-shadow: none;
} }
.widget-dnd>switch:checked { .widget-dnd>switch:checked {
background: @accent; background: #f7768e;
} border: 1px solid #f7768e;
.widget-dnd > switch slider { }
background: @background;
border-radius: 8px; .widget-dnd>switch slider,
border: 1px solid @foreground; .widget-dnd>switch:checked slider {
background: @cc-bg;
border-radius: 5px;
} }
/* Label widget */
.widget-label { .widget-label {
margin: 8px; margin: 10px 10px 5px 10px;
} }
.widget-label > label {
font-size: 1.1rem; .widget-label>label {
font-size: 1rem;
color: @text-color;
} }
/* Mpris widget */
.widget-mpris { .widget-mpris {
/* The parent to all players */ color: @text-color;
background: @noti-bg-darker;
padding: 5px 10px;
margin: 5px 10px 5px 10px;
border-radius: 5px;
} }
.widget-mpris>box>button {
border-radius: 5px;
}
.widget-mpris-player { .widget-mpris-player {
padding: 8px; padding: 5px 10px;
margin: 8px; margin: 10px;
background-color: @background;
border-radius: 8px;
border: 2px solid @accent;
color: @foreground;
} }
.widget-mpris-title { .widget-mpris-title {
font-weight: bold; font-weight: 700;
font-size: 1.25rem; font-size: 1.25rem;
} }
.widget-mpris-subtitle { .widget-mpris-subtitle {
font-size: 1.1rem; font-size: 1.1rem;
} }
.widget-buttons-grid {
font-size: x-large;
padding: 5px;
margin: 5px 10px 10px 10px;
border-radius: 5px;
background: @noti-bg-darker;
}
.widget-buttons-grid>flowbox>flowboxchild>button {
margin: 3px;
background: @cc-bg;
border-radius: 5px;
color: @text-color;
}
.widget-buttons-grid>flowbox>flowboxchild>button:hover {
background: rgba(122, 162, 247, 1);
color: @cc-bg;
}
.widget-buttons-grid>flowbox>flowboxchild>button:checked {
background: rgb(158, 206, 106);
color: @cc-bg;
}
.widget-menubar>box>.menu-button-bar>button {
border: none;
background: transparent;
}
.topbar-buttons>button {
border: none;
background: transparent;
}
.widget-volume {
background: @noti-bg-darker;
padding: 5px;
margin: 5px 10px;
border-radius: 5px;
font-size: 2rem;
color: #7aa2f7;
}
.widget-backlight {
background: @noti-bg-darker;
padding: 5px;
margin: 5px 10px;
border-radius: 5px;
font-size: 2rem;
color: #7aa2f7;
}