Script que manda una notificación sobre el sistema
This commit is contained in:
parent
fd4ba05318
commit
2b3c59fdf2
2 changed files with 13 additions and 0 deletions
|
@ -91,6 +91,8 @@ riverctl map passthrough $mod F11 enter-mode normal
|
||||||
|
|
||||||
riverctl map normal $mod Z spawn 'pamixer --default-source --toggle-mute'
|
riverctl map normal $mod Z spawn 'pamixer --default-source --toggle-mute'
|
||||||
|
|
||||||
|
riverctl map normal $mod X spawn 'notificar-informacion.sh'
|
||||||
|
|
||||||
for mode in normal locked
|
for mode in normal locked
|
||||||
do
|
do
|
||||||
# https://github.com/cdemoulins/pamixer
|
# https://github.com/cdemoulins/pamixer
|
||||||
|
|
11
.local/bin/notificar-informacion.sh
Executable file
11
.local/bin/notificar-informacion.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
battery="$(upower -i /org/freedesktop/UPower/devices/battery_BAT0)"
|
||||||
|
get_battery_value () {
|
||||||
|
echo "$battery" | grep "$1" | awk '{ print $2 }'
|
||||||
|
}
|
||||||
|
title="$(date +%T)"
|
||||||
|
body="\
|
||||||
|
$(date +"%A %d of %B")
|
||||||
|
$(get_battery_value percentage) $(get_battery_value state)\
|
||||||
|
"
|
||||||
|
notify-send --expire-time=5000 "$title" "$body"
|
Loading…
Reference in a new issue