Switch to Workman for everything
Anirudh Oppiliappan x@icyphox.sh
Sat, 19 Sep 2020 22:55:47 +0530
5 files changed,
199 insertions(+),
48 deletions(-)
A
config/fish/functions/qwerty.fish
@@ -0,0 +1,5 @@
+# Defined in /tmp/fish.kneo2V/qwerty.fish @ line 2 +function qwerty --wraps=setxkbmap\ -option\ \'grp:alt_shift_toggle\'\ -layout\ us,ru\ -variant\ \',phonetic\'\ -option\ \'compose:caps\' --description alias\ qwerty=setxkbmap\ -option\ \'grp:alt_shift_toggle\'\ -layout\ us,ru\ -variant\ \',phonetic\'\ -option\ \'compose:caps\' + setxkbmap -option 'grp:alt_shift_toggle' -layout us,ru -variant ',phonetic' -option 'compose:caps' $argv; + export KEYBOARD_LAYOUT="qwerty" +end
A
config/fish/functions/workman.fish
@@ -0,0 +1,5 @@
+# Defined in /tmp/fish.tReLyy/workman.fish @ line 2 +function workman --wraps='setxkbmap us; xmodmap xmodmap/xmodmap.workman && xset r 66' --description 'alias workman=setxkbmap us; xmodmap xmodmap/xmodmap.workman && xset r 66' + setxkbmap us; xmodmap ~/leet/xmodmap/xmodmap.workman && xset r 66 $argv; + export KEYBOARD_LAYOUT="workman" +end
M
home/.tmux.conf
→
home/.tmux.conf
@@ -1,6 +1,7 @@
set -g prefix C-q unbind-key C-b bind-key C-q send-prefix +set -g update-environment "KEYBOARD_LAYOUT" bind r source-file ~/.tmux.conf@@ -14,14 +15,14 @@ set -g base-index 1
setw -g pane-base-index 1 # pane binds -bind -n M-j select-pane -D -bind -n M-k select-pane -U -bind -n M-h select-pane -L -bind -n M-l select-pane -R +bind -n M-n select-pane -D +bind -n M-e select-pane -U +bind -n M-y select-pane -L +bind -n M-o select-pane -R # window binds -bind -n C-M-h previous-window -bind -n C-M-l next-window +bind -n C-y previous-window +bind -n C-o next-window bind-key v split-window -h bind-key s choose-session bind-key ) swap-window -t +2@@ -36,9 +37,29 @@ bind -n M-down set -q status off
bind -n M-up set -q status on bind P paste-buffer -bind-key -T copy-mode-vi v send-keys -X begin-selection -bind-key -T copy-mode-vi y send-keys -X copy-selection -bind-key -T copy-mode-vi r send-keys -X rectangle-toggle +# workman layout +bind-key o next-window + +bind-key -T copy-mode-vi n send-keys -X cursor-down +bind-key -T copy-mode-vi e send-keys -X cursor-up +bind-key -T copy-mode-vi y send-keys -X cursor-left +bind-key -T copy-mode-vi o send-keys -X cursor-right +bind-key -T copy-mode-vi k send-keys -X search-again +bind-key -T copy-mode-vi K send-keys -X search-reverse +bind-key -T copy-mode-vi N send-keys -X scroll-down +bind-key -T copy-mode-vi E send-keys -X scroll-up +bind-key -T copy-mode-vi Y send-keys -X top-line +bind-key -T copy-mode-vi O send-keys -X bottom-line +bind-key -T copy-mode-vi h send-keys -X next-word-end +bind-key -T copy-mode-vi H send-keys -X next-space-end +bind-key -T copy-mode-vi l send-keys -X other-end +bind-key -T copy-mode-vi c-n send-keys -X copy-selection + +bind-key -T choice-mode n send-keys -X down +bind-key -T choice-mode e send-keys -X up +bind-key -T choice-mode c-n send-keys -X choose + +bind-key -T edit-mode-vi c-n send-keys -X enter bind E command-prompt -p "Command:" \ "run \"tmux list-panes -a -F '##{session_name}:##{window_index}.##{pane_index}' \
M
home/.vimrc
→
home/.vimrc
@@ -3,6 +3,7 @@ "(_)_ __ (_) |___ _(_)_ __ ___
"| | '_ \| | __\ \ / / | '_ ` _ \ "| | | | | | |_ \ V /| | | | | | | "|_|_| |_|_|\__(_)_/ |_|_| |_| |_| +" call plug#begin()@@ -20,6 +21,7 @@ Plug 'Clavelito/indent-awk.vim'
Plug 'wellle/targets.vim' Plug 'tpope/vim-rsi' Plug 'zah/nim.vim' +Plug 'easymotion/vim-easymotion' call plug#end() " indentation@@ -209,3 +211,156 @@ let &t_SI .= "\e[6 q"
let &t_EI .= "\e[2 q" let &t_SR .= "\e[4 q" endif + +" for the Workman layout + +" --- Keyboard ---------------------------------------------------------------------- +function Keyboard(type) + if a:type == "workman" + + " --- Movement --- + noremap o l| " move right + noremap e k| " move up + noremap n j| " move downn + noremap y h| " move left + + noremap <C-f> <C-u>| " move half page up + noremap <C-h> <C-d>| " move half page down + noremap <C-v> <C-b>| " move one page up + noremap <C-t> <C-f>| " move one page down + noremap <C-r> <C-e>| " scroll text up + noremap <C-j> <C-y>| " scroll text down + + noremap Y H| " move to top of screen + noremap L M| " move to middle of screen + noremap O L| " move to bottom of screen + + noremap d w| " move to beginning of next word + noremap D W| " move to beginning of next word after a whitespace + noremap v b| " move to previous beginning of word + noremap V B| " move to beginning of previous word before a whitespace + noremap r e| " move to end of word + noremap R E| " move to end of word before a whitespace + noremap gr ge| " move to previous end of word + noremap gR gE| " move to previous end of word before a whitespace + + " zz scroll the line with the cursor to the center of the screen + noremap zb zt| " scroll the line with the cursor to the top + noremap zv zb| " scroll the line with the cursor to the bottom + + " --- Insert --- + " a append text after the cursor + " A append text at the end of the line + noremap u i| " insert text before the cursor + noremap U I| " insert text before the first non-blank in the line + noremap p o| " begin a new line below the cursor and insert text + noremap P O| " begin a new line above the cursor and insert text + + " --- Del, Change, Yank, Past, Undo, Redo --- + noremap h d| " del text under {motion} + noremap H D| " del to end of line + " x del character below cursor + " s substitute char under cursor + " s substitute entire line + noremap m c| " change {motion} text (into register) and begin insert + noremap M C| " change to end of line + noremap w r| " replace current character + noremap W R| " replace character until esc + + noremap j y| " yank + noremap J Y| " yank line + noremap ; p| " put below current line + noremap : P| " put abowe current line + + noremap f u| " undo + " ctrl+r redo + + " --- Search --- + " * next whole word under cursor + " # previous whole word under cursor + " g* next matching search (not whole word) pattern under cursor + " g# previous matching search (not whole word) pattern under cursor + noremap k n| " next matching search pattern + noremap K N| " previous matching search pattern + + noremap t f| " to next 'X' after cursor, in the same line (X is any character) + noremap T F| " to previous 'X' before cursor + noremap b t| " til next 'X' (similar to above, but cursor is before X) + noremap B T| " till previous 'X' + noremap i ;| " repeat above, in same direction + noremap I :| " repeat above, in reverse direction + + noremap c v| " enter visual mode + noremap <C-c> <C-v>| " enter visual block mode + + silent! unmap jj + imap nn <Esc>| " use 'nn' to exit insert mode + + else " qwerty + call UnmapWorkman() + endif +endfunction + +function UnmapWorkman() + + " --- Unmap Workman keys --- + silent! unmap o + silent! unmap e + silent! unmap n + silent! unmap y + silent! unmap <C-f> + silent! unmap <C-h> + silent! unmap <C-v> + silent! unmap <C-t> + silent! unmap <C-r> + silent! unmap <C-j> + silent! unmap Y + silent! unmap L + silent! unmap O + silent! unmap d + silent! unmap D + silent! unmap v + silent! unmap V + silent! unmap r + silent! unmap R + silent! unmap gr + silent! unmap gR + silent! unmap zb + silent! unmap zv + silent! unmap u + silent! unmap U + silent! unmap p + silent! unmap P + silent! unmap h + silent! unmap H + silent! unmap m + silent! unmap M + silent! unmap w + silent! unmap W + silent! unmap j + silent! unmap J + silent! unmap ; + silent! unmap : + silent! unmap f + silent! unmap k + silent! unmap K + silent! unmap t + silent! unmap T + silent! unmap b + silent! unmap B + silent! unmap i + silent! unmap I + silent! unmap c + silent! unmap <C-c> + + silent! unmap nn + imap jj <Esc>| " use 'jj' to exit insert mode + +endfunction + + +autocmd VimEnter * call Keyboard("workman")| " load workman layout at startup + +" quickly change layouts - default <Leader> = \ +:noremap <Leader>q :call Keyboard("qwerty")<CR>:echom "qwerty keyboard layout"<CR> +:noremap <Leader>w :call Keyboard("workman")<CR>:echom "workman keyboard layout"<CR>
M
weechat/weechat.conf
→
weechat/weechat.conf
@@ -392,45 +392,10 @@ [layout]
default.buffer = "core;weechat;1" default.buffer = "irc;server.rizon;2" default.buffer = "irc;rizon.#buddy;3" -default.buffer = "irc;rizon.#bullshit;4" -default.buffer = "irc;rizon.#crimson;5" -default.buffer = "irc;rizon.#homescreen;6" -default.buffer = "irc;rizon.#rice;7" -default.buffer = "python;makera-org.slack.com;8" -default.buffer = "python;makera-org.slack.com.#bugs;9" -default.buffer = "python;makera-org.slack.com.#celebrations;10" -default.buffer = "python;makera-org.slack.com.#design;11" -default.buffer = "python;makera-org.slack.com.#dev;12" -default.buffer = "python;makera-org.slack.com.#general;13" -default.buffer = "python;makera-org.slack.com.#innerjourney;14" -default.buffer = "python;makera-org.slack.com.#legal;15" -default.buffer = "python;makera-org.slack.com.#makera;16" -default.buffer = "python;makera-org.slack.com.#random;17" -default.buffer = "python;makera-org.slack.com.#ycombinator;18" -default.buffer = "python;makera-org.slack.com.Abhishek;19" -default.buffer = "python;makera-org.slack.com.Anirudh;20" -default.buffer = "python;makera-org.slack.com.Dish;21" -default.buffer = "python;makera-org.slack.com.GitHub;22" -default.buffer = "python;makera-org.slack.com.Kavya;23" -default.buffer = "python;makera-org.slack.com.Vishesh;24" -default.buffer = "python;teamcometchat.slack.com;25" -default.buffer = "python;teamcometchat.slack.com.&breakouts-pro;26" -default.buffer = "python;teamcometchat.slack.com.&hipaa;27" -default.buffer = "python;teamcometchat.slack.com.&interns-pro;28" -default.buffer = "python;teamcometchat.slack.com.&xmpp-pro;29" -default.buffer = "python;teamcometchat.slack.com.AjayGajra,Bosky,KetanYekale,RaviRanjan;30" -default.buffer = "python;teamcometchat.slack.com.#general;31" -default.buffer = "python;teamcometchat.slack.com.PrathameshMajgaonkar,RaviRanjan;32" -default.buffer = "python;teamcometchat.slack.com.#product-releases;33" -default.buffer = "python;teamcometchat.slack.com.#random;34" -default.buffer = "python;teamcometchat.slack.com.#spotlight;35" -default.buffer = "python;teamcometchat.slack.com.AjayGajra;36" -default.buffer = "python;teamcometchat.slack.com.AjayPrabhakar;37" -default.buffer = "python;teamcometchat.slack.com.Bosky;38" -default.buffer = "python;teamcometchat.slack.com.donut;39" -default.buffer = "python;teamcometchat.slack.com.KetanYekale;40" -default.buffer = "python;teamcometchat.slack.com.PrathameshMajgaonkar;41" -default.buffer = "python;teamcometchat.slack.com.RaviRanjan;42" +default.buffer = "irc;rizon.#crimson;4" +default.buffer = "irc;rizon.#homescreen;5" +default.buffer = "irc;rizon.#rice;6" +default.buffer = "irc;rizon.*status;7" default.window = "1;0;0;0;irc;rizon.Carp" default.current = on _zoom.window = "1;0;0;0;irc;freenode.##crustaceans"