SandS memo

SandS stands for Space-and-Shift.

1 Prerequiste

  • Fundamental compilation environment e.g. make, cc
  • git

2 Download xcape

Download xcape to somewhere and install.

% cd somewhere-to-download
% git clone https://github.com/alols/xcape.git
% cd xcape
% make && sudo make install
% cd ../
% rm -rf xcape

3 Write script with xcape

Save shellscript to somewhere e.g. $HOME/sands.sh.

#!/bin/sh
# SandS configuration
if pgrep -x xcape ; then
  killall xcape # to prevent xcape daemon duplication
fi
xmodmap -e 'keycode 255=space'
xmodmap -e 'keycode 65=Shift_L'
env xcape -e '#65=space'

Then add exec permission.

% chmod u+x sands.sh

4 Configure .xinitrc to load the script on X11 session starting up

Edit ~/.xinitrc.

# append
$HOME/sands.sh

Author: Windymelt

Created: 2017-08-25 Fri 00:23

Emacs 25.2.1 (Org mode 8.2.10)

Validate