updates for eww and ydotool

This commit is contained in:
Chris Cochrun 2022-11-19 05:54:20 -06:00
parent f153a71270
commit 25853d63db
19 changed files with 1147 additions and 31 deletions

17
eww/scripts/battery Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
battery() {
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
cat /sys/class/power_supply/${BAT}/capacity
}
battery_stat() {
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
cat /sys/class/power_supply/${BAT}/status
}
if [[ "$1" == "--bat" ]]; then
battery
elif [[ "$1" == "--bat-st" ]]; then
battery_stat
fi