dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 35bdf49ea33b4efdb6b57346d7090abb885a31a2
parent cf4aa5161ea069c5213056ff25bd9c8974262e7d
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Fri, 24 Jan 2014 11:17:12 +0100

Caps as Ctrl, done with setxkbmap

Diffstat:
M.Xmodmap | 11+++++++++--
M.i3/config | 3++-
M.xinitrc | 8++++----
Mbin/keyboard-layout-switch.sh | 6++++++
4 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/.Xmodmap b/.Xmodmap @@ -1,2 +1,9 @@ -remove Lock = Caps_Lock -keysym Caps_Lock = Escape +! Map caps lock to escape +!keysym Caps_Lock = Escape + +remove mod1 = Alt_L +remove mod1 = Alt_R +remove mod4 = Super_L +add mod1 = Super_L +add mod4 = Alt_L +add mod4 = Alt_R diff --git a/.i3/config b/.i3/config @@ -183,7 +183,8 @@ bar { position bottom mode dock workspace_buttons yes - tray_output none + #tray_output none + tray_output primary font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 diff --git a/.xinitrc b/.xinitrc @@ -6,9 +6,9 @@ xsetroot -solid '#222222' & # Disable beeps xset -b -# Keyboard layout +# Keyboard layout with caps as ctrl #setxkbmap dk -setxkbmap us +setxkbmap us -option ctrl:nocaps # Read .xbindkeysrc for special key-bindings xbindkeys @@ -25,8 +25,8 @@ xset +dpms # Energy Star features on xset dpms 300 600 900 # standby -> suspend -> off (seconds) # mouse acceleration (xset m <acceleration> <threshold>) -#xset m 3/2 4 -xset m 2/1 4 +xset m 3/2 4 +#xset m 2/1 4 # Set dim LCD brightness #xbacklight -set 30 & diff --git a/bin/keyboard-layout-switch.sh b/bin/keyboard-layout-switch.sh @@ -7,11 +7,15 @@ LAYOUTFILE="$HOME/.kbd-layout" LANG1="us" LANG2="dk" +# make the caps lock key a ctrl key +OPTS="-option ctrl:nocaps" + # write the file if it doesn't exist if [ ! -f $LAYOUTFILE ]; then echo 'echo "us" > $LAYOUTFILE' echo "us" > $LAYOUTFILE setxkbmap $LANG1 + xmodmap ~/.Xmodmap $OPTS exit fi @@ -21,7 +25,9 @@ CURRLANG="`cat $LAYOUTFILE`" if [ "$CURRLANG" == "$LANG1" ]; then echo $LANG2 > $LAYOUTFILE setxkbmap $LANG2 + xmodmap ~/.Xmodmap $OPTS else echo $LANG1 > $LAYOUTFILE setxkbmap $LANG1 + xmodmap ~/.Xmodmap $OPTS fi