From ebae3707b36e9a83014ef08271d75bd9826bb999 Mon Sep 17 00:00:00 2001 From: ensa Date: Thu, 16 Sep 2021 17:37:41 -0700 Subject: organization and replacements, fixes bin/ bother, mbsync-cron, rsschk: notify-send switched to notif catgirl-open.sh: simplified comm-sel: removed cordless kbsetup: sets up keyboard stuff lh: cleanup added mov and wav support audio files now create a terminal mpv notif: sends notification to xnotify config/ X11/ xprofile: replaced keyboard lines with kbsetup replaced dunst with xnotify/tiramisu added a line for cleaning up catgirl-open.sh xresources: xnotify resources betteresc: xmodmap file for easy-to-access hyper key color/colors.sh: cleaned up dunst/dunstrc: removed lf/lfrc: fixed prompt replaced notify-send with notif shrc: moved MEDNAFEN_HOME to $HOME_EXT vis/visrc.lua: add ctags, fix hyper|esc issue --- bin/notif | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 bin/notif (limited to 'bin/notif') diff --git a/bin/notif b/bin/notif new file mode 100755 index 0000000..5e75fd8 --- /dev/null +++ b/bin/notif @@ -0,0 +1,35 @@ +#!/bin/sh +# sends xnotify a notification +unset TAG SEC +exec > ${XNOTIFY_FIFO:=$HOME_CACHE/xnotify$DISPLAY.fifo} +ug_err() +{ + echo "${1}" 1>&2 && return "${2:-1}" +} +usage() +{ + ug_err "usage: ${0##*/} [ -s seconds ] [ -t tag ] [BODY] + -s seconds seconds for notification to live + -t tag category of notification" + exit +} +while getopts s:t: arg; do + case ${arg} in + s) SEC=${OPTARG};; + t) TAG=${OPTARG};; + *) usage;; + esac +done +if [ -n "$SEC" ]; then + printf 'SEC:%s\t' "$SEC" + shift 2 +fi +if [ -n "$TAG" ]; then + printf 'TAG:%s\t' "$TAG" + shift 2 +fi +case "$#" in + 1) printf '%s\n' "$1";; + 2) printf '%s\t%s\n' "$1" "$2";; + *) exit;; +esac -- cgit 1.4.1-2-gfad0