herbe icon indicating copy to clipboard operation
herbe copied to clipboard

patch: notify-send script that gracefully ignores options and redirects to herbe

Open cemkeylan opened this issue 5 years ago • 2 comments

Description

So many shell scripts call notify-send, and I have seen a lot of those use options in them. This script parses and ignores these options, and redirects the rest to herbe. It calls herbe async to replicate the behaviour of notify-send.

Download

notify-send

cemkeylan avatar Aug 28 '20 19:08 cemkeylan

Please someone help me how to use this script.

knsrinath avatar May 29 '21 08:05 knsrinath

Please someone help me how to use this script.

Just add that script to your $PATH

tunjan avatar Jun 16 '21 20:06 tunjan

Are you missing the --app-name option?

diff --git a/notify-send b/notify-send
old mode 100755
new mode 100644
index 3a3872b..edd76d5
--- a/notify-send
+++ b/notify-send
@@ -31,6 +31,11 @@ parse() {
         OPTARG=$2
         _=$OPTARG
         shift ;;
+      -a | --app-name)
+        [ $# -le 1 ] && set -- "$1" required && break
+        OPTARG=$2
+        _=$OPTARG
+        shift ;;
       -t | --expire-time)
         [ $# -le 1 ] && set -- "$1" required && break
         OPTARG=$

Poulbi avatar Mar 22 '24 13:03 Poulbi