add eww config

This commit is contained in:
matt1432 2023-05-28 18:05:51 -04:00
parent fac0e15a9e
commit 85dde2e9aa
34 changed files with 2112 additions and 0 deletions
eww/scripts

35
eww/scripts/bluetooth Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
get_state () {
state=$(bluetoothctl show | grep 'Powered' | awk '{print $2}')
if [[ $state == "yes" ]]; then
echo on
else
echo off
fi
}
turn_off () {
bluetoothctl power off 2>&1 > /dev/null
}
turn_on () {
bluetoothctl power on 2>&1 > /dev/null
}
toggle () {
state=$(get_state)
if [[ $state == "on" ]]; then
turn_off
else
turn_on
fi
}
if [[ $1 == "state" ]]; then
get_state
fi
if [[ $1 == "toggle" ]]; then
toggle
fi