From cb78290f31886fb1f9a5e7c2a764dda55a459e50 Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Sun, 26 Oct 2025 22:23:31 +0400 Subject: chore: split script installation into CLI and GUI sections --- scripts/gui/nsend | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 scripts/gui/nsend (limited to 'scripts/gui/nsend') 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 -- cgit v1.2.3