diff options
| author | EuAndreh <eu@euandre.org> | 2022-05-12 00:46:11 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2022-05-12 00:46:11 -0300 |
| commit | 71c090766720f5bd54d269c950fe77eff9a6d778 (patch) | |
| tree | 7aa04759b8d481db8bef6a5e3deeb21230b48d37 | |
| parent | .local/bin/msg: Fix xmpp - add to address (diff) | |
| download | dotfiles-71c090766720f5bd54d269c950fe77eff9a6d778.tar.gz dotfiles-71c090766720f5bd54d269c950fe77eff9a6d778.tar.xz | |
.local/bin/msg: Play sound by default
| -rwxr-xr-x | .local/bin/msg | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/.local/bin/msg b/.local/bin/msg index bdabfbe9..e3509989 100755 --- a/.local/bin/msg +++ b/.local/bin/msg @@ -38,6 +38,10 @@ for flag in "$@"; do esac done +sound() { + play ~/Desktop/medium.ogg 2>/dev/null & +} + ACTION_DONE=false while getopts 'X:sS:m:D:bh' flag; do case "$flag" in @@ -46,7 +50,7 @@ while getopts 'X:sS:m:D:bh' flag; do ACTION_DONE=true ;; s) - play ~/Desktop/medium.ogg + sound ACTION_DONE=true ;; S) @@ -82,7 +86,10 @@ while getopts 'X:sS:m:D:bh' flag; do done if [ "$ACTION_DONE" = false ]; then + sound usage help exit fi + +wait |
