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