From 514e105f96d5f1fb04762b9665df188cc1e1a332 Mon Sep 17 00:00:00 2001 From: Jake Ginesin Date: Sat, 11 Jan 2025 21:19:11 -0500 Subject: [PATCH] 234 current 2025-01-11 21:19:01 25.05.20241217.d3c42f1 6.6.66 * --- home/programs/polybar/scripts/bluetooth.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home/programs/polybar/scripts/bluetooth.nix b/home/programs/polybar/scripts/bluetooth.nix index 074b191..57d9bae 100644 --- a/home/programs/polybar/scripts/bluetooth.nix +++ b/home/programs/polybar/scripts/bluetooth.nix @@ -2,13 +2,14 @@ bctl = "/run/current-system/sw/bin/bluetoothctl"; sctl = "/run/current-system/sw/bin/systemctl"; grep = "/run/current-system/sw/bin/grep"; + wc = "/run/current-system/sw/bin/wc"; in pkgs.writeShellScriptBin "bluetooth-ctl" '' - if [ $(${bctl} show | ${grep} "Powered: yes" | wc -c) -eq 0 ] + if [ $(${bctl} show | ${grep} "Powered: yes" | ${wc} -c) -eq 0 ] then echo "" else - if [ $(echo info | ${bctl} | ${grep} 'Device' | wc -c) -eq 0 ] + if [ $(echo info | ${bctl} | ${grep} 'Device' | ${wc} -c) -eq 0 ] then echo "" fi