dot/xinitrc, dot/xmodmap, setup: Configure keyboard using xmodmap files.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 3 Nov 2012 11:29:55 +0000 (11:29 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Nov 2012 11:39:54 +0000 (11:39 +0000)
Separate out the existing xmodmap hacking into a dotfile, and allow a
local one.

I'm changing over to swapping the caps-lock and control, but I don't
know how to do this without using explicit keycodes which probably isn't
appropriate for global configuration.  (Maybe this can be an mdw.conf
thing.)

dot/xinitrc
dot/xmodmap [new file with mode: 0644]
setup

index 8fce589..9875cad 100755 (executable)
@@ -99,7 +99,10 @@ initialize () {
   run init xset m 2 1
 
   ## Key mappings.
-  xmodmap -e 'keysym BackSpace = BackSpace BackSpace'
+  xmodmap $HOME/.xmodmap
+  if [ -r $HOME/.xmodmap-local ]; then
+    xmodmap $HOME/.xmodmap-local
+  fi
 }
 
 ###--------------------------------------------------------------------------
diff --git a/dot/xmodmap b/dot/xmodmap
new file mode 100644 (file)
index 0000000..49be358
--- /dev/null
@@ -0,0 +1,4 @@
+!!! -*-conf-*-
+
+!! Remove the binding of the backspace key to Terminate_Server.
+keysym BackSpace = BackSpace BackSpace
diff --git a/setup b/setup
index f84d799..82898ef 100755 (executable)
--- a/setup
+++ b/setup
@@ -152,7 +152,7 @@ dotfiles="
   w3m-config:.w3m/config elinks.conf:.elinks/elinks.conf
   dircolors colordiffrc screenrc cvsrc indent.pro"
 [ "$xstuff" ] && dotfiles="$dotfiles
-  xinitrc xsession Xdefaults vncrc vncsession
+  xinitrc xsession xmodmap Xdefaults vncrc vncsession
   fonts.conf
   stalonetrayrc
   putty-defaults:.putty/sessions/Default%20Settings