♻️ refactor(swaync): change a lot of stuff
This commit is contained in:
+3
-4
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||
"$schema": "configSchema.json",
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"layer": "overlay",
|
||||
@@ -43,7 +43,6 @@
|
||||
"notification-visibility": {
|
||||
"spotify": {
|
||||
"state": "muted",
|
||||
"urgency": "Low",
|
||||
"app-name": "Spotify"
|
||||
}
|
||||
},
|
||||
@@ -100,8 +99,8 @@
|
||||
"label": " Bluetooth",
|
||||
"type": "toggle",
|
||||
"active": false,
|
||||
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && bluetoothctl power off || bluetoothctl power on'",
|
||||
"update-command": "sh -c '[[ $(bluetoothctl show | grep Powered | sed 's/Powered: //') =~ true ]] && echo true || echo false'"
|
||||
"command": "sh -c 'sh $HOME/.config/swaync/scripts/control-center/bluetooth-toggle.sh Toggle_state'",
|
||||
"update-command": "sh -c 'echo $(sh $HOME/.config/swaync/scripts/control-center/bluetooth-toggle.sh) Update_state'"
|
||||
},
|
||||
{
|
||||
"label": " DNDisturb",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Update_state() {
|
||||
if [[ $(bluetoothctl show | grep "Powered" | sed "s/Powered: //" | xargs) == "yes" ]]
|
||||
then
|
||||
echo true
|
||||
else
|
||||
echo false
|
||||
fi
|
||||
}
|
||||
|
||||
Toggle_state() {
|
||||
if [[ $SWAYNC_TOGGLE_STATE == "true" ]]
|
||||
then
|
||||
bluetoothctl power off
|
||||
else
|
||||
bluetoothctl power on
|
||||
fi
|
||||
}
|
||||
+20
-12
@@ -27,7 +27,16 @@ tooltip {
|
||||
|
||||
.notification-row .notification-background .notification {
|
||||
padding: 7px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.notification-row > * > * > * > * > *:first-child {
|
||||
min-height: 3.4em;
|
||||
border-top-left-radius: 32px;
|
||||
border-top-right-radius: 32px;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification > *:last-child > * {
|
||||
min-height: 3.4em;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification.critical {
|
||||
@@ -38,6 +47,11 @@ tooltip {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.notification-row .notification .image {
|
||||
margin-right: .5em;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification .notification-content .summary {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 2px;
|
||||
@@ -54,10 +68,6 @@ tooltip {
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification > *:last-child > * {
|
||||
min-height: 3.4em;
|
||||
}
|
||||
|
||||
.notification .notification-action {
|
||||
border-radius: 16px;
|
||||
color: @text;
|
||||
@@ -219,7 +229,6 @@ tooltip {
|
||||
background: @highlight;
|
||||
border-radius: 16px;
|
||||
border: 1px solid #6c7086;
|
||||
|
||||
}
|
||||
|
||||
/* MPRIS */
|
||||
@@ -252,6 +261,11 @@ tooltip {
|
||||
background: @active;
|
||||
}
|
||||
|
||||
.widget-mpris .image {
|
||||
padding-right: 0.5rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-title {
|
||||
font-family: "Cantarell", "Noto Sans";
|
||||
font-weight: 700;
|
||||
@@ -349,7 +363,6 @@ tooltip {
|
||||
}
|
||||
.widget-volume trough slider:active,
|
||||
.widget-backlight trough slider:active {
|
||||
padding: 10px;
|
||||
background: shade(@foreground, .75);
|
||||
}
|
||||
|
||||
@@ -386,8 +399,3 @@ tooltip {
|
||||
.widget-backlight .KB {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.image {
|
||||
padding-right: 0.5rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user