235 current 2025-01-11 21:20:00 25.05.20241217.d3c42f1 6.6.66 *
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
sctl = "/run/current-system/sw/bin/systemctl";
|
sctl = "/run/current-system/sw/bin/systemctl";
|
||||||
grep = "/run/current-system/sw/bin/grep";
|
grep = "/run/current-system/sw/bin/grep";
|
||||||
wc = "/run/current-system/sw/bin/wc";
|
wc = "/run/current-system/sw/bin/wc";
|
||||||
|
cut = "/run/current-system/sw/bin/cut";
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin "bluetooth-ctl" ''
|
pkgs.writeShellScriptBin "bluetooth-ctl" ''
|
||||||
if [ $(${bctl} show | ${grep} "Powered: yes" | ${wc} -c) -eq 0 ]
|
if [ $(${bctl} show | ${grep} "Powered: yes" | ${wc} -c) -eq 0 ]
|
||||||
@@ -13,7 +14,7 @@ in
|
|||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
device=$(${bctl} info | ${grep} "Name" | cut -d ' ' -f 2-)
|
device=$(${bctl} info | ${grep} "Name" | ${cut} -d ' ' -f 2-)
|
||||||
if [[ "$device" == "" ]]
|
if [[ "$device" == "" ]]
|
||||||
then
|
then
|
||||||
echo "%{F#2193ff}"
|
echo "%{F#2193ff}"
|
||||||
|
|||||||
Reference in New Issue
Block a user