aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/Battery.sh
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-05-27 03:58:55 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-05-27 03:58:55 +0900
commitc6c06f0448413454b9ea58af7526c55c360b0e97 (patch)
treeddb9f1f9a66ecf78973b836e37716c2e0b0c5d25 /config/hypr/scripts/Battery.sh
parentd9c558b45866503c6903a5286407a4efc692a4b1 (diff)
updated Power.sh, renamed to Battery.sh since it is about battery information
Diffstat (limited to 'config/hypr/scripts/Battery.sh')
-rw-r--r--config/hypr/scripts/Battery.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/hypr/scripts/Battery.sh b/config/hypr/scripts/Battery.sh
new file mode 100644
index 00000000..d7830058
--- /dev/null
+++ b/config/hypr/scripts/Battery.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+for i in {0..3}; do
+ if [ -f /sys/class/power_supply/BAT$i/capacity ]; then
+ battery_level=$(cat /sys/class/power_supply/BAT$i/status)
+ battery_capacity=$(cat /sys/class/power_supply/BAT$i/capacity)
+ echo "Battery: $battery_capacity% ($battery_level)"
+ fi
+done
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage