pkill -SIGUSR1 herbe
Dismissed notifications return exit code 2.
Actions
ACTION_BUTTON
(defaults to right mouse button) or the SIGUSR2
signal
herbe "Notification body" && echo "This is an action"
herbe "First line" "Second line" "Third line" ...
in bash
herbe $'First line\nSecond line\nThird line'
herbe "$(ps axch -o cmd:15,%cpu --sort=-%cpu |
head)"
Notifications are put in a queue and shown using fifo rule
if stuck
pkill -SIGKILL herbe
# same as pkill -SIGTERM herbe, terminates every running herbe process $ pkill herbe $ pkill -SIGUSR1 herbe $ pkill -SIGUSR2 herbe
dummy notify send using herbe
#!/bin/sh
# Shell script to redirect notify-send calls to herbe. The purpose is to ignore
# options passed to notify-send.
#
# Option parser generated by getoptions
# URL: https://github.com/ko1nksm/getoptions
# LICENSE: Creative Commons Zero v1.0 Universal
usage() {
printf '%s\n' "${0##*/}: notify-send replacement for herbe" "accepts but ignores all notify-send options."
}
REST=''
parse() {
OPTIND=$(($#+1))
while [ $# -gt 0 ] && OPTARG=; do
case $1 in
--?*=*) OPTARG=$1; shift
;;
-[utich]?*) OPTARG=$1; shift
;;
-[!-]?*) OPTARG=$1; shift
OPTARG= ;;
esac
case $1 in
-u | --urgency)
[ $# -le 1 ] && set -- "$1" required && break
OPTARG=$2
_=$OPTARG
shift ;;
-t | --expire-time)
[ $# -le 1 ] && set -- "$1" required && break
OPTARG=$2
_=$OPTARG
shift ;;
-i | --icon)
[ $# -le 1 ] && set -- "$1" required && break
OPTARG=$2
_=$OPTARG
shift ;;
-c | --category)
[ $# -le 1 ] && set -- "$1" required && break
OPTARG=$2
_=$OPTARG
shift ;;
-h | --hint)
[ $# -le 1 ] && set -- "$1" required && break
OPTARG=$2
_=$OPTARG
shift ;;
-? | --help)
usage
exit 0 ;;
--) shift
while [ $# -gt 0 ]; do
REST="${REST} \"\${$(($OPTIND-$#))}\""
shift
done
break ;;
[-]?*) set -- "$1" unknown && break ;;
*) REST="${REST} \"\${$(($OPTIND-$#))}\""
esac
shift
done
[ $# -eq 0 ] && return 0
case $2 in
unknown) echo "unrecognized option '$1'" ;;
noarg) echo "option '$1' doesn't allow an argument" ;;
required) echo "option '$1' requires an argument" ;;
pattern) echo "option '$1' does not match the pattern ($3)" ;;
*) echo "option '$1' validation error: $2"
esac >&2
exit 1
}
eval set -- "$REST"
https://github.com/void-linux/void-packages/blob/master/srcpkgs/herbe/template
https://github.com/dudik/herbe
https://raw.githubusercontent.com/dudik/herbe/24557245869662e1885f286037ecc37038a5f791/notify-send
Comments
Post a Comment