diff options
author | clarkzjw <[email protected]> | 2022-11-17 10:56:25 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2022-11-17 10:56:25 -0800 |
commit | d2d735742ca61b211c9b48a2209d36395daebcf4 (patch) | |
tree | bda27729a1bbac3ab354a1f10d4885899cdbf967 /dot_config/i3/scripts/executable_battery-pinebook-pro | |
parent | a6d2e5e6fb9adc84c32e86630b4846b1765c7d77 (diff) | |
download | dotfiles-d2d735742ca61b211c9b48a2209d36395daebcf4.tar.gz |
+ add existing config
Diffstat (limited to 'dot_config/i3/scripts/executable_battery-pinebook-pro')
-rw-r--r-- | dot_config/i3/scripts/executable_battery-pinebook-pro | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dot_config/i3/scripts/executable_battery-pinebook-pro b/dot_config/i3/scripts/executable_battery-pinebook-pro new file mode 100644 index 0000000..fd97370 --- /dev/null +++ b/dot_config/i3/scripts/executable_battery-pinebook-pro | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | #simple Shellscript for i3blocks on Pinebook pro | ||
3 | #05012020 [email protected] Gerhard S. | ||
4 | #battery-symbols: on Manjaro you need the awesome-terminal-fonts package installed! | ||
5 | PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity) | ||
6 | STATUS=$(cat /sys/class/power_supply/cw2015-battery/status) | ||
7 | case $(( | ||
8 | $PERCENT >= 0 && $PERCENT <= 20 ? 1 : | ||
9 | $PERCENT > 20 && $PERCENT <= 40 ? 2 : | ||
10 | $PERCENT > 40 && $PERCENT <= 60 ? 3 : | ||
11 | $PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in | ||
12 | # | ||
13 | (1) echo $STATUS:"" :$PERCENT%;; | ||
14 | (2) echo $STATUS:"" :$PERCENT%;; | ||
15 | (3) echo $STATUS:"" :$PERCENT%;; | ||
16 | (4) echo $STATUS:"" :$PERCENT%;; | ||
17 | (5) echo $STATUS:"" :$PERCENT%;; | ||
18 | esac | ||