Skip to content

Instantly share code, notes, and snippets.

@naps62
Last active October 7, 2016 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naps62/324143ce8bc7fcc0e3464471969e3155 to your computer and use it in GitHub Desktop.
Save naps62/324143ce8bc7fcc0e3464471969e3155 to your computer and use it in GitHub Desktop.
screenkey setup for live coding display of key presses
#!/bin/sh
# grab screen width and height
resolution=$(xrandr | grep '*' | head -n1 | tr -s ' ' | cut -d ' ' -f2)
resolution_width=$(echo $resolution | cut -d 'x' -f1)
resolution_height=$(echo $resolution | cut -d 'x' -f2)
# overlay will have full width, 80px height
width=$resolution_width
height=80
# complete overlay geometry, pushing it to the bottom
geometry=${resolution_width}x${height}+0+$(($resolution_height - $height))
screenkey \
-g $geometry \
-p fixed \
--mods-only \
-t 1 \
--font "Source Code Pro Bold" \
--no-detach \
--no-systray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment