From 2301b7b7defef50b9c060648ab4b7ed7011be6fc Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Sat, 19 Nov 2022 17:24:19 +0100 Subject: [PATCH] Escape ha-now-playing output --- home-manager/modules/waybar/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home-manager/modules/waybar/default.nix b/home-manager/modules/waybar/default.nix index 399764f..ff50bba 100644 --- a/home-manager/modules/waybar/default.nix +++ b/home-manager/modules/waybar/default.nix @@ -11,7 +11,7 @@ with lib; let ENABLED=" " DISABLED=" " if [[ ''${COUNT} != 0 ]]; then DISABLED=" ''${COUNT}"; fi - if ${pkgs.dunst}/bin/dunstctl is-paused | grep -q "false" ; then echo "''${ENABLED}"; else echo "''${DISABLED}"; fi + if ${pkgs.dunst}/bin/dunstctl is-paused | grep -q "false" ; then ${pkgs.coreutils}/bin/echo "''${ENABLED}"; else ${pkgs.coreutils}/bin/echo "''${DISABLED}"; fi ''; in { @@ -108,6 +108,7 @@ in "custom/now_playing" = { exec = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token"; exec-on-event = false; + escape = true; format = " ♪ {}"; restart-interval = 1; return-type = "json";