Skip to content

Commit fa15a63

Browse files
committed
ref(kanata): open yazi_cd and clear on any shell
1 parent a77eebd commit fa15a63

File tree

6 files changed

+20
-62
lines changed

6 files changed

+20
-62
lines changed

README.md

+6-22
Original file line numberDiff line numberDiff line change
@@ -552,19 +552,9 @@ lctl lmet @alt @spc @sft rmet rctl
552552

553553
```
554554
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
555-
_ @¿ @sh @vi _ @m🡠 @M↓ @m↓ @m↑ @M↑ @m🡪 _ _ _
556-
_ del spc bspc @yaz @laz @🡠 @↓ @↑ @🡪 @ñ _ _
557-
_ @za @zr caps @cod @vim pgup home end pgdn _ _
558-
_ _ _ _ _ _ _
559-
```
560-
561-
**layer yazi-find** (press and release space+f to enter the layer)
562-
563-
```
564-
_ _ _ _ _ _ _ _ _ _ _ _ _ _
565-
_ /^q /^w /^e /^r /^t /^y /^u /^i /^o /^p _ _ _
566-
_ /^a /^s /^d /^f /^g /^h /^j /^k /^l _ _ _
567-
_ /^z /^x /^c /^v /^b /^n /^m _ _ _ _
555+
_ @¿ _ _ _ @m🡠 @M↓ @m↓ @m↑ @M↑ @m🡪 _ _ _
556+
_ del spc bspc @clr _ @🡠 @↓ @↑ @🡪 @yaz _ _
557+
_ @ñ _ caps _ _ pgup home end pgdn _ _
568558
_ _ _ _ _ _ _
569559
```
570560

@@ -575,16 +565,10 @@ _ _ _ _ _ _ _
575565
| @sft | tap for backspace, hold for LeftShift | `RAlt+l = shift+l` |
576566
| @alt | tap for middle click, hold for LeftAlt | `LAlt+l = LAlt+l` |
577567
| @spc | tap for space, hold for touchcursor layer, release for qwerty layer | `space+jj = DownArrow + DownArrow` |
578-
| @yaz | tap and release then press one key in yazi-find layer (timeout: 500ms) | `space+f l = jump to file` |
579-
| @sh | open shell inside yazi | `space+w` |
580-
| @vim | open with neovim inside yazi | `space+b` |
581-
| @vi | open with $EDITOR inside yazi | `space+e` |
582-
| @cod | open with vscode inside yazi | `space+v` |
583-
| @laz | open lazygit inside yazi | `space+g` |
584-
| @za | zoxide add current working directory inside yazi | `space+z` |
585-
| @zr | zoxide remove current working directory inside yazi | `space+x` |
586-
|| unicode ñ | `space+;` |
568+
| @yaz | open yazi_cd on any shell | `space+f l = jump to file` |
569+
| @clr | clear screen on any shell | `space+f` |
587570
| @¿ | unicode ¿ | `space+q` |
571+
|| unicode ñ | `space+;` |
588572
| @m🡠 | mouse scrolling left | `space+t` |
589573
| @m🡪 | mouse scrolling right | `space+p` |
590574
| @m| mouse scrolling up | `space+i` |

kanata/simple.kbd

+9-37
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,9 @@
6363

6464
(deflayer touchcursor
6565
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
66-
_ @¿ @sh @vi _ @m🡠 @M↓ @m↓ @m↑ @M↑ @m🡪 _ _ _
67-
_ del spc bspc @yaz @laz @🡠 @↓ @↑ @🡪 @ñ _ _
68-
_ @za @zr caps @cod @vim pgup home end pgdn _ _
69-
_ _ _ _ _ _ _
70-
)
71-
72-
(deflayer yazi-find
73-
_ _ _ _ _ _ _ _ _ _ _ _ _ _
74-
_ (macro / S-6 q ret) (macro / S-6 w ret) (macro / S-6 e ret) (macro / S-6 r ret) (macro / S-6 t ret) (macro / S-6 y ret) (macro / S-6 u ret) (macro / S-6 i ret) (macro / S-6 o ret) (macro / S-6 p ret) _ _ _
75-
_ (macro / S-6 a ret) (macro / S-6 s ret) (macro / S-6 d ret) (macro / S-6 f ret) (macro / S-6 g ret) (macro / S-6 h ret) (macro / S-6 j ret) (macro / S-6 k ret) (macro / S-6 l ret) _ _ _
76-
_ (macro / S-6 z ret) (macro / S-6 x ret) (macro / S-6 c ret) (macro / S-6 v ret) (macro / S-6 b ret) (macro / S-6 n ret) (macro / S-6 m ret) _ _ _ _
66+
_ @¿ _ _ _ @m🡠 @M↓ @m↓ @m↑ @M↑ @m🡪 _ _ _
67+
_ del spc bspc @clr _ @🡠 @↓ @↑ @🡪 @yaz _ _
68+
_ @ñ _ caps _ _ pgup home end pgdn _ _
7769
_ _ _ _ _ _ _
7870
)
7971

@@ -105,13 +97,6 @@
10597
;; tap for space, hold for oneshot in touchcursor layout
10698
spc (tap-hold 200 200 spc (one-shot 500 (layer-while-held touchcursor)))
10799

108-
;; press one key in yazi layout
109-
yaz (one-shot 500 (layer-while-held yazi-find))
110-
111-
;; open shell inside yazi
112-
2 2
113-
sh (macro S-; s h spc - c spc ' S-4 S-(s h e l l) ' ret)
114-
115100
;; fast keyboard repeat rate emulation
116101
;; (multi f24) fixes fast typing `vh`, `vj`, `vk` and `vl` not entering visual mode on neovim
117102
h (multi f24 (tap-hold 150 150 h (macro-repeat h 15)))
@@ -123,30 +108,17 @@
123108
↑ (multi f24 (tap-hold 150 150 up (macro-repeat up 15)))
124109
🡪 (multi f24 (tap-hold 150 150 right (macro-repeat right 15)))
125110

126-
;; open with neovim inside yazi
127-
1 1
128-
vim (macro S-; s h spc - c spc S-' t e s t spc S-4 S-(a p p d a t a) spc S-7 S-7 spc n v i m spc ' S-5 @1 ' spc S-\ S-\ spc n v i m spc S-4 S-8 S-' ret)
129-
130-
;; open with $EDITOR inside yazi
131-
vi (macro S-; s h spc - c spc S-' t e s t spc S-4 S-(a p p d a t a) spc S-7 S-7 spc S-4 S-(e d i t o r) spc ' S-5 @1 ' spc S-\ S-\ spc S-4 S-(e d i t o r) spc S-4 S-8 S-' ret)
111+
;; open yazi_cd on any shell
112+
yaz (macro y a z i spc S-4 S-(p w d) spc - - c w d - f i l e spc S-4 S-(h o m e) / . y a z i ; spc c d spc S-' S-4 S-9 c a t spc S-4 S-( h o m e) / . y a z i S-0 S-' ret)
132113

133-
;; open with code inside yazi
134-
cod (macro ; s h spc - c spc S-' t e s t spc S-4 S-(a p p d a t a) spc S-7 S-7 spc c o d e spc ' S-5 @1 ' spc S-\ S-\ spc c o d e spc S-4 S-8 S-' ret)
135-
136-
;; open lazygit inside yazi
137-
laz (macro S-; l a z y g i t ret)
138-
139-
;; zoxide add current working directory inside yazi
140-
za (macro ; z o x i d e spc a d d spc . ret )
141-
142-
;; zoxide remove current working directory inside yazi
143-
zr (macro ; z o x i d e spc r e m o v e spc . ret )
114+
;; clear screen on any shell
115+
clr (macro c l e a r ret)
144116

145117
;; unicode outputs
146-
ñ (unicode ñ)
118+
¿ (unicode ¿)
147119

148120
;; unicode outputs
149-
¿ (unicode ¿)
121+
ñ (unicode ñ)
150122

151123
;; mouse scrolling <intervale> <distance>
152124
m↑ (mwheel-up 50 30)

nvim/init.lua

+1
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ if not vim.g.vscode then
10001000
java_language_server = "java-language-server",
10011001
jdtls = "jdtls",
10021002
jsonls = "json-lsp",
1003+
kotlin_language_server = "kotlin-language-server",
10031004
lua_ls = "lua-language-server",
10041005
neocmake = "neocmakelsp",
10051006
nginx_language_server = "nginx-language-server",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2356,7 +2356,7 @@
23562356
"key": "alt+y",
23572357
"command": "workbench.action.terminal.sendSequence",
23582358
"args": {
2359-
"text": "yazi --cwd-file=$HOME/.yazi; cd $(cat $HOME/.yazi) \n"
2359+
"text": "yazi $PWD --cwd-file=$HOME/.yazi; cd \"$(cat $HOME/.yazi)\" \n"
23602360
}
23612361
},
23622362
{

yazi/keymap.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ on = [ "s", "r" ]
135135
run = '''
136136
shell
137137
'
138-
rg "" --color=always --line-number | fzf --ansi --delimiter : --preview "bat --color=always {1} --highlight-line {2}" --preview-window "up,60%,+{2},nohidden" --bind "enter:become(ya emit reveal {1} && nvim --clean -c \"lua vim.cmd.source(vim.env.RETRONVIM_INIT)\" {1} +{2})"
138+
rg "" --color=always --line-number | fzf --ansi --delimiter : --preview "bat --color=always {1} --highlight-line {2}" --preview-window "up,60%,+{2},nohidden" --bind "enter:become(ya emit reveal {1} && nvim -u NORC --cmd \"lua vim.cmd.source(vim.env.RETRONVIM_INIT)\" {1} +{2})"
139139
'
140140
--block
141141
'''

zsh/.zshrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ bindkey -v '^?' backward-delete-char # enable vi-mode
33
setopt inc_append_history # save to history after running a command
44
setopt interactive_comments # allow comments
55
zstyle ":completion:*" menu select # <tab><tab> to enter menu completion
6-
# precmd () { printf "\033]0; $(basename ${PWD/~/\~}) \a" } # tmux/wezterm CWD status/title
6+
precmd () { printf "\033]0; $(basename ${PWD/~/\~}) \a" } # tmux/wezterm CWD status/title
77

88
# linux keyboard repeat rate, xset doesn't support wayland
99
(xset b off r rate 190 70 2>/dev/null)
@@ -21,6 +21,7 @@ export HISTFILE="$HOME/.cache/.zsh_history"
2121
export PATH="$HOME/.pixi/bin:$HOME/.local/bin:$HOME/.local/share/pnpm:$HOME/Library/pnpm:$PATH"
2222
export SAVEHIST=10000
2323
export STARSHIP_CONFIG="$HOME/.vscode/extensions/yeferyv.retronvim/zsh/starship.toml"
24+
export RETRONVIM_INIT="$HOME/.vscode/extensions/yeferyv.retronvim/nvim/init.lua" # used in yazi/keymap.toml
2425
export EDITOR='nvim -u "$HOME/.vscode/extensions/yeferyv.retronvim/nvim/init.lua"'
2526

2627
# retronvim's neovim

0 commit comments

Comments
 (0)