From 3e94a3e724c36267fa2e4039e3759473c59e8510 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Sat, 25 Oct 2014 22:26:54 +0200 Subject: Restructured dotfile repo to take advantage of GNU Stow --- .config/herbstluftwm/notify.sh | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 .config/herbstluftwm/notify.sh (limited to '.config/herbstluftwm/notify.sh') diff --git a/.config/herbstluftwm/notify.sh b/.config/herbstluftwm/notify.sh deleted file mode 100755 index 190d496..0000000 --- a/.config/herbstluftwm/notify.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -monitor_w=$1 -window_p=$2 -panel_h=$3 - -popup_w=$(echo "$monitor_w - (2 * $window_p)" | bc) -popup_h=$panel_h -popup_x=$window_p -popup_y=$window_p - -popup_opts="-w $popup_w -h $popup_h -x $popup_x -y $popup_y" - -while true; do - - bat_lvl=$(cat /sys/class/power_supply/BAT1/capacity) - bat_stat=$(cat /sys/class/power_supply/BAT1/status) - - if [[ $bat_lvl -le 5 && $bat_stat == "Discharging" ]]; then - $4 -m "Battery level critical: $bat_lvl%%" -u "high" $popup_opts - elif [[ $bat_lvl -eq 10 && $bat_stat == "Discharging" ]]; then - $4 -m "Battery level low: $bat_lvl%%" $popup_opts - elif [[ $bat_lvl -eq 50 && $bat_stat == "Discharging" ]]; then - $4 -m "Battery level at $bat_lvl%%" $popup_opts - elif [[ $bat_lvl -eq 100 && $bat_stat == "Charging" ]]; then - $4 -m "Battery fully charged" - fi - - sleep 60; -done -- cgit v1.2.3