add media to waybar

This commit is contained in:
thek4n 2026-08-13 22:01:28 +03:00
parent 4c4c80a704
commit dff21fdb0c
3 changed files with 15 additions and 1 deletions

View File

@ -21,6 +21,7 @@
"custom/battery", "custom/battery",
"custom/pomodoro", "custom/pomodoro",
"custom/bluetooth", "custom/bluetooth",
"custom/media",
"pulseaudio", "pulseaudio",
"custom/language", "custom/language",
"custom/userhost", "custom/userhost",
@ -64,6 +65,14 @@
"interval": 5, "interval": 5,
"return-type": "text", "return-type": "text",
}, },
"custom/media": {
"exec": "playerctl metadata --format '{{title}} - {{artist}}'",
"interval": 1,
"on-click": "playerctl play-pause",
"on-click-right": "playerctl next",
"on-middle-click": "playerctl previous",
"format": " {}",
},
"custom/bluetooth": { "custom/bluetooth": {
"exec": "~/.config/waybar/scripts/builder.sh bluetooth_battery", "exec": "~/.config/waybar/scripts/builder.sh bluetooth_battery",
"interval": 5, "interval": 5,

View File

@ -38,6 +38,7 @@ window#waybar {
#cpu, #cpu,
#custom-cpu_temp, #custom-cpu_temp,
#custom-bluetooth, #custom-bluetooth,
#custom-media,
#pulseaudio, #pulseaudio,
#custom-pomodoro, #custom-pomodoro,
#custom-language, #custom-language,
@ -56,6 +57,10 @@ window#waybar {
color: #81C784; color: #81C784;
} }
#custom-media {
color: white;
}
#pulseaudio.muted { #pulseaudio.muted {
color: #2a5c45; color: #2a5c45;
} }

View File

@ -23,7 +23,7 @@
grim highlight imagemagick jq yq kanshi less lesspipe mako grim highlight imagemagick jq yq kanshi less lesspipe mako
man mpv noto-fonts p7zip poppler resvg ripgrep rofi slurp man mpv noto-fonts p7zip poppler resvg ripgrep rofi slurp
socat sway swaybg swayidle swaylock tmux tree-sitter ueberzug socat sway swaybg swayidle swaylock tmux tree-sitter ueberzug
waybar wget wl-clipboard wlr-randr wtype yazi ydotool zoxide waybar wget wl-clipboard playerctl wlr-randr wtype yazi ydotool zoxide
docker httpie home-manager vial telegram-desktop kicad kicadAddons.kikit-library docker httpie home-manager vial telegram-desktop kicad kicadAddons.kikit-library
]; ];