Skip to content

Instantly share code, notes, and snippets.

@smlb
Last active September 8, 2017 17:37

Revisions

  1. smlb revised this gist Aug 20, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion batt.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    BATT=`acpi -b | awk '{ split($5,a,":"); print substr($3,0,2), $4, "["a[1]":"a[2]"]" }' | tr -d ',' | awk '{print $2}' | sed 's/\%//g'`

    [[ $BATT < 10 ]] && notify-send SysInfo "Battery Low!" -i /home/simone/Downloads/batt.png -t 2000

  2. smlb created this gist Jun 22, 2014.
    3 changes: 3 additions & 0 deletions batt.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    BATT=`acpi -b | awk '{ split($5,a,":"); print substr($3,0,2), $4, "["a[1]":"a[2]"]" }' | tr -d ',' | awk '{print $2}' | sed 's/\%//g'`

    [[ $BATT < 10 ]] && notify-send SysInfo "Battery Low!" -i /home/simone/Downloads/batt.png -t 2000