sttemp

Simple template manager
git clone git://git.konyahin.xyz/sttemp
Log | Files | Refs | LICENSE

stnote (396B)


      1 #!/usr/bin/env sh
      2 
      3 set -eu
      4 
      5 . ~/.profile
      6 
      7 export STTEMP_ASK=$(
      8 	cat <<'EOF'
      9 ask () {
     10 	echo $(dmenu -p "Enter $1" </dev/null)
     11 }
     12 EOF
     13 )
     14 
     15 
     16 export BODY=$(xclip -o)
     17 
     18 xdotool key --clearmodifiers "Ctrl+l"
     19 xdotool key --clearmodifiers "Ctrl+c"
     20 export URL=$(xclip -o -selection primary)
     21 xdotool key --clearmodifiers "Escape"
     22 
     23 sttemp webnote >> "$SCRATCH_PATH"
     24 notify-send -t 1500 "Saved to scratch file."