diff --git a/roles/i3/files/battery b/roles/i3/files/battery index 71a15fb..94fcc0e 100755 --- a/roles/i3/files/battery +++ b/roles/i3/files/battery @@ -26,14 +26,11 @@ elif upower -d | grep -E 'state.+\bdischarging\b' >/dev/null 2>&1; then elif [ "$percent" -lt 90 ]; then icon="${LABEL_90}" fi - if [ "$percent" -lt "$THRESHOLD" ]; then + if [ "$percent" -lt 3 ]; then + shutdown now + elif [ "$percent" -lt "$THRESHOLD" ]; then icon="${LABEL_ALERT}" notify-send "CHARGE BATTERY" - for file in /dev/pts/*; do - if [ "$(ls -l "$file" | awk '{print $5}')" = '136,' ]; then - echo "CHARGE BATTERY" >> "$file" - fi - done fi echo "${icon} ${percent}% (${remaining})" else