diff options
author | Martin Fischer <martin@push-f.com> | 2024-12-01 10:55:58 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-11 08:37:52 +0100 |
commit | c363b1a07dde605947c556ead7955c8f3c532d19 (patch) | |
tree | cffe3e58f35d6d7b590c59483bbdf47c0b32887b | |
parent | 09dc1fefcf73dd3e57939105c22d050a65222211 (diff) |
add custom keyboard layout
I've been using my own custom variant of Colemak Mod-DH since at least 2019.
-rw-r--r-- | colematik/colematik.xkb | 31 | ||||
-rw-r--r-- | user/sway/config | 20 |
2 files changed, 43 insertions, 8 deletions
diff --git a/colematik/colematik.xkb b/colematik/colematik.xkb new file mode 100644 index 0000000..51ee77f --- /dev/null +++ b/colematik/colematik.xkb @@ -0,0 +1,31 @@ +xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { + include "pc+us(colemak)" + include "ctrl(swap_lalt_lctl)" + + name[Group1]= "Colematik"; + + # Mod-DH + key <AD05> {[ b, B ]}; + key <AC05> {[ g, G ]}; + key <AB04> {[ d, D ]}; + key <AB05> {[ v, V ]}; + + key <AC06> {[ k, K ]}; + key <AB06> {[ m, M ]}; + key <AB07> {[ h, H ]}; + + key <RWIN> {[ Multi_key ]}; + + # more intuitive German umlauts + key <AC01> {[ a, A, adiaeresis, Adiaeresis ]}; + key <AD08> {[ u, U, udiaeresis, Udiaeresis ]}; + key <AC10> {[ o, O, odiaeresis, Odiaeresis ]}; + + include "inet(evdev)+terminate(ctrl_alt_bksp)" + }; + xkb_geometry { include "pc(pc105)" }; +}; diff --git a/user/sway/config b/user/sway/config index fc1967f..3fafa93 100644 --- a/user/sway/config +++ b/user/sway/config @@ -5,10 +5,10 @@ # Logo key. Use Mod1 for Alt. set $mod Mod4 # Home row direction keys, like vim -set $left h -set $down j -set $up k -set $right l +set $left k +set $down n +set $up e +set $right i # Your preferred terminal emulator set $term foot # Your preferred application launcher @@ -54,6 +54,10 @@ output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_19 # You can get the names of your inputs by running: swaymsg -t get_inputs # Read `man 5 sway-input` for more information about this section. +input "type:keyboard" { + xkb_file "~/config/colematik/colematik.xkb" +} + ### Key bindings # # Basics: @@ -62,7 +66,7 @@ output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_19 bindsym $mod+Return exec $term # Kill focused window - bindsym $mod+Shift+q kill + bindsym $mod+Shift+c kill # Start your launcher bindsym $mod+d exec $menu @@ -75,10 +79,10 @@ output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_19 floating_modifier $mod normal # Reload the configuration file - bindsym $mod+Shift+c reload + bindsym $mod+Shift+r reload # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' + bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' # # Moving around: # @@ -142,7 +146,7 @@ output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_19 # Switch the current container between different layout styles bindsym $mod+s layout stacking bindsym $mod+w layout tabbed - bindsym $mod+e layout toggle split + bindsym $mod+t layout toggle split # Make the current focus fullscreen bindsym $mod+f fullscreen |