#!/bin/bash ## # Some commonly used functions for clopper-ob here() { dirname "$(readlink -f "${BASH_SOURCE[0]}")" } bar() { declare -i count="$1" [[ $count -eq 0 ]] && return 0 printf '─' ((count--)) bar "$count" } icon() { declare notif_icons='/usr/share/icons/Numix/48/notifications' case "$1" in brightness) echo -n "$notif_icons/notification-display-brightness.svg" ;; sound-up) echo -n "$notif_icons/notification-audio-volume-high.svg" ;; sound-off) echo -n "$notif_icons/notification-audio-volume-muted.svg" ;; esac } play-sound() { declare sound_dir='/usr/share/sounds/freedesktop/stereo' case "$1" in volume-change) ogg123 "$sound_dir/audio-volume-change.oga" ;; esac }