diff options
author | EuAndreh <eu@euandre.org> | 2023-03-15 16:46:00 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-15 16:46:00 -0300 |
commit | 0de8894f874b9ee2ed48c7113a3eda4333a3aed4 (patch) | |
tree | e7c7b7a7c209e474199c293f7013e4dc19356228 /bin/boop | |
parent | Makefile: Add username@ to subject on "check-aliases" (diff) | |
download | dotfiles-0de8894f874b9ee2ed48c7113a3eda4333a3aed4.tar.gz dotfiles-0de8894f874b9ee2ed48c7113a3eda4333a3aed4.tar.xz |
bin/boop: Add -n option
Diffstat (limited to 'bin/boop')
-rwxr-xr-x | bin/boop | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -3,7 +3,7 @@ set -eu usage() { cat <<-'EOF' - boop [-m MESSAGE] -- COMMAND... + boop [-m MESSAGE] [-n] -- COMMAND... boop -h EOF } @@ -14,6 +14,7 @@ help() { Options: -m MESSAGE text message of the desktop notification (default: COMMAND) + -n don't play any sound -h, --help show this message COMMAND the commands to be executed @@ -47,11 +48,15 @@ for flag in "$@"; do esac done -while getopts 'm:h' flag; do +SOUND=-s +while getopts 'm:nh' flag; do case "$flag" in m) MESSAGE="$OPTARG" ;; + n) + SOUND= + ;; h) usage help @@ -78,6 +83,6 @@ else fi CMD="$*" -msg -"$N" -bs -D "${MESSAGE:-$CMD}" +msg -"$N" -b $SOUND -D "${MESSAGE:-$CMD}" exit "$STATUS" |