summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2017-12-13 12:28:03 +0100
committerUrbain Vaes <urbain@vaes.uk>2017-12-13 12:28:03 +0100
commit7bcbd631e3973f86905fbc5769850dc795bfdc38 (patch)
treeea55d93dc49ff2a1d3ad490528e77f338dfc6de4 /bin
parent926c3860ad0ce0464eaad00804556b204b1b7d71 (diff)
Add compose key
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bin/keyboard42
-rwxr-xr-xbin/bin/tmux_attach2
2 files changed, 27 insertions, 17 deletions
diff --git a/bin/bin/keyboard b/bin/bin/keyboard
index ec11f7b..c63f027 100755
--- a/bin/bin/keyboard
+++ b/bin/bin/keyboard
@@ -1,19 +1,39 @@
+# Xcape settings
+killall -9 xcape
+
+# Compose key on left control
+# https://vi.stackexchange.com/questions/2254/what-is-the-easiest-way-to-insert-unicode-characters-into-a-document
+setxkbmap -option compose:ralt
+
# Dvorak programer
setxkbmap us -variant dvp
-# Make caps lock a Control
+# Make Control_L and 'key 94' (Mode_switch, Multi_key)
+# https://unix.stackexchange.com/questions/55076/what-is-the-mode-switch-modifier-for
+xmodmap -e "remove Control = Control_L"
+xmodmap -e "keycode 94 = Mode_switch"
+xmodmap -e "keysym Control_L = Mode_switch"
+xcape -e 'Mode_switch=Multi_key'
+
+# Make Caps_Lock (Control_L, Escape)
xmodmap -e "clear Lock"
xmodmap -e "keysym Caps_Lock = Control_L Caps_Lock"
xmodmap -e "add Control = Control_L"
+xcape -e 'Control_L=Escape'
-# Remap modifiers (Keyboard dependent)
-xmodmap -e "keycode 94 = Mode_switch"
+# Make Tab (Alt_L, Tab)
+xmodmap -e "keysym Tab = Alt_L"
+xmodmap -e "keycode any = Tab"
+xcape -e 'Alt_L=Tab'
-# Remap modifiers (Keyboard independent)
+# Make space (Super_L, space)
xmodmap -e "keysym space = Super_L"
+xmodmap -e "add mod4 = Super_L"
xmodmap -e "keycode any = space"
-xmodmap -e "keysym Tab = Alt_L"
-xmodmap -e "keycode any = Tab"
+xcape -e 'Super_L=space'
+
+# Make eject an Insert
+xmodmap -e "keysym XF86Eject = Insert"
# Numbers
xmodmap -e "keysym d = d D 0"
@@ -26,13 +46,3 @@ xmodmap -e "keysym n = n N 6"
xmodmap -e "keysym g = g G 7"
xmodmap -e "keysym c = c C 8"
xmodmap -e "keysym r = r R 9"
-
-# Special characters
-xmodmap -e "keysym XF86Eject = Insert"
-
-# Xcape settings
-killall -9 xcape
-
-xcape -e 'Control_L=Escape'
-xcape -e 'Super_L=space'
-xcape -e 'Alt_L=Tab'
diff --git a/bin/bin/tmux_attach b/bin/bin/tmux_attach
index 75fe649..9d5488a 100755
--- a/bin/bin/tmux_attach
+++ b/bin/bin/tmux_attach
@@ -12,4 +12,4 @@ grep -Fxq "$SESSION" <(echo "$TMUXINATOR") \
&& COMMAND="tmuxinator start $SESSION" \
|| COMMAND="tmux new-session -A -s $SESSION"
-urxvt -e zsh -c "source ~/.zshrc && $COMMAND"
+exec urxvt -e zsh -c "$COMMAND"