diff --git a/.config/i3/scripts/notify.sh b/.config/i3/scripts/notify.sh new file mode 100644 index 0000000..868dece --- /dev/null +++ b/.config/i3/scripts/notify.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Show system status in notification, or your own message +# Syntaxis: notify [-vb] + +# Variables +duration=3 +bright='' +vol='' +title='' +message='' + +# Functions +function getVol () { + status=$(amixer get Master | grep "^ Front Left" | cut -d ' ' -f 8) + if [[ $status == "[on]" ]] ; then + vol=$(amixer get Master | grep -o "[0-9]*%" | head -n 1) + else + vol="0%" + fi +} ; export -f getVol + +# Get options +while getopts ":bvm:" options; do + case "${options}" in + b) + bright=$(brightnessctl | grep -o "[0-9]*%") + title="Brightness: ${bright}" + ;; + v) + getVol + title="Volume: ${vol:-'0%'}" + ;; + m) + message=${OPTARG} + ;; + *) + title="Unknown option" + ;; + esac +done + +shift $((OPTIND - 1)) + +notify-send "${title:-${message}}" "${message}" \ + -h int:x:100 -h int:y:100 \ + -h string:x-canonical-private-synchronous:byMe # Replace if not yet gone + +# sleep ${duration}; killall notify-osd + diff --git a/Guide.md b/Guide.md index 07152f7..256a8a2 100644 --- a/Guide.md +++ b/Guide.md @@ -4,12 +4,6 @@ Complete (but currently incomplete) guide to installing my systems. ## Base system: Manjaro -## Connections - -``` -pacman -S network-manager-applet nm-connection-editor blueman -``` - ## Window manager: i3 ``` @@ -21,6 +15,18 @@ Take the following config files - [i3 config folder](./.config/i3/) - +## Connections + +``` +pacman -S network-manager-applet nm-connection-editor blueman +``` + +## Notifications + +``` +pacman -S dunst +``` + ## Install additional software ```