This commit is contained in:
sankalp committed 2024-03-02 10:46:39 +05:45
1 parent 9ab0307538
commit 3fd5fcc825
15 files changed
+433 -209

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
ZDOTDIR="$HOME/.config/zsh"
# vim:ft=zsh
-22
View File
@@ -1,22 +0,0 @@
#!/usr/bin/env bash
############ Variables ############
enable_battery=false
####### Check availability ########
for battery in /sys/class/power_supply/*BAT*; do
if [[ -f "$battery/uevent" ]]; then
enable_battery=true
break
fi
done
############# Output #############
if [[ $enable_battery == true ]]; then
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
echo -n "(+) "
fi
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"% remaining
fi
echo ''