mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
Fix hyprland
This commit is contained in:
17
config/eww/scripts/battery
Executable file
17
config/eww/scripts/battery
Executable 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
|
||||
|
||||
Reference in New Issue
Block a user