nixos-config/profiles/workspace/i3blocks/scripts/bluetooth.nix
2022-09-01 23:10:23 +04:00

20 lines
595 B
Nix

{ iconfont, gnugrep, bash, bluez, pulseaudio, utillinux, python3, ... }:
''
#!${bash}/bin/bash
if ${utillinux}/bin/rfkill | ${gnugrep}/bin/grep bluetooth > /dev/null; then
if ${utillinux}/bin/rfkill | ${gnugrep}/bin/grep bluetooth | ${gnugrep}/bin/grep blocked > /dev/null; then
if ${bluez}/bin/bluetoothctl info > /dev/null; then
if ${pulseaudio}/bin/pactl list sinks | ${gnugrep}/bin/grep bluez > /dev/null; then
echo -n ""
else
echo -n ""
fi
else
echo -n ""
fi
else
echo -n ""
fi
fi
''