обновил waybar: добавлен виджет для отображения информации о текущем треке. Работает пока что только для Spotify

This commit is contained in:
2026-08-18 11:22:09 +06:00
parent b206449ebd
commit 82d37f61c1
2 changed files with 14 additions and 5 deletions
+11 -4
View File
@@ -5,7 +5,7 @@
"spacing": 0, "spacing": 0,
"modules-left": ["wlr/taskbar"], "modules-left": ["wlr/taskbar"],
"modules-center": ["clock"], "modules-center": ["clock"],
"modules-right": ["custom/v2raya", "custom/language", "pulseaudio", "network", "cpu", "memory", "tray"], "modules-right": ["network", "custom/spotify", "custom/v2raya", "custom/language", "pulseaudio", "cpu", "memory", "tray"],
"wlr/taskbar": { "wlr/taskbar": {
"format": "{icon}", "format": "{icon}",
@@ -18,12 +18,19 @@
"interval": 1, "interval": 1,
"format": " {} " "format": " {} "
}, },
"custom/spotify": {
"format": "[{}] ",
"exec": "playerctl metadata --format '{{artist}} - {{title}}' spotify 2>/dev/null || echo ''",
"on-click": "spotify",
"interval": 3,
"max-length": 50
},
"custom/v2raya": { "custom/v2raya": {
"format": "PROXY{}", "format": "PROXY{}",
"return-type": "json", "return-type": "json",
"interval": 2, "interval": 2,
"exec": "$HOME/.config/waybar/v2raya-toggle.sh", "exec": "/home/ivan/.config/waybar/v2raya-toggle.sh",
"on-click": "$HOME/.config/waybar/v2raya-toggle.sh toggle", "on-click": "/home/ivan/.config/waybar/v2raya-toggle.sh toggle",
"signal": 10 "signal": 10
}, },
"clock": { "clock": {
@@ -40,7 +47,7 @@
}, },
"network": { "network": {
"min-length": 10, "min-length": 10,
"format-wifi": " {essid}", "format-wifi": " {bandwidthDownBytes}",
"format-ethernet": " {bandwidthDownBytes}", "format-ethernet": " {bandwidthDownBytes}",
"format-disconnected": "⚠ DONT", "format-disconnected": "⚠ DONT",
"interval": 1 "interval": 1
+3 -1
View File
@@ -5,7 +5,7 @@
border-radius: 0; border-radius: 0;
} }
@import "$HOME/.config/aether/theme/waybar.css"; @import "/home/ivan/.config/aether/theme/waybar.css";
window#waybar { window#waybar {
background: alpha(@background, 0.75); background: alpha(@background, 0.75);
@@ -19,6 +19,7 @@ window#waybar {
#network, #network,
#pulseaudio, #pulseaudio,
#taskbar, #taskbar,
#custom-spotify,
#tray { #tray {
padding: 0 10px; padding: 0 10px;
color: @foreground; color: @foreground;
@@ -34,6 +35,7 @@ window#waybar {
box-shadow: inset 0 -2px 0 0 @foreground; box-shadow: inset 0 -2px 0 0 @foreground;
color: @foreground; color: @foreground;
} }
#custom-v2raya.enabled { #custom-v2raya.enabled {
color: @foreground; color: @foreground;
} }