Wednesday, March 22, 2017

Moving around the screen with bash and ascii escape characters

source

Using something like echo -e "\033[3A" lets you move up by 3 lines, indicated by the 3 in "[3A".


- Position the Cursor:
  \033[L;CH
     Or
  \033[L;Cf
  puts the cursor at line L and column C.
- Move the cursor up N lines:
  \033[NA
- Move the cursor down N lines:
  \033[NB
- Move the cursor forward N columns:
  \033[NC
- Move the cursor backward N columns:
  \033[ND

- Clear the screen, move to (0,0):
  \033[2J
- Erase to end of line:
  \033[K

- Save cursor position:
  \033[s
- Restore cursor position:
  \033[u

Thursday, March 16, 2017

python and algorithms

http://interactivepython.org/courselib/static/pythonds/index.html

Wednesday, March 8, 2017

xmonad screen mirroring

This assumes you have the vnc software installed:

sudo apt-get install x11vnc 
sudo apt-get install vncviewer

On workspace to mirror:

x11vnc -usepw -clip xinerama0 -noxdamage -geometry 1920x1080

On workspace to display on projector:

 vncviewer -viewonly -nocursorshape localhost:0