18 lines
497 B
Bash
18 lines
497 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
source ./battery-common-lib.sh
|
||
|
|
||
|
set_capacity
|
||
|
|
||
|
if [[ "${bat_status}"=="Discharging" ]]; then
|
||
|
notify-send \
|
||
|
--icon="/usr/share/icons/Adwaita/64x64/status/battery-level-${cap}-symbolic.symbolic.png" \
|
||
|
"Discharging" \
|
||
|
"AC disconnected"
|
||
|
elif [[ "${bat_status}"=="Charging" ]]; then
|
||
|
notify-send \
|
||
|
--icon="/usr/share/icons/Adwaita/64x64/status/battery-level-${cap}-charged-symbolic.symbolic.png" \
|
||
|
"Discharging" \
|
||
|
"AC disconnected"
|
||
|
fi
|