From 2e7a05c3ce5ea6346c0702bc688bcfec8404eb94 Mon Sep 17 00:00:00 2001 From: Derisis13 Date: Sat, 2 Nov 2024 23:22:27 +0100 Subject: [PATCH] feat: swaync config based on Kosmx's config --- swaync/config.json | 101 ++++++++++++ swaync/style.css | 354 +++++++++++++++++++++++++++++++++++++++++++ swaync/style.css.bak | 314 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 769 insertions(+) create mode 100755 swaync/config.json create mode 100644 swaync/style.css create mode 100755 swaync/style.css.bak diff --git a/swaync/config.json b/swaync/config.json new file mode 100755 index 0000000..6d6fa27 --- /dev/null +++ b/swaync/config.json @@ -0,0 +1,101 @@ +{ + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "control-center-margin-top": 2, + "control-center-margin-bottom": 2, + "control-center-margin-right": 1, + "control-center-margin-left": 0, + "notification-icon-size": 48, + "notification-body-image-height": 160, + "notification-body-image-width": 90, + "timeout": 6, + "timeout-low": 4, + "timeout-critical": 0, + "fit-to-screen": true, + "control-center-width": 380, + "notification-window-width": 366, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 100, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "notification-visibility": { + "example-name": { + "state": "muted", + "urgency": "Low", + "app-name": "Spotify" + } + }, + "widgets": [ + "label", + "menubar", + "mpris", + "backlight", + "volume", + "title", + "dnd", + "notifications" + ], + "widget-config": { + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "label": { + "max-lines": 1, + "text": "Controll Center" + }, + "mpris": { + "image-size": 96, + "image-radius": 6 + }, + "backlight": { + "label": "", + "device": "intel_backlight", + "min": 10 + }, + "volume": { + "label": "" + }, + "menubar": { + "menu#power-buttons": { + "label": "", + "position": "right", + "actions": [ + { + "label": " Reboot", + "command": "systemctl reboot" + }, + { + "label": " Lock", + "command": "hyprlock -c $XDG_CONFIG_HOME/hypr/hyprlock.conf --immediate" + }, + { + "label": " Logout", + "command": "loginctl terminate-session ${XDG_SESSION_ID-}" + }, + { + "label": " Shut down", + "command": "systemctl poweroff" + } + ] + }, + "menu#app-launcher": { + "label": "󰍜", + "position": "right", + "actions": [ + { + "label": "", + "command": "nm-connection-editor" + } + ] + } + } + } + } diff --git a/swaync/style.css b/swaync/style.css new file mode 100644 index 0000000..114fa6f --- /dev/null +++ b/swaync/style.css @@ -0,0 +1,354 @@ +* { + all: unset; + font-size: 14px; + font-family: FontAwesome, "FiraSans Book"; + transition: 200ms; +} + +trough highlight { + background: #cad3f5; +} + +scale trough { + margin: 0rem 1rem; + background-color: #363a4f; + min-height: 8px; + min-width: 70px; +} + +slider { + background-color: #8aadf4; +} + +.floating-notifications.background .notification-row .notification-background { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f; + border-radius: 12.6px; + border: 1px solid #8aadf4; + margin: 18px; + background-color: #24273a; + color: #cad3f5; + padding: 0; +} + +.floating-notifications.background .notification-row .notification-background .notification { + padding: 7px; + border-radius: 12.6px; + border: 1px solid #8aadf4; +} + +.floating-notifications.background .notification-row .notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #ed8796; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content { + padding-left: 7px; + margin: 7px; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary { + color: #cad3f5; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content .time { + color: #a5adcb; +} + +.time { + font-size: 13px; + font-weight: bold; + background: transparent; + text-shadow: none; + margin-right: 18px; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content .body { + color: #cad3f5; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * { + min-height: 3.4em; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action { + border-radius: 7px; + color: #cad3f5; + background-color: #363a4f; + box-shadow: inset 0 0 0 1px #494d64; + margin: 7px; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #363a4f; + color: #cad3f5; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #7dc4e4; + color: #cad3f5; +} + +.floating-notifications.background .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #24273a; + background-color: #ed8796; +} + +.floating-notifications.background .notification-row .notification-background .close-button:hover { + background-color: #ee99a0; + color: #24273a; +} + +.floating-notifications.background .notification-row .notification-background .close-button:active { + background-color: #ed8796; + color: #24273a; +} + +.control-center { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f; + border-radius: 12.6px; + border: 1px solid #8aadf4; + margin: 18px; + background-color: #24273a; + color: #cad3f5; + padding: 14px; +} + +.control-center .widget-title > label { + color: #cad3f5; + font-size: 1.3em; +} + +.control-center .widget-title button { + border-radius: 7px; + color: #cad3f5; + background-color: #363a4f; + box-shadow: inset 0 0 0 1px #494d64; + padding: 8px; +} + +.control-center .widget-title button:hover { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #5b6078; + color: #cad3f5; +} + +.control-center .widget-title button:active { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #7dc4e4; + color: #24273a; +} + +.control-center .notification-row .notification-background { + border-radius: 7px; + border: 1px solid #8aadf4; + color: #cad3f5; + background-color: #363a4f; + box-shadow: inset 0 0 0 1px #494d64; + margin-top: 14px; +} + +.control-center .notification-row .notification-background .notification { + padding: 7px; + border-radius: 7px; +} + +.control-center .notification-row .notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #ed8796; +} + +.control-center .notification-row .notification-background .notification .notification-content { + margin: 7px; +} + +.control-center .notification-row .notification-background .notification .notification-content .summary { + color: #cad3f5; +} + +.control-center .notification-row .notification-background .notification .notification-content .time { + color: #a5adcb; +} + +.control-center .notification-row .notification-background .notification .notification-content .body { + color: #cad3f5; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * { + min-height: 3.4em; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action { + border-radius: 7px; + color: #cad3f5; + background-color: #181926; + box-shadow: inset 0 0 0 1px #494d64; + margin: 7px; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #363a4f; + color: #cad3f5; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #7dc4e4; + color: #cad3f5; +} + +.control-center .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #24273a; + background-color: #ee99a0; +} + +.close-button { + border-radius: 6.3px; +} + +.control-center .notification-row .notification-background .close-button:hover { + background-color: #ed8796; + color: #24273a; +} + +.control-center .notification-row .notification-background .close-button:active { + background-color: #ed8796; + color: #24273a; +} + +.control-center .notification-row .notification-background:hover { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #8087a2; + color: #cad3f5; +} + +.control-center .notification-row .notification-background:active { + box-shadow: inset 0 0 0 1px #494d64; + background-color: #7dc4e4; + color: #cad3f5; +} + +.notification.critical progress { + background-color: #ed8796; +} + +.notification.low progress, +.notification.normal progress { + background-color: #8aadf4; +} + +.control-center-dnd { + margin-top: 5px; + border-radius: 8px; + background: #363a4f; + border: 1px solid #494d64; + box-shadow: none; +} + +.control-center-dnd:checked { + background: #363a4f; +} + +.control-center-dnd slider { + background: #494d64; + border-radius: 8px; +} + +.widget-dnd { + margin: 0px; + font-size: 1.1rem; +} + +.widget-dnd > switch { + font-size: initial; + border-radius: 8px; + background: #363a4f; + border: 1px solid #494d64; + box-shadow: none; +} + +.widget-dnd > switch:checked { + background: #363a4f; +} + +.widget-dnd > switch slider { + background: #494d64; + border-radius: 8px; + border: 1px solid #6e738d; +} + +.widget-mpris .widget-mpris-player { + /* background: #363a4f; */ + /* padding: 7px; */ +} + +.widget-mpris .widget-mpris-title { + font-size: 1rem; +} + +.widget-mpris .widget-mpris-subtitle { + font-size: 0.8rem; +} + +.widget-menubar > box > .menu-button-bar > button > label { + font-size: 2rem; + padding: 0.5rem 2rem; +} + +.widget-menubar > box > .menu-button-bar > :last-child { + color: #ed8796; +} + +.power-buttons button:hover, +.powermode-buttons button:hover, +.screenshot-buttons button:hover { + background: #363a4f; +} + +.app-launcher>button, +.power-buttons>button{ + background: transparent; + padding: 2px 0px; + margin: 5px 70px 3px; +} + +.control-center .widget-label > label { + color: #cad3f5; + font-size: 16px; +} + +.widget-buttons-grid { + padding-top: 1rem; +} + +.widget-buttons-grid > flowbox > flowboxchild > button label { + font-size: 1rem; +} + +.widget-volume label { + font-size: 1.5rem; + color: #7dc4e4; +} + +.widget-volume trough highlight { + background: #7dc4e4; +} + +.widget-backlight trough highlight { + background: #eed49f; +} + +.widget-backlight label { + font-size: 1.5rem; + color: #eed49f; +} + +.widget-backlight .KB { + padding-bottom: 1rem; +} diff --git a/swaync/style.css.bak b/swaync/style.css.bak new file mode 100755 index 0000000..3214fce --- /dev/null +++ b/swaync/style.css.bak @@ -0,0 +1,314 @@ +/* the orinal source: https://gist.github.com/Kvn0l/4f0470ef312e4c74284755259a8d41f5 */ + +@define-color noti-border-color #33b1ff; +@define-color noti-bg rgba(16, 16, 16, 0.8); +@define-color noti-bg-hover-alt #33b1ff; +@define-color noti-bg-alt rgba(16, 16, 16, 0.8); +@define-color noti-fg #FFFFFF; +@define-color noti-bg-hover #161616; +@define-color noti-bg-focus rgba(16, 16, 16, 0.8); +@define-color noti-close-bg rgba(16, 16, 16, 0.8); +@define-color noti-close-bg-hover #161616; +@define-color noti-urgent rgba(209, 69, 72, 0.8); +@define-color bg-selected #33b1ff; + +*{ + font-family: FontAwesome, "FiraSans Book"; + color: @noti-fg; + border-radius: 8px; + border: none; +} + +.notification-row { + outline: none; +} + +.notification-row:focus { + background: transparent; +} + +.notification { + border: 1px solid @noti-border-color; + border-radius: 8px; + margin: 6px 12px; + box-shadow: none; + padding: 0; +} + +/* Uncomment to enable specific urgency colors */ +/* .low { + background: yellow; +} +.normal { + background: green; +} */ + +.critical { + border: 1px solid @noti-urgent; +} + + +.notification-content { + background: transparent; + padding: 6px; + border: none; + border-radius: 8px; +} + +.close-button { + background: @noti-close-bg; + color: white; + text-shadow: none; + padding: 0; + border-radius: 100%; + margin-top: 10px; + margin-right: 16px; + box-shadow: none; + border: none; + min-width: 24px; + min-height: 24px; +} + +.close-button:hover { + box-shadow: none; + background: @noti-close-bg-hover; + transition: all 0.15s ease-in-out; + border: none; +} + +.notification-default-action, +.notification-action { + padding: 4px; + margin: 0; + box-shadow: none; + background: @noti-bg; + color: @noti-fg; +} + +.notification-default-action:hover, +.notification-action:hover { + -gtk-icon-effect: none; + background: @noti-bg-alt; +} + +/* 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: 8px; +} + +.notification-action:last-child { + border-bottom-right-radius: 8px; +} + +.image {} + +.body-image { + margin-top: 6px; + background-color: @noti-fg; + border-radius: 6px; +} + +.summary { + font-size: 14px; + font-weight: bold; + background: transparent; + color: @noti-fg; + text-shadow: none; +} + +.time { + font-size: 13px; + font-weight: bold; + background: transparent; + color: @noti-fg; + text-shadow: none; + margin-right: 18px; +} + +.body { + font-size: 12px; + font-weight: normal; + background: transparent; + color: @noti-fg; + text-shadow: none; +} + +/* The "Notifications" and "Do Not Disturb" text widget */ +.top-action-title { + color: @noti-fg; + text-shadow: none; +} + +.control-center { + background-color: @noti-bg-alt; + border-radius: 12px; + border: 1px solid @bg-selected; +} + +.control-center-list { + background: transparent; +} + +.floating-notifications { + background: transparent; + border-radius: 8px; +} + +/* Window behind control center and on all other monitors */ +.blank-window { + background: transparent; +} + +/*** Widgets ***/ + +/* Title widget */ +.widget-title { + margin: 8px; + font-size: 16px; +} + +.widget-title>button { + font-size: initial; + color: @noti-fg; + text-shadow: none; + background: @noti-bg; + border: 1px solid @noti-border-color; + box-shadow: none; + border-radius: 8px; +} + +.widget-title>button:hover { + background: @noti-bg-hover; +} + +/* DND widget */ +.widget-dnd { + margin: 8px; + font-size: 1.1rem; +} + +.widget-dnd>switch { + font-size: initial; + border-radius: 4px; + background: @noti-bg; + border: 1px solid @noti-border-color; + box-shadow: none; +} + +.widget-dnd>switch:checked { + background: @bg-selected; +} + +.widget-dnd>switch slider { + background: @noti-bg-hover; + border-radius: 4px; +} + +/* Label widget */ +.widget-label { + margin: 4px 8px 8px; +} + +.widget-label>label { + font-size: 16px; +} + +/* Mpris widget */ +.widget-mpris { + /* The parent to all players */ +} + +.widget-mpris-player { + padding: 8px; + margin: 8px; +} + +.widget-mpris-title { + font-weight: bold; + font-size: 1.25rem; +} + +.widget-mpris-subtitle { + font-size: 1.1rem; +} + +/* Volume and Brightness Widget*/ + +.widget-volume { + background-color: @noti-bg; + padding: 4px 4px 4px 20px; + margin: 0px 8px 8px 8px; + font-size: 14px; + border-radius: 0 0 8px 8px; +} + +.widget-backlight { + background-color: @noti-bg; + padding: 4px 4px 4px 20px; + margin: 0px 8px 0px 8px; + border-radius: 0px; + font-size: 14px; +} + +.widget-menubar>box{ + padding: 8px 0px 4px; + margin: 0px 8px; + border-radius: 8px 8px 0px 0px; + background-color: @noti-bg; +} + +.widget-menubar>box>.menu-button-bar>button{ + border: 1px solid @noti-border-color; + background: @noti-bg; + border-radius: 4px; + margin: 4px 12px; +} + +.widget-buttons-grid{ + padding: 0px 8px 8px; + margin: 0px 8px 8px; + border-radius: 0px 0px 4px 4px; + background-color: @noti-bg; + font-size: 14px; +} + +.widget-buttons-grid>flowbox>flowboxchild>button{ + background: @noti-bg; + border-radius: 4px; +} + +.widget-buttons-grid>flowbox>flowboxchild>button:hover { + background: @noti-bg-hover; +} + +.app-launcher, +.power-buttons { + border-radius: 4px; +} + +.app-launcher>button, +.power-buttons>button{ + background: transparent; + padding: 2px 0px; + margin: 5px 70px 3px; + border: 1px solid @noti-border-color; +} + +.screenshot-buttons>button:hover, +.screencast-buttons>button:hover, +.powermode-buttons>button:hover, +.power-buttons>button:hover{ + background: @noti-bg-hover; +}