diff options
author | Michaël Ball <git@michaelball.name> | 2021-02-21 11:57:10 +0000 |
---|---|---|
committer | Michaël Ball <git@michaelball.name> | 2021-02-21 11:57:10 +0000 |
commit | 6cd46646d6f6e77cabf4969b1455e2bdf9dce24a (patch) | |
tree | a12d8190d87c1c268e385ec42e40cf516d58908c /battery.sh | |
parent | 3de82782746019f605456d57226815eb9aac8369 (diff) |
Changes for desktopdesktop
Diffstat (limited to 'battery.sh')
-rwxr-xr-x | battery.sh | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/battery.sh b/battery.sh deleted file mode 100755 index 78fb773..0000000 --- a/battery.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -i3status -c $HOME/.config/i3blocks/i3status.conf | while IFS= read -r line; do - PARTS=($line) - - CHARGE="${PARTS[1]}" - CHARGE="${CHARGE%\%*}" - [[ "${CHARGE}" -gt 100 ]] && { - CHARGE="100" - } - - STATE="" - [[ "${PARTS[0]}" = "BAT" ]] && { - STATE="${PARTS[2]}" - [[ -n "${STATE}" ]] && { - STATE="${STATE:0:-3}" - STATE=" (${STATE})" - } - } - - LEVEL=$(( (CHARGE - 1) / 20 )) - ICON="f$(( 244 - LEVEL ))" - - echo -e "\u${ICON} ${CHARGE}%${STATE} " - - [[ "${LEVEL}" = "0" ]] && { - [[ -z "${STATE}" ]] || i3-msg "fullscreen disable" >/dev/null - } -done |