diff options
| author | Suleyman Farajli <suleyman@farajli.net> | 2025-10-26 22:23:31 +0400 |
|---|---|---|
| committer | Suleyman Farajli <suleyman@farajli.net> | 2025-10-26 22:23:31 +0400 |
| commit | cb78290f31886fb1f9a5e7c2a764dda55a459e50 (patch) | |
| tree | 72a2df0645405658d8590d4b8d7d87f1e099f596 /scripts/gui/nsend | |
| parent | f8d1bfbd0f27e0763cf75fcda58d010e346515ab (diff) | |
chore: split script installation into CLI and GUI sections
Diffstat (limited to 'scripts/gui/nsend')
| -rwxr-xr-x | scripts/gui/nsend | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/gui/nsend b/scripts/gui/nsend new file mode 100755 index 0000000..80e1764 --- /dev/null +++ b/scripts/gui/nsend @@ -0,0 +1,32 @@ +#!/bin/sh + +. slib + +help() { +cat << EOF +${0}: Wrapper script to send notifications +options: + -s [Name] [Msg] Send Msg with Name + -s [Msg] Send Msg Without Name + -h Print this message and exit +EOF + +exit 0 +} + +check_program "notify-send" "libnotify must be installed" + +case "${1}" in +"-s") + [ "${#}" -gt 3 ] && invalid_use + + shift + eval $(printf 'notify-send "%s" "%s"' "${1}" "${2}") + + exit 0 +;; +"-h") help ;; + +*) invalid_use ;; + +esac |
