notify_power (240B)
1 #!/bin/sh 2 # 3 # 4 5 # Arbitrary but unique message id 6 msgId="661051" 7 8 status=$(upower -i "$(upower -e | grep BAT)" | grep --color=never -E "state|to\ full|to\ empty|percentage" | sed "s/: */: /" | sed "s/^ *//") 9 10 notify-send "Power" "$status"