feat(swaync): add screenshot button, better styles, per-app volume

This commit is contained in:
retrozinndev
2024-10-10 21:29:01 -03:00
parent 1c8acd0843
commit 682d04a858
3 changed files with 47 additions and 22 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
@import "../../.cache/wal/colors-swaync.css"; @import "../../.cache/wal/colors-swaync.css";
@define-color highlight @color1; @define-color highlight @color1;
@define-color bg-slider shade(@highlight, .2); @define-color bg-slider shade(@color1, .2);
@define-color bg-button shade(@highlight, .72); @define-color bg-button shade(@highlight, .72);
@define-color background-alt shade(@color2, .6); @define-color background-alt shade(@color2, .6);
@define-color hover shade(@highlight, .6); @define-color hover shade(@highlight, .6);
+12 -4
View File
@@ -79,7 +79,10 @@
}, },
"volume": { "volume": {
"label": "", "label": "",
"collapse-button-label": "⇩" "show-per-app": true,
"show-per-app-icon": true,
"expand-button-label": "",
"collapse-button-label": ""
}, },
"backlight": { "backlight": {
"label": "" "label": ""
@@ -89,7 +92,7 @@
{ {
"label": " Internet", "label": " Internet",
"type": "toggle", "type": "toggle",
"active": true, "active": false,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli n on || nmcli n off'", "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli n on || nmcli n off'",
"update-command": "sh -c '[[ $(nmcli n c) == full ]] && echo true || echo false'" "update-command": "sh -c '[[ $(nmcli n c) == full ]] && echo true || echo false'"
}, },
@@ -97,8 +100,8 @@
"label": " Bluetooth", "label": " Bluetooth",
"type": "toggle", "type": "toggle",
"active": false, "active": false,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && bluetoothctl power on || bluetoothctl power off'", "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && bluetoothctl power off || bluetoothctl power on'",
"update-command": "sh -c '[[ $(bluetoothctl show | grep Powered | sed 's/Powered: //') == 'yes' ]] && echo 'true' || echo 'false''" "update-command": "sh -c '[[ $(bluetoothctl show | grep Powered | sed 's/Powered: //') =~ true ]] && echo true || echo false'"
}, },
{ {
"label": "󰒲 DNDisturb", "label": "󰒲 DNDisturb",
@@ -111,6 +114,11 @@
"type": "normal", "type": "normal",
"command": "bash -c 'swaync-client -cp; bash $HOME/.config/hypr/scripts/change-wallpaper.sh'" "command": "bash -c 'swaync-client -cp; bash $HOME/.config/hypr/scripts/change-wallpaper.sh'"
}, },
{
"label": " Screenshot",
"type": "normal",
"command": "sh -c 'swaync-client -cp; hyprshot -m region -o $HOME/Screenshots'"
},
{ {
"label": "󰗽 Logout", "label": "󰗽 Logout",
"type": "normal", "type": "normal",
+34 -17
View File
@@ -31,7 +31,7 @@ tooltip {
} }
.notification-row .notification-background .notification.critical { .notification-row .notification-background .notification.critical {
border: 2px solid @yellow; border: 2px solid @color2;
} }
.notification-row .notification-background .notification { .notification-row .notification-background .notification {
@@ -42,7 +42,7 @@ tooltip {
font-size: 1.2em; font-size: 1.2em;
margin-bottom: 2px; margin-bottom: 2px;
font-weight: 600; font-weight: 600;
color: @text; color: @foreground;
} }
.notification-row .notification-background .notification .notification-content .time { .notification-row .notification-background .notification .notification-content .time {
@@ -97,8 +97,7 @@ tooltip {
.control-center .notification-row .notification-background { .control-center .notification-row .notification-background {
border-radius: 16px; border-radius: 16px;
background-color: @background-alt; background-color: @color1;
border: 1px solid @yellow;
margin-top: 14px; margin-top: 14px;
} }
@@ -107,7 +106,8 @@ tooltip {
} }
.control-center .notification-row .notification-background .notification.critical { .control-center .notification-row .notification-background .notification.critical {
border: 2px solid @highlight; box-shadow: inset 0 0 0px 2px @color3;
border: none;
} }
.control-center .notification-row .notification-background .notification .notification-content { .control-center .notification-row .notification-background .notification .notification-content {
@@ -116,36 +116,33 @@ tooltip {
} }
.control-center .notification-row .notification-background .notification .notification-content .summary { .control-center .notification-row .notification-background .notification .notification-content .summary {
font-family: Cantarell, "Noto Sans CJK"; font-family: Cantarell, "Noto Sans CJK";
color: #cdd6f4; color: @foreground;
font-size: 1.2em; font-size: 1.2em;
font-weight: 600; font-weight: 600;
} }
.control-center .notification-row .notification-background .notification .notification-content .time { .control-center .notification-row .notification-background .notification .notification-content .time {
color: #a6adc8; color: @foreground;
} }
.control-center .notification-row .notification-background .notification .notification-content .body { .control-center .notification-row .notification-background .notification .notification-content .body {
color: #cdd6f4; color: @foreground;
} }
.control-center .notification-row .notification-background .notification > *:last-child > * { .control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em; min-height: 3.4em;
} }
.notification.critical progress { .notification.critical progress,
background-color: #f38ba8;
}
.notification.low progress, .notification.low progress,
.notification.normal progress { .notification.normal progress {
background-color: #89b4fa; background-color: @color3;
} }
/* Control Center */ /* Control Center */
.control-center { .control-center {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; box-shadow: 0 2 10px 1px black, inset 0 0 0px 2px shade(@background, 2);
border-radius: 12.6px; border-radius: 12.6px;
margin: 18px; margin: 18px;
background: @background; background: @background;
@@ -303,8 +300,12 @@ tooltip {
background: @active; background: @active;
} }
.widget-buttons-grid button:checked {
background: @color3;
}
.widget-buttons-grid button label { .widget-buttons-grid button label {
font-size: 0.95rem; font-size: 1em;
color: @text; color: @text;
font-weight: 600; font-weight: 600;
} }
@@ -313,10 +314,26 @@ tooltip {
color: blue; color: blue;
} }
.widget-volume .per-app-volume {
margin-top: 4px;
padding: 6px;
border-radius: 6px;
background: shade(@background, .6);
}
.widget-volume .per-app-volume > * > * > * {
margin-right: 0;
}
.widget-volume .per-app-volume > * > * > * + * {
margin-left: -5px;
margin-right: -10px;
}
.widget-volume trough, .widget-volume trough,
.widget-backlight trough { /* slider's background */ .widget-backlight trough { /* slider's background */
margin: 0 1.2rem; margin: 0 1.2rem;
background-color: @background-alt; background-color: shade(@color1, .4);
min-height: 8px; min-height: 8px;
min-width: 70px; min-width: 70px;
border-radius: 14px; border-radius: 14px;
@@ -333,7 +350,7 @@ tooltip {
.widget-volume trough slider:active, .widget-volume trough slider:active,
.widget-backlight trough slider:active { .widget-backlight trough slider:active {
padding: 10px; padding: 10px;
background: shade(@text, .75); background: shade(@foreground, .75);
} }
.widget-volume trough highlight, .widget-volume trough highlight,