diff --git a/arch-root/install.sh b/arch-root/install.sh index fda7824..6b45b65 100755 --- a/arch-root/install.sh +++ b/arch-root/install.sh @@ -13,7 +13,7 @@ PACKAGES=( nodejs dash # cli programs - vifm vim # navigation & editors + vifm vim less # navigation & editors shellcheck # shell scripting hugo miniserve neomutt translate-shell # www gnupg pass pass-otp # crypt diff --git a/arch-user/config/less/lesskey b/arch-user/config/less/lesskey new file mode 100644 index 0000000..4852d1d --- /dev/null +++ b/arch-user/config/less/lesskey @@ -0,0 +1,48 @@ +###### colemak dh movement ##### + +# n -> h +#n Help +#N Help + +# e -> k +e back-line +^E back-line +E back-line-force + +# i -> j +i forw-line +J forw-line-force + +# o -> l +^O repaint + + +# k -> n +^K forw-line +k repeat-search +\ek repeat-search-all +K reverse-search +\eK reverse-search-all +^O^K osc8-forw-search +^Ok osc8-forw-search +:k next-file + +# j -> e +j forw-line +^J forw-line +J examine +:j examine + +# l -> i +# noop + +# h -> o +^H^H osc8-open + +############################ + + +######### custom ########### +n left-scroll +o right-scroll +############################ diff --git a/arch-user/config/readline/inputrc b/arch-user/config/readline/inputrc index dc42395..1550d32 100644 --- a/arch-user/config/readline/inputrc +++ b/arch-user/config/readline/inputrc @@ -7,30 +7,49 @@ set vi-cmd-mode-string \1\e[2 q\2 ################################# ##### remap - colemak-dh ####### -set keymap vi-command # n -> h +set keymap vi-insert +"\C-n":backward-delete-char +set keymap vi-command "n":backward-char -"N":beginning-of-line +"\C-n":backward-char # e -> k +set keymap vi-command "e":previous-history "\C-e":kill-line # i -> j +#set keymap vi-insert +# "\C-i":accept-line # ascii code conflicts with tab +set keymap vi-command "i":next-history -"\C-i":accept-line +# "\C-i":accept-line # ascii code conflicts with tab # o -> l +set keymap vi-command "o":forward-char "\C-o":clear-screen # k -> n +#set keymap vi-insert +#"\C-k":menu-complete # bound to intr, use tab +set keymap vi-command "k":vi-search-again "K":vi-search-again +"\C-k":next-history # j -> e +set keymap vi-insert +"\C-e":self-insert +set keymap vi-command "j":vi-end-word "J":vi-end-word # l -> i +set keymap vi-insert +"\C-l":complete +set keymap vi-command "l":vi-insertion-mode "L":vi-insert-beg # h -> o -# noop +set keymap vi-insert +"\C-h":operate-and-get-next + ################################# diff --git a/arch-user/config/sway/config.tmpl b/arch-user/config/sway/config.tmpl index 7233965..576f4a1 100644 --- a/arch-user/config/sway/config.tmpl +++ b/arch-user/config/sway/config.tmpl @@ -104,16 +104,19 @@ bindsym --to-code { } # bottom row - 3d bindsym --to-code { - $mod+x scratchpad show + $mod+d scratchpad show $altmod+x sticky enable; move scratchpad - $mod+v focus floating - $altmod+v floating enable; sticky enable - $mod+d focus tiling - $altmod+d focus floating; floating disable; sticky disable; + $mod+z focus tiling + $altmod+z focus floating; floating disable; sticky disable + $mod+h focus floating + $altmod+h floating enable; sticky enable $mod+k focus prev sibling $mod+Comma opacity minus 0.05 $mod+Period opacity plus 0.05 $mod+slash focus next sibling + $mod+x exec wtype -M ctrl x -m ctrl + $mod+c exec wtype -M ctrl c -m ctrl + $mod+v exec wtype -M ctrl v -m ctrl } floating_modifier $mod normal ############################################ diff --git a/arch-user/gen-linux-compat.sh b/arch-user/gen-linux-compat.sh index 75528af..5de9677 100755 --- a/arch-user/gen-linux-compat.sh +++ b/arch-user/gen-linux-compat.sh @@ -7,3 +7,4 @@ umask 002 export IS_COMPAT=1 gomplate --file config/vim/vimrc --out ../linux-compat/home/.vimrc gomplate --file config/readline/inputrc --out ../linux-compat/home/.inputrc +gomplate --file config/less/lesskey --out ../linux-compat/home/.lesskey diff --git a/arch-user/install.sh b/arch-user/install.sh index 7d6f828..79212b3 100755 --- a/arch-user/install.sh +++ b/arch-user/install.sh @@ -81,6 +81,7 @@ gomplate --input-dir config \ ln -sf ~/.config/bash/bashrc ~/.bashrc ln -sf ~/.config/profile ~/.profile +ln -sf ~/.config/less/lesskey ~/.lesskey mkdir -p ~/.gnupg && ln -sf ~/.config/gnupg/gpg-agent.conf ~/.gnupg ################################ diff --git a/linux-compat/home/.inputrc b/linux-compat/home/.inputrc index dc42395..1550d32 100644 --- a/linux-compat/home/.inputrc +++ b/linux-compat/home/.inputrc @@ -7,30 +7,49 @@ set vi-cmd-mode-string \1\e[2 q\2 ################################# ##### remap - colemak-dh ####### -set keymap vi-command # n -> h +set keymap vi-insert +"\C-n":backward-delete-char +set keymap vi-command "n":backward-char -"N":beginning-of-line +"\C-n":backward-char # e -> k +set keymap vi-command "e":previous-history "\C-e":kill-line # i -> j +#set keymap vi-insert +# "\C-i":accept-line # ascii code conflicts with tab +set keymap vi-command "i":next-history -"\C-i":accept-line +# "\C-i":accept-line # ascii code conflicts with tab # o -> l +set keymap vi-command "o":forward-char "\C-o":clear-screen # k -> n +#set keymap vi-insert +#"\C-k":menu-complete # bound to intr, use tab +set keymap vi-command "k":vi-search-again "K":vi-search-again +"\C-k":next-history # j -> e +set keymap vi-insert +"\C-e":self-insert +set keymap vi-command "j":vi-end-word "J":vi-end-word # l -> i +set keymap vi-insert +"\C-l":complete +set keymap vi-command "l":vi-insertion-mode "L":vi-insert-beg # h -> o -# noop +set keymap vi-insert +"\C-h":operate-and-get-next + ################################# diff --git a/linux-compat/home/.lesskey b/linux-compat/home/.lesskey new file mode 100644 index 0000000..4852d1d --- /dev/null +++ b/linux-compat/home/.lesskey @@ -0,0 +1,48 @@ +###### colemak dh movement ##### + +# n -> h +#n Help +#N Help + +# e -> k +e back-line +^E back-line +E back-line-force + +# i -> j +i forw-line +J forw-line-force + +# o -> l +^O repaint + + +# k -> n +^K forw-line +k repeat-search +\ek repeat-search-all +K reverse-search +\eK reverse-search-all +^O^K osc8-forw-search +^Ok osc8-forw-search +:k next-file + +# j -> e +j forw-line +^J forw-line +J examine +:j examine + +# l -> i +# noop + +# h -> o +^H^H osc8-open + +############################ + + +######### custom ########### +n left-scroll +o right-scroll +############################