AutoYADM commit: 2025-03-15 01:45:06

This commit is contained in:
Daniel Fichtinger 2025-03-15 01:45:06 -04:00
parent 669d2ce550
commit 6b99c84a29
4 changed files with 260 additions and 97 deletions

View file

@ -1,99 +1,251 @@
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
[manager]
prepend_keymap = [
# Navigation
{ on = "e", run = "arrow -1", desc = "Move cursor up" },
{ on = "n", run = "arrow 1", desc = "Move cursor down" },
{ on = "m", run = "leave", desc = "Go back to the parent directory" },
{ on = "i", run = "enter", desc = "Enter the child directory" },
# Find
{ on = "j", run = "find_arrow", desc = "Goto the next found" },
{ on = "J", run = "find_arrow --previous", desc = "Goto the previous found" },
# Linemode
{ on = [
"k",
"s",
], run = "linemode size", desc = "Linemode: size" },
{ on = [
"k",
"p",
], run = "linemode permissions", desc = "Linemode: permissions" },
{ on = [
"k",
"b",
], run = "linemode btime", desc = "Linemode: btime" },
{ on = [
"k",
"k",
], run = "linemode mtime", desc = "Linemode: mtime" },
{ on = [
"k",
"o",
], run = "linemode owner", desc = "Linemode: owner" },
{ on = [
"k",
"n",
], run = "linemode none", desc = "Linemode: none" },
{ on = "!", run = 'shell "$SHELL" --block', desc = "Open shell here" },
# { on = "!", run = 'shell --block --interactive', desc = "Open shell here" },
{ on = [
"<C-n>",
# "d",
], run = 'shell -- dragon-drop -x -i -T "$1"', desc = "Drag and drop selection" },
{ on = [
"g",
"r",
], run = 'shell -- ya emit cd "$(git rev-parse --show-toplevel)"', desc = "Goto git root" },
# { on = "o", run = "plugin open-with-cmd --ags=block", desc = "Open with command in terminal" },
{ on = "o", run = "plugin open-with-cmd", desc = "Open with command" },
{ on = [
"'",
";",
], run = 'plugin custom-shell -- auto --interactive', desc = "custom-shell as default, interactive" },
{ on = [
"'",
":",
], run = 'plugin custom-shell -- auto --interactive --block', desc = "custom-shell as default, interactive, block" },
{ on = "h", run = 'shell --block "helix ."' },
{ on = [
"C",
], run = "plugin ouch zip", desc = "Compress with ouch" },
{ on = [
"g",
"i",
], run = "plugin lazygit", desc = "run lazygit" },
{ on = [
"c",
"C",
], run = [
"plugin copy-file-contents",
], desc = "Copy contents of file" },
{ on = [
"c",
"x",
], run = 'shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list', desc = "Mime copy" },
{ on = [
"c",
"r",
], run = "plugin path-from-root", desc = "Copies path from git root" },
{ on = [
"c",
"m",
], run = "plugin chmod", desc = "Chmod on selected files" },
{ on = "F", run = "plugin jump-to-char", desc = "Jump to char" },
{ on = [
"g",
"l",
], run = "plugin first-non-directory", desc = "Jump to first non-dir" },
]
[input]
prepend_keymap = [
{ on = "l", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
{ on = "L", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" },
{ on = "h", run = "insert", desc = "Enter insert mode" },
{ on = "H", run = [
"move first-char",
"insert",
], desc = "Move to the BOL, and enter insert mode" },
]
[[manager.prepend_keymap]]
on = "e"
run = "arrow -1"
desc = "Move cursor up"
[[manager.prepend_keymap]]
on = "n"
run = "arrow 1"
desc = "Move cursor down"
[[manager.prepend_keymap]]
on = "m"
run = "leave"
desc = "Go back to the parent directory"
[[manager.prepend_keymap]]
on = "i"
run = "enter"
desc = "Enter the child directory"
[[manager.prepend_keymap]]
on = "j"
run = "find_arrow"
desc = "Goto the next found"
[[manager.prepend_keymap]]
on = "J"
run = "find_arrow --previous"
desc = "Goto the previous found"
[[manager.prepend_keymap]]
on = ["k", "s"]
run = "linemode size"
desc = "Linemode: size"
[[manager.prepend_keymap]]
on = ["k", "p"]
run = "linemode permissions"
desc = "Linemode: permissions"
[[manager.prepend_keymap]]
on = ["k", "b"]
run = "linemode btime"
desc = "Linemode: btime"
[[manager.prepend_keymap]]
on = ["k", "k"]
run = "linemode mtime"
desc = "Linemode: mtime"
[[manager.prepend_keymap]]
on = ["k", "o"]
run = "linemode owner"
desc = "Linemode: owner"
[[manager.prepend_keymap]]
on = ["k", "n"]
run = "linemode none"
desc = "Linemode: none"
[[manager.prepend_keymap]]
on = "!"
run = 'shell "$SHELL" --block'
desc = "Open shell here"
[[manager.prepend_keymap]]
on = "<C-n>"
run = 'shell -- dragon-drop -x -i -T "$1"'
desc = "Drag and drop selection"
[[manager.prepend_keymap]]
on = ["g", "r"]
run = 'shell -- ya emit cd "$(git rev-parse --show-toplevel)"'
desc = "Goto git root"
[[manager.prepend_keymap]]
on = "o"
run = "plugin open-with-cmd"
desc = "Open with command"
[[manager.prepend_keymap]]
on = ["'", ";"]
run = 'plugin custom-shell -- auto --interactive'
desc = "custom-shell as default, interactive"
[[manager.prepend_keymap]]
on = ["'", ":"]
run = 'plugin custom-shell -- auto --interactive --block'
desc = "custom-shell as default, interactive, block"
[[manager.prepend_keymap]]
on = "h"
run = 'shell --block "helix ."'
[[manager.prepend_keymap]]
on = "C"
run = "plugin ouch zip"
desc = "Compress with ouch"
[[manager.prepend_keymap]]
on = ["g", "i"]
run = "plugin lazygit"
desc = "run lazygit"
[[manager.prepend_keymap]]
on = ["c", "C"]
run = "plugin copy-file-contents"
desc = "Copy contents of file"
[[manager.prepend_keymap]]
on = ["c", "x"]
run = 'shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'
desc = "Mime copy"
[[manager.prepend_keymap]]
on = ["c", "r"]
run = "plugin path-from-root"
desc = "Copies path from git root"
[[manager.prepend_keymap]]
on = ["c", "m"]
run = "plugin chmod"
desc = "Chmod on selected files"
[[manager.prepend_keymap]]
on = "F"
run = "plugin jump-to-char"
desc = "Jump to char"
[[manager.prepend_keymap]]
on = ["g", "l"]
run = "plugin first-non-directory"
desc = "Jump to first non-dir"
[[manager.prepend_keymap]]
on = "<A-c>"
run = "plugin cdhist -- _ --fuzzy=fzf"
desc = "CD history"
# PROJECTS
[[manager.prepend_keymap]]
on = [ "P", "s" ]
run = "plugin projects save"
desc = "Save current project"
[[manager.prepend_keymap]]
on = [ "P", "l" ]
run = "plugin projects load"
desc = "Load project"
[[manager.prepend_keymap]]
on = [ "P", "P" ]
run = "plugin projects load_last"
desc = "Load last project"
[[manager.prepend_keymap]]
on = [ "P", "d" ]
run = "plugin projects delete"
desc = "Delete project"
[[manager.prepend_keymap]]
on = [ "P", "D" ]
run = "plugin projects delete_all"
desc = "Delete all projects"
[[manager.prepend_keymap]]
on = [ "P", "m" ]
run = "plugin projects 'merge current'"
desc = "Merge current tab to other projects"
[[manager.prepend_keymap]]
on = [ "P", "M" ]
run = "plugin projects 'merge all'"
desc = "Merge current project to other projects"
# sudo cp/mv
[[manager.prepend_keymap]]
on = ["R", "p", "p"]
run = "plugin sudo -- paste"
desc = "sudo paste"
# sudo cp/mv --force
[[manager.prepend_keymap]]
on = ["R", "P"]
run = "plugin sudo -- paste --force"
desc = "sudo paste"
# sudo mv
[[manager.prepend_keymap]]
on = ["R", "r"]
run = "plugin sudo -- rename"
desc = "sudo rename"
# sudo ln -s (absolute-path)
[[manager.prepend_keymap]]
on = ["R", "p", "l"]
run = "plugin sudo -- link"
desc = "sudo link"
# sudo ln -s (relative-path)
[[manager.prepend_keymap]]
on = ["R", "p", "r"]
run = "plugin sudo -- link --relative"
desc = "sudo link relative path"
# sudo ln
[[manager.prepend_keymap]]
on = ["R", "p", "L"]
run = "plugin sudo -- hardlink"
desc = "sudo hardlink"
# sudo touch/mkdir
[[manager.prepend_keymap]]
on = ["R", "a"]
run = "plugin sudo -- create"
desc = "sudo create"
# sudo trash
[[manager.prepend_keymap]]
on = ["R", "d"]
run = "plugin sudo -- remove"
desc = "sudo trash"
# sudo delete
[[manager.prepend_keymap]]
on = ["R", "D"]
run = "plugin sudo -- remove --permanently"
desc = "sudo delete"
[[input.prepend_keymap]]
on = "l"
run = "forward --end-of-word"
desc = "Move forward to the end of the current or next word"
[[input.prepend_keymap]]
on = "L"
run = "forward --far --end-of-word"
desc = "Move forward to the end of the current or next WORD"
[[input.prepend_keymap]]
on = "h"
run = "insert"
desc = "Enter insert mode"
[[input.prepend_keymap]]
on = "H"
run = ["move first-char", "insert"]
desc = "Move to the BOL, and enter insert mode"

View file

@ -68,6 +68,16 @@ use = "bulletmark/cdhist"
rev = "d8905e2"
hash = "8005e9475a37e33994652428cccf2946"
[[plugin.deps]]
use = "MasouShizuka/projects"
rev = "4f11ecc"
hash = "17fa17295d27864f62875f06a77f72e7"
[[plugin.deps]]
use = "TD-Sky/sudo"
rev = "af70636"
hash = "a94dcbe9266512806c677138e8591ddb"
[[flavor.deps]]
use = "ashen-org/ashen:ashen"
rev = "7a53969"

1
.zshrc
View file

@ -206,3 +206,4 @@ export GPG_TTY=$(tty)
eval "$(direnv hook zsh)"
# colorscript -e 36
# source ~/scripts/obsidian-bridge.sh
source <(cdhist -i)