From 865cfdb0293f85c28d1ee54d76a11cc798bb7440 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 16 Dec 2018 16:50:42 -0500 Subject: Great Renaming, i3blocks officially changed --- .scripts/statusbar/i3battery | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 .scripts/statusbar/i3battery (limited to '.scripts/statusbar/i3battery') diff --git a/.scripts/statusbar/i3battery b/.scripts/statusbar/i3battery deleted file mode 100755 index b485d9a..0000000 --- a/.scripts/statusbar/i3battery +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# Give a battery name (e.g. BAT0) as an argument. - -case $BLOCK_BUTTON in - 3) pgrep -x dunst >/dev/null && notify-send "🔋 Battery module: -🔋: discharging -♻: stagnant charge -🔌: charging -⚡: charged -❗: battery very low! -- Text color reflects charge left" ;; -esac - -capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit -status=$(cat /sys/class/power_supply/"$1"/status) - -if [ "$capacity" -ge 80 ]; then - color="#b8bb26" -elif [ "$capacity" -ge 60 ]; then - color="#ebdbb2" -elif [ "$capacity" -ge 40 ]; then - color="#fabd2f" -elif [ "$capacity" -ge 20 ]; then - color="#fe8019" -else - color="#fb4934" - warn="❗" -fi - -[ -z $warn ] && warn=" " - -[ "$status" = "Charging" ] && color="#FFF" - -printf "%s%s%s" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" -- cgit v1.3.1