← Back to team overview

dx-packages team mailing list archive

[Bug 617816] Re: Critically Low Battery Notification not showing in Ubuntu 14.04 lts

 

#!/bin/bash

BATTERY=$(upower -e | grep 'BAT')

while [ 1 ]
do
    BATTERY_PERCENTAGE=$(upower -i $BATTERY|grep percentage|awk '{ print $2 }'|sed s/'%'/''/g)

    if [[ "$BATTERY_PERCENTAGE" -lt "11" ]]; then

    notify-send --urgency=critical "WARNING: Battery is about to die"  "Plug in the power cable"
    play /usr/share/sounds/KDE-Sys-Warning.ogg &> /dev/null 
    fi

sleep 10

done

** Attachment added: "It will give notification when the battery is low and you should run this .sh file in terminal."
   https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/617816/+attachment/4521746/+files/BatteryAlert.sh

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to notify-osd in Ubuntu.
Matching subscriptions: dx-packages
https://bugs.launchpad.net/bugs/617816

Title:
  Critically Low Battery Notification not showing in Ubuntu 14.04 lts

Status in notify-osd package in Ubuntu:
  Fix Committed

Bug description:
  I have installed Ubuntu 14.04 lts and when the battery is low, I am
  unable to get notifications such as battery critically low.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/617816/+subscriptions