Skip to content

Instantly share code, notes, and snippets.

@orivee
Last active August 14, 2016 04:57
Show Gist options
  • Save orivee/ab0b0a646dcd189cfaa70307b0572e45 to your computer and use it in GitHub Desktop.
Save orivee/ab0b0a646dcd189cfaa70307b0572e45 to your computer and use it in GitHub Desktop.
my xmodmap configuration
#!/bin/bash
# http://askubuntu.com/questions/54157/how-do-i-set-xmodmap-on-login
# http://unix.stackexchange.com/questions/283435/xinitrc-and-xmodmap-startup-item-fail-to-take-effect-on-startup-in-mint-17-3
sleep 5;
xmodmap ~/.Xmodmap
! modify CapsLock to Control, and Shift+CapsLock to CapsLock
! https://wiki.archlinux.org/index.php/Xmodmap#Modifier_keys
clear lock
clear control
clear mod1
add control = Caps_Lock Control_L Control_R
keycode 66 = Control_L Caps_Lock NoSymbol NoSymbol
! swap right control and right alt
! http://askubuntu.com/questions/237564/remap-right-alt-to-behave-as-right-ctrl
remove Control = Control_R
remove Mod1 = Alt_R
keycode 105 = Alt_R
keycode 108 = Control_R
add Control = Control_R
add Mod1 = Alt_R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment