#!/bin/bash

# swaps escape with caps-lock and lalt with lsuper

# setxkbmap -option caps:swapescape

# setxkbmap -option altwin:swap_lalt_lwin

# setxkbmap -option altwin:swap_alt_win

# make CapsLock behave like Ctrl:
# setxkbmap -option ctrl:nocaps



setxkbmap -option altwin:swap_lalt_lwin,altwin:swap_alt_win,ctrl:nocaps

# make short-pressed Ctrl behave like Escape:
xcape -e 'Control_L=Escape'

# xcape -e 'Caps_Lock=Escape' -t 100

# setxkbmap -option caps:super ; xcape -e 'Super_L=Escape'
