diff --git a/.config/river/keys b/.config/river/keys index 57439c2..0128e19 100755 --- a/.config/river/keys +++ b/.config/river/keys @@ -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 X spawn 'notificar-informacion.sh' + for mode in normal locked do # https://github.com/cdemoulins/pamixer diff --git a/.local/bin/notificar-informacion.sh b/.local/bin/notificar-informacion.sh new file mode 100755 index 0000000..ff4b736 --- /dev/null +++ b/.local/bin/notificar-informacion.sh @@ -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"