171 current 2025-01-03 00:20:05 25.05.20241217.d3c42f1 6.6.66 *
This commit is contained in:
@@ -29,4 +29,10 @@ in {
|
||||
systemd.user.services.polybar = {
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
|
||||
home.activation.copyPolybarScriptsDir = lib.mkAfter ''
|
||||
mkdir -p ~/.config/polybar/scripts
|
||||
cp -r ${./scripts}/* ~/.config/polybar/scripts
|
||||
chmod -R u+w ~/.config/polybar/scripts
|
||||
'';
|
||||
}
|
||||
|
||||
16
home/programs/polybar/scripts/bluetooth.sh
Normal file
16
home/programs/polybar/scripts/bluetooth.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
|
||||
then
|
||||
echo ""
|
||||
else
|
||||
if [ $(echo info | bluetoothctl | grep 'Device' | wc -c) -eq 0 ]
|
||||
then
|
||||
echo ""
|
||||
fi
|
||||
device=$(bluetoothctl info | grep "Name" | cut -d ' ' -f 2-)
|
||||
if [[ "$device" == "" ]]
|
||||
then
|
||||
echo "%{F#2193ff}"
|
||||
else
|
||||
echo "%{F#2193ff} %{F#ffffff}[$device]"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user