[download]

local/bin/notify

   1 #!/bin/bash
   2 
   3 c=${1##*/} c=${c#_}
   4 f=~/.cache/${0##*/}
   5 
   6 [[ $DISPLAY ]] || exec $* >(
   7 sed 's/^\s*$/ /' | column -ts $'\t')
   8 
   9 source ~/.theme/sh
  10 notify-send -a notify-$c -i $f.svg -- "${c^}" "$(
  11     $* | awk '{ print substr($0, 0, 80) }'     | iconv -c |
  12     sed 's/^\s*$/ /; s/</\&lt;/g; s/>/\&gt;/g' | column -ts $'\t' | tee $f
  13 
  14     printf '<svg width="22" height="22"><text font-family="Nerdfont"
  15     y="18" font-size="20" fill="%s">%s</text></svg>' $foreground $(icon $c) > $f.svg
  16 )"