From 8b990839b1f3013d211de1257ac45dd13c394f31 Mon Sep 17 00:00:00 2001 From: Nikolai Papin Date: Wed, 17 Sep 2025 00:13:25 +0300 Subject: [PATCH] feat: very nice swaync config --- swaync/config.json | 32 ++++++++++++++++++++++++-------- swaync/style.css | 24 +++++++++++++++++++++++- 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/swaync/config.json b/swaync/config.json index 05a1c08..f1227db 100644 --- a/swaync/config.json +++ b/swaync/config.json @@ -1,6 +1,6 @@ { "$schema": "/etc/xdg/swaync/configSchema.json", - "ignore-gtk-theme": false, + "ignore-gtk-theme": true, "positionX": "right", "positionY": "top", "layer": "overlay", @@ -51,10 +51,13 @@ } }, "widgets": [ - "inhibitors", "title", + "buttons-grid", + "volume", + "inhibitors", "dnd", - "notifications" + "notifications", + "mpris" ], "widget-config": { "inhibitors": { @@ -63,16 +66,16 @@ "clear-all-button": true }, "title": { - "text": "Notifications", + "text": "Kolinux v1.0", "clear-all-button": true, - "button-text": "Purge" + "button-text": "Purge notifications" }, "dnd": { "text": "Don't bother" }, "label": { - "max-lines": 5, - "text": "Label Text" + "max-lines": 1, + "text": "Kolinux 1.0" }, "mpris": { "blacklist": [], @@ -84,12 +87,25 @@ "buttons-per-row": 7, "actions": [ { - "label": "直", + "label": "󰘊", "type": "toggle", "active": true, "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'", "update-command": "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'" + }, + { + "label": "󰂯", + "type": "toggle", + "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && bluetoothctl power on || bluetoothctl power off'", + "update-command": "sh -c \'bluetoothctl show | awk \\\"/Powered/ {print \\$2}\\\" | grep -q yes && echo true || echo false\'" + }, + { + "label": "󰦝", + "type": "toggle", + "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && mullvad connect || mullvad disconnect'", + "update-command": "sh -c '[[ $(mullvad status | grep -e Connected ) == \"Connected\" ]] && echo true || echo false'" } + ] } } diff --git a/swaync/style.css b/swaync/style.css index 2873f83..04aac43 100644 --- a/swaync/style.css +++ b/swaync/style.css @@ -17,7 +17,8 @@ } * { - font: "JetBrains Mono Nerd Font 10"; + font-family: "JetBrains Mono Nerd Font"; + font-size: 16px; } .close-button { @@ -359,6 +360,11 @@ margin: 8px; } +.widget-dnd switch:checked { + background: var(--noti-bg-focus); +} + + .widget-dnd switch slider { border-radius: 12px; } @@ -437,6 +443,7 @@ /* Buttons widget */ .widget-buttons-grid { + min-height: 50px; padding: 8px; margin: 8px; border-radius: 12px; @@ -444,10 +451,21 @@ .widget-buttons-grid flowboxchild > button { border-radius: 12px; + height: auto; +} + +.widget-buttons-grid flowboxchild > button.toggle > * { + font-size: 36px; } .widget-buttons-grid flowboxchild > button.toggle:checked { /* style given to the active toggle button */ + background-color: var(--noti-bg-focus); +} + +.widget-buttons-grid flowboxchild > button.toggle:hover { + /* style given to the active toggle button */ + background-color: var(--bg-selected); } /* Menubar widget */ @@ -510,6 +528,10 @@ border-radius: 12px; } +.widget-volume trough highlight { + background: var(--noti-bg-focus); +} + /* Each row app icon */ .widget-volume row image { -gtk-icon-size: var(--widget-volume-row-icon-size);