234 current 2025-01-11 21:19:01 25.05.20241217.d3c42f1 6.6.66 *

This commit is contained in:
2025-01-11 21:19:11 -05:00
parent 5344931dd2
commit 514e105f96

View File

@@ -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