nixos-config/profiles/workspace/i3blocks/scripts/bluetooth.nix
2022-10-10 17:28:36 +04:00

20 lines
598 B
Nix

{ iconfont, gnugrep, bash, bluez, pulseaudio, util-linux, python3, ... }:
''
#!${bash}/bin/bash
if ${util-linux}/bin/rfkill | ${gnugrep}/bin/grep bluetooth > /dev/null; then
if ${util-linux}/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
''