diff --git a/home/programs/polybar/scripts/bluetooth.nix b/home/programs/polybar/scripts/bluetooth.nix index 57d9bae..b95a408 100644 --- a/home/programs/polybar/scripts/bluetooth.nix +++ b/home/programs/polybar/scripts/bluetooth.nix @@ -3,6 +3,7 @@ sctl = "/run/current-system/sw/bin/systemctl"; grep = "/run/current-system/sw/bin/grep"; wc = "/run/current-system/sw/bin/wc"; + cut = "/run/current-system/sw/bin/cut"; in pkgs.writeShellScriptBin "bluetooth-ctl" '' if [ $(${bctl} show | ${grep} "Powered: yes" | ${wc} -c) -eq 0 ] @@ -13,7 +14,7 @@ in then echo "" fi - device=$(${bctl} info | ${grep} "Name" | cut -d ' ' -f 2-) + device=$(${bctl} info | ${grep} "Name" | ${cut} -d ' ' -f 2-) if [[ "$device" == "" ]] then echo "%{F#2193ff}"