From e64d87ae1c54c6f1403a2faea323e4b821d28d8f Mon Sep 17 00:00:00 2001 From: lelgenio Date: Mon, 6 Feb 2023 14:28:39 -0300 Subject: [PATCH] waybar: add playerctl status --- user/waybar.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/user/waybar.nix b/user/waybar.nix index e29766e..e626fa3 100644 --- a/user/waybar.nix +++ b/user/waybar.nix @@ -16,6 +16,7 @@ in modules-right = [ "sway/language" "mpd" + "custom/playerctl" "tray" "custom/caffeine" "pulseaudio" @@ -84,6 +85,7 @@ in format-paused = "{stateIcon}"; format-stopped = ""; state-icons = { + stopped = ""; paused = ""; playing = ""; }; @@ -92,6 +94,13 @@ in on-scroll-up = "${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}"; }; "custom/caffeine" = { format = "{}";