summaryrefslogtreecommitdiff
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
parent926c3860ad0ce0464eaad00804556b204b1b7d71 (diff)
Add compose key
-rwxr-xr-xbin/bin/keyboard42
-rwxr-xr-xbin/bin/tmux_attach2
-rw-r--r--qutebrowser/.config/qutebrowser/config.py3
-rw-r--r--surfraw/.surfraw.conf2
4 files changed, 30 insertions, 19 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"
diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py
index bdd980d..6b123af 100644
--- a/qutebrowser/.config/qutebrowser/config.py
+++ b/qutebrowser/.config/qutebrowser/config.py
@@ -3,7 +3,7 @@
# qute://help/settings.html
c.downloads.location.prompt = False
-c.editor.command = ['urxvt', '-e', 'vim', '-f', '{}']
+c.editor.command = ['urxvt', '-e', 'nvim', '-f', '{}']
c.hints.chars = 'aoeuidhtns'
c.hints.uppercase = True
c.tabs.favicons.show = False
@@ -37,6 +37,7 @@ config.bind("<Ctrl-F>", 'fake-key <Right>', mode='insert')
config.bind("<Ctrl-B>", 'fake-key <Left>', mode='insert')
config.bind("<Ctrl-N>", 'fake-key <Down>', mode='insert')
config.bind("<Ctrl-P>", 'fake-key <Up>', mode='insert')
+config.bind("<Ctrl-i>", 'open-editor', mode='insert')
# Bindings for command mode
config.bind('<Ctrl-W>', 'fake-key -g <Ctrl-Backspace>', mode='command')
diff --git a/surfraw/.surfraw.conf b/surfraw/.surfraw.conf
index 6985ac2..07cedef 100644
--- a/surfraw/.surfraw.conf
+++ b/surfraw/.surfraw.conf
@@ -1,3 +1,3 @@
-SURFRAW_graphical_browser=firefox
+SURFRAW_graphical_browser=/usr/bin/xdg-open
SURFRAW_text_browser=w3m
SURFRAW_graphical=yes