Playing with eww

This commit is contained in:
Derek Taylor
2022-09-27 14:42:58 -05:00
parent 46fb945cc3
commit 3a7e50ce5d
16 changed files with 1157 additions and 7 deletions

17
.config/eww/bar/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