forked from Shinonome/dots-hyprland
changed the script to the right name, added some info and removed unnecesary debug
This commit is contained in:
+5
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# This just guesses that the BAT0 is the actuall battery
|
# This just guesses that the BAT0 is the actuall battery
|
||||||
|
# because BAT0 is the default for modern systems
|
||||||
full=$(cat /sys/class/power_supply/BAT0/charge_full)
|
full=$(cat /sys/class/power_supply/BAT0/charge_full)
|
||||||
design=$(cat /sys/class/power_supply/BAT0/charge_full_design)
|
design=$(cat /sys/class/power_supply/BAT0/charge_full_design)
|
||||||
|
|
||||||
@@ -9,3 +10,7 @@ if [ "$design" -gt 0 ]; then # basically if design > 0
|
|||||||
else
|
else
|
||||||
echo "Error"
|
echo "Error"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If you have any issues try to find your "real" battery.
|
||||||
|
# Run 'ls /sys/class/power_supply'. You may see BATM or BAT1 and no BAT0
|
||||||
|
# You can check what is what my running 'cat /sys/class/power_supply/{whatever_you_got}/model_name'
|
||||||
@@ -46,7 +46,6 @@ Singleton {
|
|||||||
const value = Number(output)
|
const value = Number(output)
|
||||||
if (!isNaN(value)) {
|
if (!isNaN(value)) {
|
||||||
root.health = value
|
root.health = value
|
||||||
console.log("Battery health:", value)
|
|
||||||
} else {
|
} else {
|
||||||
console.warn("Battery script output invalid:", output)
|
console.warn("Battery script output invalid:", output)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user