Files
dotfiles/cli/dot-config/yazi/keymap.toml

55 lines
2.7 KiB
TOML

[mgr]
# Custom mappings
prepend_keymap = [
#{ on = "<C-a>", run = "echo 'one'", desc = "Single command with `Ctrl + a`" },
# This is for drag and drop support of terminal filemanger (works also with signal and other applications)
{ on = [ "<C-n>" ], run = '''shell 'xdragon -x -T "$1"' --confirm''' },
# Lazygit in yazi
{on = [ "g", "i" ],run = "plugin lazygit",desc = "run lazygit"},
# Chmod in yazi
{on = [ "c", "m" ],run = "plugin chmod",desc = "Chmod on selected files"},
{on = [ "g", "E" ],run = "plugin gpg",desc = "Gpg the hovered file"},
#{on = [ "q" ],run = "plugin projects quit",desc = "Quit with save"},
{on = [ "M" ],run = "plugin mount",desc = "Quit with save"},
# Recover the last delted file
{ on = ["u"], run = "plugin restore", desc = "Restore last deleted files/folders" },
{ on = ["T"], run = "plugin toggle-pane max-preview", desc = "Restore last deleted files/folders" },
# Get the size of the cwd
{ on = [ "\\", "s" ], run = "plugin what-size", desc = "Calc size of selection or cwd" },
# Bookmark support
{on = [ "m" ],run = "plugin bookmarks save",desc = "Save current position as a bookmark"},
{on = [ "'" ],run = "plugin bookmarks jump",desc = "Jump to a bookmark"},
{on = [ "b", "d" ],run = "plugin bookmarks delete",desc = "Delete a bookmark"},
{on = [ "b", "D" ],run = "plugin bookmarks delete_all",desc = "Delete all bookmarks"},
# new linemodes
{on = [ "\\", "n", "m" ],run = "linemode mtime",desc = "Modified time"},
{on = [ "\\", "n", "n" ],run = "linemode none",desc = "no time"},
{on = [ "\\", "n", "b" ],run = "linemode btime",desc = "Birth time"},
]
# More mappings
append_keymap = [
# Default jumping to stuff
{ on = [ "g", "u" ], run = "cd ~/projects/university", desc = "Go to university folder" },
{ on = [ "g", "n" ], run = "cd ~/nixos", desc = "Go to nixos folder" },
{ on = [ "g", "p" ], run = "cd ~/projects", desc = "Go to projects folder" },
{ on = [ "g", "w" ], run = "cd ~/workspace", desc = "Go to workspace" },
{ on = [ "g", "e" ], run = "cd ~/dotfiles", desc = "Go to dotfiles" },
{ on = [ "g", "r" ], run = "cd /", desc = "Go to root" },
{ on = [ "g", "b" ], run = "cd /shared", desc = "Go to hdd" },
{ on = [ "g", "l" ], run = "cd ~/.local", desc = "Go to Local" },
{ on = [ "g", "x" ], run = "cd ~/Nextcloud", desc = "Go to nextcloud" },
{ on = [ "g", "a" ], run = "cd ~/.cache", desc = "Go to Cache" },
{ on = [ "g", "T" ], run = "cd ~/.local/share/Trash", desc = "Go to trash" },
{ on = [ "g", "t" ], run = "cd ~/Nextcloud/Notes", desc = "Go to notes" },
{ on = [ "g", "U" ], run = "cd ~/Nextcloud/University/current", desc = "Go to Uni" },
{ on = [ "g", "C" ], run = "cd ~/projects/university/S3", desc = "Go to current semester" },
]