diff options
| author | Mike Vink <ivi@vinkies.net> | 2025-12-16 15:27:40 +0100 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2025-12-16 15:27:40 +0100 |
| commit | e7c98e63190e2d8a329f9dba445cc529ddba717f (patch) | |
| tree | b5e39fa2c63a1c47e981d1fe7ac6779410a4b6f7 /.local | |
| parent | 0632884742f41b0959c1d2a118c053747e812810 (diff) | |
emacs
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/shortcuts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts index b756754..9c42b7f 100755 --- a/.local/bin/shortcuts +++ b/.local/bin/shortcuts @@ -10,6 +10,7 @@ shell_env_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc" yazi_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/yazi/shortcutrc" +broot_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/broot/shortcutrc.hjson" vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim" qute_shortcuts="/dev/null" fish_shortcuts="/dev/null" @@ -18,6 +19,7 @@ vifm_shortcuts="/dev/null" # Remove, prepare files rm -f "$shell_env_shortcuts" "$lf_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null printf "alias " > "$shell_shortcuts" +echo "verbs: [" > "$broot_shortcuts" # Format the `directories` file in the correct syntax and sent it to all three configs. eval "echo \"$(cat "$bmdirs"; for i in "$bmdirs_dir"/*; do cat $i; done)\"" | \ @@ -27,7 +29,8 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ; printf(\"{ on = [\42C\42,\",\$1) > \"$yazi_shortcuts\" ; for(i = 0; ++i <= length(\$1);) printf(\"\42%s\42,\", substr(\$0, i, 1)) > \"$yazi_shortcuts\" ; - printf(\"\42<Enter>\42], run = \42cd %s\42 },\\\\\n\",\$2) > \"$yazi_shortcuts\" ; }" + printf(\"\42<Enter>\42], run = \42cd %s\42 },\\\\\n\",\$2) > \"$yazi_shortcuts\" ; + printf(\"{invocation: \42b%s\42, execution: \42:focus %s\42}\n\", \$1, \$2) >> \"$broot_shortcuts\" ; }" # " printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; # printf(\"abbr %s \42cd %s; and ls -A\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ; # printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ; @@ -46,3 +49,5 @@ sed '/^append_keymap.*\[$/,/^\]$/ { ] }' > ~/.config/yazi/keymap.toml.sed mv ~/.config/yazi/keymap.toml.sed ~/.config/yazi/keymap.toml + +echo "]" >> "$broot_shortcuts" |
