From 6cd46646d6f6e77cabf4969b1455e2bdf9dce24a Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Sun, 21 Feb 2021 11:57:10 +0000 Subject: Changes for desktop --- battery.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 battery.sh (limited to 'battery.sh') 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 -- cgit v1.2.3