diff --git a/lf/cleaner b/lf/cleaner deleted file mode 100644 index 75e62a0..0000000 --- a/lf/cleaner +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -n "$FIFO_UEBERZUG" ]; then - printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG" -fi diff --git a/lf/lfrc b/lf/lfrc deleted file mode 100644 index 80ccc31..0000000 --- a/lf/lfrc +++ /dev/null @@ -1,368 +0,0 @@ -# File: ~/.config/lf/lfrc (archlinux @ 'silent') -# Date: Thu 15 Mar 2022 12:05 -# Update: Mon 08 Jul 2024 22:04 -# Owner: fvb - freekvb@gmail.com - https://freekvb.github.io/fvb/ -#-----------------------------------------------------------------------------# - - -## Based on lfrc Luke Smith & Brodie Robertson -------------------------------# - -# Note on Image Previews -# For those wanting image previews, like this system, there are four steps to -# set it up. These are done automatically for LARBS users, but I will state -# them here for others doing it manually. -# -# 1. ueberzug must be installed. -# 2. The scope file (~/.config/lf/scope for me), must have a command similar to -# mine to generate ueberzug images. -# 3. A `set cleaner` line as below is a cleaner script. -# 4. lf should be started through a wrapper script (~/.local/bin/lfub for me) -# that creates the environment for ueberzug. This command can be be aliased -# in your shellrc (`alias lf="lfub") or if set to a binding, should be -# called directly instead of normal lf. - - -## basic vars ----------------------------------------------------------------# - -set ratios '10:15:20' -set hidden -set ignorecase -set number -set relativenumber -# set cursorpreviewfmt " " -set info size -set dircounts -set shell zsh -set shellopts '-eu' -set ifs "\n" -set scrolloff 10 -set wrapscroll -set icons -set period 1 -set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml" -# set cleaner '~/.config/lf/cleaner' -set previewer '~/.config/lf/preview' -set promptfmt "\033[37;1m%d\033[0m\033[37;1m%f\033[0m" - -## custom functions ----------------------------------------------------------# - -cmd on-cd &{{ -# '&' commands run silently in background (which is what we want here), -# but are not connected to stdout. -# To make sure our escape sequence still reaches stdout we pipe it to /dev/tty - printf "\033]0; $(pwd | sed "s|$HOME|~|") - lf\007" > /dev/tty -}} -# also run at startup -on-cd - -cmd open ${{ - case $(file --mime-type "$f" -bL) in - text/*|application/json) $EDITOR "$fx";; - application/pdf) open -a Skim "$f" & disown;; - video/*) open -a IINA "$f" & disown;; - audio/*) mpv --audio-display=no "$f" ;; - audio/*) ffplay -nodisp -autoexit "$f" ;; - image/*) open -a Preview "$f" & disown;; - application/x-tex|application/x-python|application/x-shellscript|application/javascript|application/x-markdown) $EDITOR "$fx";; - *) for f in "$fx"; do open "$f" > /dev/null 2> /dev/null & done;; - esac - }} -# make new directory -cmd mkdir %{{ -if [ "$1" ]; then -mkdir -p -- "$@" && lf -remote "send $id select \"$1\"" -fi -}} - -#cmd mkdir ${{ -# set -f -# printf "\nDirectory Name: " -# read ans -# mkdir $ans -#}} - -# make new file -cmd mkfile ${{ -set -f -printf "\nFile Name: " -read ans -$EDITOR $ans -}} - -# make new 'root' file -cmd doasmkfile ${{ -set -f -printf "\nFile Name: " -read ans -doas $EDITOR $ans -}} - -# make new script -cmd mkscript ${{ -set -f -printf "\nFile Name: " -read ans -touch ~/Scripts/"$ans" -chmod +x ~/Scripts/"$ans" -$EDITOR ~/Scripts/"$ans" -}} - -# change file permissions -cmd chmod ${{ -set -f -printf "\nMode Bits: " -read ans -for file in "$fx" -do -chmod $ans $file -done -lf -remote 'send reload' -}} - -# make file executable -cmd chmodx ${{ -for file in "$fx" -do -chmod +x $file -done -lf -remote 'send reload' -}} - -# jump with fzf -cmd fzf_jump ${{ -res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location')" -if [ -f "$res" ]; then -cmd="select" - elif [ -d "$res" ]; then - cmd="cd" - fi - lf -remote "send $id $cmd \"$res\"" -}} - -# delete current file or selected files (prompting) -cmd delete ${{ - set -f - printf "\n$fx\n" - printf "Delete? [y/n] " - read ans - [ $ans = "y" ] && rm -rf $fx -}} - -# trash cli bindings -cmd trash ${{ - files=$(printf "$fx" | tr '\n' ';') - while [ "$files" ]; do -# extract the substring from start of string up to delimiter. -# this is the first "element" of the string. - file=${files%%;*} - trash-put "$(basename "$file")" -# if there's only one element left, set `files` to an empty string. -# this causes us to exit this `while` loop. -# else, we delete the first "element" of the string from files, and move onto the next. - if [ "$files" = "$file" ]; then - files='' - else - files="${files#*;}" - fi - done -}} - -cmd clear_trash %trash-empty - -cmd restore_trash ${{ - trash-restore -}} - -## trash -#$mkdir -p ~/.cache/lf/trash -#cmd trash $IFS="`printf '\n\t'`"; mv -f $fx ~/.cache/lf/trash - -# extract the current file with the right command -# (xkcd link: https://xkcd.com/1168/) -cmd extract ${{ - set -f - case $f in - *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; - *.tar.gz|*.tgz) tar xzvf $f;; - *.tar.xz|*.txz) tar xJvf $f;; - *.zip) unzip $f;; - *.rar) unrar x $f;; - *.7z) 7z x $f;; - esac -}} - - -# compress current file or selected files with tar and gunzip -cmd tar ${{ - set -f - mkdir $1 - cp -r $fx $1 - tar czf $1.tar.gz $1 - rm -rf $1 -}} - -# compress current file or selected files with zip -cmd zip ${{ - set -f - mkdir $1 - cp -r $fx $1 - zip -r $1.zip $1 - rm -rf $1 -}} - -# symlinks -# yy (select for copy) and P to paste soft-link -# cc (select for cut) and P to paste hard-link -cmd link %{{ - set -- $(cat ~/.local/share/lf/files) - mode="$1" - shift - if [ "$#" -lt 1 ]; then - lf -remote "send $id echo no files to link" - exit 0 - fi - case "$mode" in -# symbolically copy mode is indicating a soft link - copy) ln -sr -t . -- "$@";; -# while a move mode is indicating a hard link - move) ln -t . -- "$@";; - esac - rm ~/.local/share/lf/files - lf -remote "send clear" -}} - -# open terminal -cmd openterm ${{ - devour $TERM -}} - -# set wallpaper and colorscheme (cli only) -cmd wallcolor %cp "$f" ~/.config/wall.png && wal -i "$f" -# set wallpaper and colorscheme (cli only) when running dwm -cmd setwallpaper %cp "$f" ~/.config/wall.png && wal -i "$f" && (cd $HOME/Programs/dwm && rm -f config.h ; doas make clean install) && (cd $HOME/Programs/dmenu && rm -f config.h ; doas make clean install) && xdotool key super+shift+q - -# bulk rename -cmd bulkrename $vidir - - -## bindings ------------------------------------------------------------------# - -# remove some defaults -map "'" -map '"' -map , -map c -map d -map e $ open "$PWD" -map m -map r -map ZZ quit -# escape - map :unselect;clear; - -# map : to ; - map ; read - - map gg top - map G bottom - -# trash mappings - map dd trash - map ct clear_trash - map rt restore_trash - - map DD delete - map cc cut - map yy copy - map p paste - - map md push :mkdir -#map md mkdir - map mf mkfile - map ms mkscript - map mF doasmkfile - map ch chmod - map x chmodx - map U unselect - map E extract - map cs wallcolor - map bg setwallpaper - - map shell - map V push :!nvim - map YY $printf "%s" "$fx" | xclip -selection clipboard - - map R reload - map C clear - -# rename - map cw rename - map B bulkrename - map A rename # at the very end -#map c push A # new rename - map I push A # at the very beginning - map i push A # before extention - map a push A # after extention - -# symlinks -# yy (select for copy) and P to paste soft-link -# cc (select for cut) and P to paste hard-link - map P :link - -## file openers - map cv push :!nvim$HOME/.config/lf/lfrc - map cz push :!nvim$~/.config/zsh/.zshrc - map of open $f - map ol $$PAGER "$f" - map oq $$BROWSER "$f" - map ot openterm - map ov $$EDITOR "$f" - map odv $doas $EDITOR "$f" - map oz $$READER "$f" - -# execute current file (must be executable) -#map x $$f - map X !$f - -## fzf - map f $lf -remote "send $id select '$(fzf)'" - map F $vi $(fzf) - map J fzf_jump - -## fast navigation - map gh cd ~ - #map gD cd ~/Documents - map gD cd ~/Downloads - #map gP cd ~/Pictures - map gt cd ~/Torrents - map gta cd ~/Torrents/Audiobook - map gtb cd ~/Torrents/Books - - map gc cd ~/.config - map ge cd /etc - map gi tng - map ga tnh - - map go cd ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Privat - - -## fast movement - map Mh $mv "$f" ~ - map MD $mv "$f" ~/Documents - #map MD $mv "$f" ~/Downloads - map Mt $mv "$f" ~/Torrents - map Mta $mv "$f" ~/Torrents/Audiobooks - map Mtb $mv "$f" ~/Torrents/Books - map Mc $mv "$f" ~/.config - map Ml $mv "$f" ~/.local - -## fast copy - map Yh $cp "$f" ~ - map YD $cp "$f" ~/Documents - #map YD $cp "$f" ~/Downloads - map YT $cp "$f" ~/Torrents - map Yta $mv "$f" ~/Torrents/Audiobooks - map Ytb $mv "$f" ~/Torrents/Books - map Yc $cp "$f" ~/.config - map Yl $cp "$f" ~/.local - diff --git a/lf/scope b/lf/scope deleted file mode 100644 index 71ab628..0000000 --- a/lf/scope +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# File preview handler for lf. - -set -C -f -IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" - -image() { - if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then - printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG" - else - mediainfo "$1" - fi -} - -ifub() { - [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1 -} - -# Note that the cache file name is a function of file information, meaning if -# an image appears in multiple places across the machine, it will not have to -# be regenerated once seen. - -case "$(file --dereference --brief --mime-type -- "$1")" in - image/*) image "$1" "$2" "$3" "$4" "$5" ;; - text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; - text/troff) man ./ "$1" | col -b ;; - text/* | */xml | application/json) bat --terminal-width "$4" -f "$1" ;; - application/zip) atool --list -- "$1" ;; - audio/* | application/octet-stream) mediainfo "$1" || exit 1;; - video/* ) - CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')" - [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 - image "$CACHE" "$2" "$3" "$4" "$5" - ;; - */pdf) - CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')" - [ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE" - image "$CACHE.jpg" "$2" "$3" "$4" "$5" - ;; - *opendocument*) odt2txt "$1" ;; - application/pgp-encrypted) gpg -d -- "$1" ;; -esac -exit 1 diff --git a/nvim/init.lua b/nvim/init.lua index 4971b09..7863750 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,4 +1,3 @@ -# vim:fileencoding=utf-8:foldmethod=marker require('keymaps') require('settings') diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 9a1769b..2ac88e6 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -124,6 +124,13 @@ require('packer').startup(function(use) end } -- }}} + + -- {{{ Org-Mode + use {'nvim-orgmode/orgmode', config = function() + require('orgmode').setup{} + end + } +--}}} end) diff --git a/nvim/plugin/packer_compiled.lua b/nvim/plugin/packer_compiled.lua index ce99d65..4d6adef 100644 --- a/nvim/plugin/packer_compiled.lua +++ b/nvim/plugin/packer_compiled.lua @@ -155,6 +155,12 @@ _G.packer_plugins = { path = "/Users/thomasnaderer/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", url = "https://github.com/kyazdani42/nvim-web-devicons" }, + orgmode = { + config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\forgmode\frequire\0" }, + loaded = true, + path = "/Users/thomasnaderer/.local/share/nvim/site/pack/packer/start/orgmode", + url = "https://github.com/nvim-orgmode/orgmode" + }, ["outline.nvim"] = { config = { "\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20plugins.outline\frequire\0" }, loaded = true, @@ -205,6 +211,10 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Config for: orgmode +time([[Config for orgmode]], true) +try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\forgmode\frequire\0", "config", "orgmode") +time([[Config for orgmode]], false) -- Config for: outline.nvim time([[Config for outline.nvim]], true) try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20plugins.outline\frequire\0", "config", "outline.nvim") @@ -213,14 +223,14 @@ time([[Config for outline.nvim]], false) time([[Config for auto-save.nvim]], true) try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14auto-save\frequire\0", "config", "auto-save.nvim") time([[Config for auto-save.nvim]], false) --- Config for: nvim-tree.lua -time([[Config for nvim-tree.lua]], true) -try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22plugins.nvim-tree\frequire\0", "config", "nvim-tree.lua") -time([[Config for nvim-tree.lua]], false) -- Config for: telescope.nvim time([[Config for telescope.nvim]], true) try_loadstring("\27LJ\2\n„\3\0\0\6\0\16\0!6\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\4\0'\4\5\0005\5\6\0B\0\5\0016\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\a\0'\4\b\0005\5\t\0B\0\5\0016\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\n\0'\4\v\0005\5\f\0B\0\5\0016\0\0\0009\0\1\0009\0\2\0'\2\3\0'\3\r\0'\4\14\0005\5\15\0B\0\5\1K\0\1\0\1\0\2\fnoremap\2\vsilent\2\29:Telescope help_tags\15fh\1\0\2\fnoremap\2\vsilent\2\27:Telescope buffers\15fb\1\0\2\fnoremap\2\vsilent\2\29:Telescope live_grep\15fg\1\0\2\fnoremap\2\vsilent\2\30:Telescope find_files\15ff\6n\20nvim_set_keymap\bapi\bvim\0", "config", "telescope.nvim") time([[Config for telescope.nvim]], false) +-- Config for: nvim-tree.lua +time([[Config for nvim-tree.lua]], true) +try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22plugins.nvim-tree\frequire\0", "config", "nvim-tree.lua") +time([[Config for nvim-tree.lua]], false) -- Load plugins in order defined by `after` time([[Sequenced loading]], true) vim.cmd [[ packadd nvim-treesitter ]] diff --git a/yazi/keymap.toml b/yazi/keymap.toml new file mode 100644 index 0000000..f6d12d1 --- /dev/null +++ b/yazi/keymap.toml @@ -0,0 +1,359 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/keymap.json" + +[manager] + +keymap = [ + { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, + { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, + { on = "q", run = "quit", desc = "Quit the process" }, + { on = "Q", run = "quit --no-cwd-file", desc = "Quit the process without outputting cwd-file" }, + { on = "", run = "close", desc = "Close the current tab, or quit if it's last" }, + { on = "", run = "suspend", desc = "Suspend the process" }, + + # Hopping + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, + { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, + { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, + + { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, + { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, + { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, + + { on = [ "g", "g" ], run = "arrow -99999999", desc = "Move cursor to the top" }, + { on = "G", run = "arrow 99999999", desc = "Move cursor to the bottom" }, + + # Navigation + { on = "h", run = "leave", desc = "Go back to the parent directory" }, + { on = "l", run = "enter", desc = "Enter the child directory" }, + + { on = "", run = "leave", desc = "Go back to the parent directory" }, + { on = "", run = "enter", desc = "Enter the child directory" }, + + { on = "H", run = "back", desc = "Go back to the previous directory" }, + { on = "L", run = "forward", desc = "Go forward to the next directory" }, + + # Toggle + { on = "", run = [ "toggle", "arrow 1" ], desc = "Toggle the current selection state" }, + { on = "", run = "toggle_all --state=on", desc = "Select all files" }, + { on = "", run = "toggle_all", desc = "Invert selection of all files" }, + + # Visual mode + { on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" }, + { on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, + + # Seeking + { on = "K", run = "seek -5", desc = "Seek up 5 units in the preview" }, + { on = "J", run = "seek 5", desc = "Seek down 5 units in the preview" }, + + # Spotting + { on = "", run = "spot", desc = "Spot hovered file" }, + + # Operation + { on = "o", run = "open", desc = "Open selected files" }, + { on = "O", run = "open --interactive", desc = "Open selected files interactively" }, + { on = "", run = "open", desc = "Open selected files" }, + { on = "", run = "open --interactive", desc = "Open selected files interactively" }, + { on = "y", run = "yank", desc = "Yank selected files (copy)" }, + { on = "x", run = "yank --cut", desc = "Yank selected files (cut)" }, + { on = "p", run = "paste", desc = "Paste yanked files" }, + { on = "P", run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" }, + { on = "-", run = "link", desc = "Symlink the absolute path of yanked files" }, + { on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" }, + { on = "", run = "hardlink", desc = "Hardlink yanked files" }, + { on = "Y", run = "unyank", desc = "Cancel the yank status" }, + { on = "X", run = "unyank", desc = "Cancel the yank status" }, + { on = "d", run = "remove", desc = "Trash selected files" }, + { on = "D", run = "remove --permanently", desc = "Permanently delete selected files" }, + { on = "a", run = "create", desc = "Create a file (ends with / for directories)" }, + { on = "r", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" }, + { on = ";", run = "shell --interactive", desc = "Run a shell command" }, + { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" }, + { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, + { on = "s", run = "search --via=fd", desc = "Search files by name via fd" }, + { on = "S", run = "search --via=rg", desc = "Search files by content via ripgrep" }, + { on = "", run = "escape --search", desc = "Cancel the ongoing search" }, + { on = "z", run = "plugin zoxide", desc = "Jump to a directory via zoxide" }, + { on = "Z", run = "plugin fzf", desc = "Jump to a file/directory via fzf" }, + + # Linemode + { on = [ "m", "s" ], run = "linemode size", desc = "Linemode: size" }, + { on = [ "m", "p" ], run = "linemode permissions", desc = "Linemode: permissions" }, + { on = [ "m", "b" ], run = "linemode btime", desc = "Linemode: btime" }, + { on = [ "m", "m" ], run = "linemode mtime", desc = "Linemode: mtime" }, + { on = [ "m", "o" ], run = "linemode owner", desc = "Linemode: owner" }, + { on = [ "m", "n" ], run = "linemode none", desc = "Linemode: none" }, + + # Copy + { on = [ "c", "c" ], run = "copy path", desc = "Copy the file path" }, + { on = [ "c", "d" ], run = "copy dirname", desc = "Copy the directory path" }, + { on = [ "c", "f" ], run = "copy filename", desc = "Copy the filename" }, + { on = [ "c", "n" ], run = "copy name_without_ext", desc = "Copy the filename without extension" }, + + # Filter + { on = "f", run = "filter --smart", desc = "Filter files" }, + + # Find + { on = "/", run = "find --smart", desc = "Find next file" }, + { on = "?", run = "find --previous --smart", desc = "Find previous file" }, + { on = "n", run = "find_arrow", desc = "Goto the next found" }, + { on = "N", run = "find_arrow --previous", desc = "Goto the previous found" }, + + # Sorting + { on = [ ",", "m" ], run = [ "sort mtime --reverse=no", "linemode mtime" ], desc = "Sort by modified time" }, + { on = [ ",", "M" ], run = [ "sort mtime --reverse", "linemode mtime" ], desc = "Sort by modified time (reverse)" }, + { on = [ ",", "b" ], run = [ "sort btime --reverse=no", "linemode btime" ], desc = "Sort by birth time" }, + { on = [ ",", "B" ], run = [ "sort btime --reverse", "linemode btime" ], desc = "Sort by birth time (reverse)" }, + { on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" }, + { on = [ ",", "E" ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" }, + { on = [ ",", "a" ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" }, + { on = [ ",", "A" ], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" }, + { on = [ ",", "n" ], run = "sort natural --reverse=no", desc = "Sort naturally" }, + { on = [ ",", "N" ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" }, + { on = [ ",", "s" ], run = [ "sort size --reverse=no", "linemode size" ], desc = "Sort by size" }, + { on = [ ",", "S" ], run = [ "sort size --reverse", "linemode size" ], desc = "Sort by size (reverse)" }, + { on = [ ",", "r" ], run = "sort random --reverse=no", desc = "Sort randomly" }, + + # Goto + { on = [ "g", "h" ], run = "cd ~", desc = "Go home" }, + { on = [ "g", "c" ], run = "cd ~/.config", desc = "Goto ~/.config" }, + { on = [ "g", "a" ], run = "cd ~/tnh", desc = "Goto AK127132" }, + { on = [ "g", "i" ], run = "cd ~/tng", desc = "Goto Intern" }, + { on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Goto ~/Downloads" }, + { on = [ "g", "t" ], run = "cd ~/Torrents", desc = "Goto ~/Torrents" }, + { on = [ "g", "o" ], run = "cd ~/Library/Mobile\\ Documents/iCloud~md~obsidian/Documents/Privat", desc = "Goto ~/Obsidian" }, + { on = [ "g", "" ], run = "cd --interactive", desc = "Jump interactively" }, + + # Tabs + { on = "t", run = "tab_create --current", desc = "Create a new tab with CWD" }, + + { on = "1", run = "tab_switch 0", desc = "Switch to the first tab" }, + { on = "2", run = "tab_switch 1", desc = "Switch to the second tab" }, + { on = "3", run = "tab_switch 2", desc = "Switch to the third tab" }, + { on = "4", run = "tab_switch 3", desc = "Switch to the fourth tab" }, + { on = "5", run = "tab_switch 4", desc = "Switch to the fifth tab" }, + { on = "6", run = "tab_switch 5", desc = "Switch to the sixth tab" }, + { on = "7", run = "tab_switch 6", desc = "Switch to the seventh tab" }, + { on = "8", run = "tab_switch 7", desc = "Switch to the eighth tab" }, + { on = "9", run = "tab_switch 8", desc = "Switch to the ninth tab" }, + + { on = "[", run = "tab_switch -1 --relative", desc = "Switch to the previous tab" }, + { on = "]", run = "tab_switch 1 --relative", desc = "Switch to the next tab" }, + + { on = "{", run = "tab_swap -1", desc = "Swap current tab with previous tab" }, + { on = "}", run = "tab_swap 1", desc = "Swap current tab with next tab" }, + + # Tasks + { on = "w", run = "tasks_show", desc = "Show task manager" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[tasks] + +keymap = [ + { on = "", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "w", run = "close", desc = "Close task manager" }, + + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "inspect", desc = "Inspect the task" }, + { on = "x", run = "cancel", desc = "Cancel the task" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[spot] + +keymap = [ + { on = "", run = "close", desc = "Close the spot" }, + { on = "", run = "close", desc = "Close the spot" }, + { on = "", run = "close", desc = "Close the spot" }, + { on = "", run = "close", desc = "Close the spot" }, + + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, + { on = "h", run = "swipe -1", desc = "Swipe to the next file" }, + { on = "l", run = "swipe 1", desc = "Swipe to the previous file" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "swipe -1", desc = "Swipe to the next file" }, + { on = "", run = "swipe 1", desc = "Swipe to the previous file" }, + + # Copy + { on = [ "c", "c" ], run = "copy cell", desc = "Copy selected cell" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[pick] + +keymap = [ + { on = "", run = "close", desc = "Cancel pick" }, + { on = "", run = "close", desc = "Cancel pick" }, + { on = "", run = "close", desc = "Cancel pick" }, + { on = "", run = "close --submit", desc = "Submit the pick" }, + + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[input] + +keymap = [ + { on = "", run = "close", desc = "Cancel input" }, + { on = "", run = "close --submit", desc = "Submit input" }, + { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" }, + { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" }, + + # Mode + { on = "i", run = "insert", desc = "Enter insert mode" }, + { on = "a", run = "insert --append", desc = "Enter append mode" }, + { on = "I", run = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" }, + { on = "A", run = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, + { on = "v", run = "visual", desc = "Enter visual mode" }, + { on = "V", run = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" }, + + # Character-wise movement + { on = "h", run = "move -1", desc = "Move back a character" }, + { on = "l", run = "move 1", desc = "Move forward a character" }, + { on = "", run = "move -1", desc = "Move back a character" }, + { on = "", run = "move 1", desc = "Move forward a character" }, + { on = "", run = "move -1", desc = "Move back a character" }, + { on = "", run = "move 1", desc = "Move forward a character" }, + + # Word-wise movement + { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "w", run = "forward", desc = "Move forward to the start of the next word" }, + { on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + + # Line-wise movement + { on = "0", run = "move -999", desc = "Move to the BOL" }, + { on = "$", run = "move 999", desc = "Move to the EOL" }, + { on = "", run = "move -999", desc = "Move to the BOL" }, + { on = "", run = "move 999", desc = "Move to the EOL" }, + { on = "", run = "move -999", desc = "Move to the BOL" }, + { on = "", run = "move 999", desc = "Move to the EOL" }, + + # Delete + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, + + # Kill + { on = "", run = "kill bol", desc = "Kill backwards to the BOL" }, + { on = "", run = "kill eol", desc = "Kill forwards to the EOL" }, + { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, + { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, + + # Cut/Yank/Paste + { on = "d", run = "delete --cut", desc = "Cut the selected characters" }, + { on = "D", run = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" }, + { on = "c", run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" }, + { on = "C", run = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" }, + { on = "x", run = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" }, + { on = "y", run = "yank", desc = "Copy the selected characters" }, + { on = "p", run = "paste", desc = "Paste the copied characters after the cursor" }, + { on = "P", run = "paste --before", desc = "Paste the copied characters before the cursor" }, + + # Undo/Redo + { on = "u", run = "undo", desc = "Undo the last operation" }, + { on = "", run = "redo", desc = "Redo the last operation" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[confirm] + +keymap = [ + { on = "", run = "close", desc = "Cancel the confirm" }, + { on = "", run = "close", desc = "Cancel the confirm" }, + { on = "", run = "close", desc = "Cancel the confirm" }, + { on = "", run = "close --submit", desc = "Submit the confirm" }, + + { on = "n", run = "close", desc = "Cancel the confirm" }, + { on = "y", run = "close --submit", desc = "Submit the confirm" }, + + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[completion] + +keymap = [ + { on = "", run = "close", desc = "Cancel completion" }, + { on = "", run = "close --submit", desc = "Submit the completion" }, + { on = "", run = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[help] + +keymap = [ + { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "", run = "close", desc = "Hide the help" }, + + # Navigation + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, + + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, + + # Filtering + { on = "f", run = "filter", desc = "Apply a filter for the help items" }, +] diff --git a/yazi/theme.toml b/yazi/theme.toml new file mode 100644 index 0000000..e69de29 diff --git a/yazi/yazi.toml b/yazi/yazi.toml new file mode 100644 index 0000000..e69de29