dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

notify (290B)


      1 #!/bin/sh
      2 
      3 prog=notify-send
      4 if ! command -v $prog >/dev/null 2>&1; then
      5 	if ! command -v xmessage >/dev/null 2>&1; then
      6 		printf '%s error: %s or xmessage not available' "${0##*/}" "$prog" >&2
      7 		exit 1
      8 	else
      9 		prog=xmessage
     10 	fi
     11 fi
     12 
     13 if [ $# -eq 0 ]; then
     14 	$prog "$(cat)"
     15 else
     16 	$prog "$@"
     17 fi