waybar: fix mpd play/pause

This commit is contained in:
Leonardo Eugênio 2022-12-09 20:32:33 -03:00
parent b1ab74fba7
commit b6e5529e58

View file

@ -72,7 +72,9 @@ in {
format = "<b>{:%H:%M %a %d/%m}</b>"; format = "<b>{:%H:%M %a %d/%m}</b>";
tooltip = false; tooltip = false;
}; };
mpd = { mpd = let
mpc = "${pkgs.mpc-cli}/bin/mpc";
in {
format = "{stateIcon} {title} - {artist}"; format = "{stateIcon} {title} - {artist}";
format-paused = "{stateIcon}"; format-paused = "{stateIcon}";
format-stopped = ""; format-stopped = "";
@ -81,9 +83,9 @@ in {
playing = ""; playing = "";
}; };
tooltip = false; tooltip = false;
on-click = "mpc toggle"; on-click = "${mpc} toggle";
on-scroll-up = "mpc vol +10"; on-scroll-up = "${mpc} vol +10";
on-scroll-down = "mpc vol -10"; on-scroll-down = "${mpc} vol -10";
}; };
"sway/language" = { format = "{short} {variant}"; }; "sway/language" = { format = "{short} {variant}"; };
"custom/caffeine" = { "custom/caffeine" = {