waybar: add playerctl status

This commit is contained in:
lelgenio 2023-02-06 14:28:39 -03:00
parent 4536a59a73
commit e64d87ae1c

View file

@ -16,6 +16,7 @@ in
modules-right = [ modules-right = [
"sway/language" "sway/language"
"mpd" "mpd"
"custom/playerctl"
"tray" "tray"
"custom/caffeine" "custom/caffeine"
"pulseaudio" "pulseaudio"
@ -84,6 +85,7 @@ in
format-paused = "{stateIcon}"; format-paused = "{stateIcon}";
format-stopped = ""; format-stopped = "";
state-icons = { state-icons = {
stopped = "";
paused = ""; paused = "";
playing = ""; playing = "";
}; };
@ -92,6 +94,13 @@ in
on-scroll-up = "${mpc} vol +10"; on-scroll-up = "${mpc} vol +10";
on-scroll-down = "${mpc} vol -10"; on-scroll-down = "${mpc} vol -10";
}; };
"custom/playerctl" = {
format = "{}";
exec = "${pkgs.playerctl}/bin/playerctl metadata title";
on-click = "${pkgs.playerctl}/bin/playerctl play-pause";
interval = 1;
tooltip = false;
};
"sway/language" = { format = "{short} {variant}"; }; "sway/language" = { format = "{short} {variant}"; };
"custom/caffeine" = { "custom/caffeine" = {
format = "{}"; format = "{}";