dots

Personal dotfiles
git clone git://git.gormless.xyz/dots.git
Log | Files | Refs

drawterm (329B)


      1 #!/bin/sh
      2 # spawn a new terminal window inside a drawn rectangle
      3 
      4 set -e
      5 
      6 #wglyph=9
      7 #hglyph=19
      8 wglyph=6
      9 hglyph=14
     10 border=10
     11 
     12 slop | tr 'x+' ' ' | {
     13 	read w h x y
     14 	w=$(( ( w - border ) / wglyph ))
     15 	h=$(( ( h - border ) / hglyph ))
     16 	test "$1" = -e && exec st -g ${w}x${h}+${x}+${y} $(echo $@) || exec st -g ${w}x${h}+${x}+${y} &
     17 }