commit 8bbb1689630643510b3d7251d5e7e5c2c99fba21 Author: reeink Date: Wed Feb 28 19:48:07 2024 +0800 init dotfiles diff --git a/dot_condarc b/dot_condarc new file mode 100644 index 0000000..c931316 --- /dev/null +++ b/dot_condarc @@ -0,0 +1 @@ +changeps1: False diff --git a/dot_config/paru/paru.conf b/dot_config/paru/paru.conf new file mode 100644 index 0000000..8d50693 --- /dev/null +++ b/dot_config/paru/paru.conf @@ -0,0 +1,9 @@ +[options] +PgpFetch +Devel +Provides +DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil +BottomUp +BatchInstall +SudoLoop +FailFast diff --git a/dot_config/starship.toml b/dot_config/starship.toml new file mode 100644 index 0000000..90cc14e --- /dev/null +++ b/dot_config/starship.toml @@ -0,0 +1,14 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +# Inserts a blank line between shell prompts +add_newline = true + +# Replace the '❯' symbol in the prompt with '➜' +[character] # The name of the module we are configuring is 'character' +success_symbol = '[\$](bold green)' +error_symbol = '[\$](bold red)' + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true diff --git a/dot_config/yazi/keymap.toml b/dot_config/yazi/keymap.toml new file mode 100644 index 0000000..b6ec58c --- /dev/null +++ b/dot_config/yazi/keymap.toml @@ -0,0 +1,300 @@ +# 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 = [ "" ], exec = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, + { on = [ "q" ], exec = "quit", desc = "Exit the process" }, + { on = [ "Q" ], exec = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" }, + { on = [ "" ], exec = "close", desc = "Close the current tab, or quit if it is last tab" }, + { on = [ "" ], exec = "suspend", desc = "Suspend the process" }, + + # Navigation + { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, + { on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, + + { on = [ "" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, + { on = [ "" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, + + { on = [ "" ], exec = "arrow -50%", desc = "Move cursor up half page" }, + { on = [ "" ], exec = "arrow 50%", desc = "Move cursor down half page" }, + { on = [ "" ], exec = "arrow -100%", desc = "Move cursor up one page" }, + { on = [ "" ], exec = "arrow 100%", desc = "Move cursor down one page" }, + + { on = [ "" ], exec = "arrow -50%", desc = "Move cursor up half page" }, + { on = [ "" ], exec = "arrow 50%", desc = "Move cursor down half page" }, + { on = [ "" ], exec = "arrow -100%", desc = "Move cursor up one page" }, + { on = [ "" ], exec = "arrow 100%", desc = "Move cursor down one page" }, + + { on = [ "h" ], exec = "leave", desc = "Go back to the parent directory" }, + { on = [ "l" ], exec = "enter", desc = "Enter the child directory" }, + + { on = [ "H" ], exec = "back", desc = "Go back to the previous directory" }, + { on = [ "L" ], exec = "forward", desc = "Go forward to the next directory" }, + + { on = [ "" ], exec = "seek -5", desc = "Seek up 5 units in the preview" }, + { on = [ "" ], exec = "seek 5", desc = "Seek down 5 units in the preview" }, + { on = [ "" ], exec = "seek -5", desc = "Seek up 5 units in the preview" }, + { on = [ "" ], exec = "seek 5", desc = "Seek down 5 units in the preview" }, + + { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, + { on = [ "" ], exec = "leave", desc = "Go back to the parent directory" }, + { on = [ "" ], exec = "enter", desc = "Enter the child directory" }, + + { on = [ "g", "g" ], exec = "arrow -99999999", desc = "Move cursor to the top" }, + { on = [ "G" ], exec = "arrow 99999999", desc = "Move cursor to the bottom" }, + + # Selection + { on = [ "" ], exec = [ "select --state=none", "arrow 1" ], desc = "Toggle the current selection state" }, + { on = [ "v" ], exec = "visual_mode", desc = "Enter visual mode (selection mode)" }, + { on = [ "V" ], exec = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, + { on = [ "" ], exec = "select_all --state=true", desc = "Select all files" }, + { on = [ "" ], exec = "select_all --state=none", desc = "Inverse selection of all files" }, + + # Operation + { on = [ "o" ], exec = "open", desc = "Open the selected files" }, + { on = [ "O" ], exec = "open --interactive", desc = "Open the selected files interactively" }, + { on = [ "" ], exec = "open", desc = "Open the selected files" }, + { on = [ "" ], exec = "open --interactive", desc = "Open the selected files interactively" }, + { on = [ "y" ], exec = "yank", desc = "Copy the selected files" }, + { on = [ "Y" ], exec = "unyank", desc = "Cancel the yank status of files" }, + { on = [ "x" ], exec = "yank --cut", desc = "Cut the selected files" }, + { on = [ "p" ], exec = "paste", desc = "Paste the files" }, + { on = [ "P" ], exec = "paste --force", desc = "Paste the files (overwrite if the destination exists)" }, + { on = [ "-" ], exec = "link", desc = "Symlink the absolute path of files" }, + { on = [ "_" ], exec = "link --relative", desc = "Symlink the relative path of files" }, + { on = [ "d" ], exec = "remove", desc = "Move the files to the trash" }, + { on = [ "D" ], exec = "remove --permanently", desc = "Permanently delete the files" }, + { on = [ "a" ], exec = "create", desc = "Create a file or directory (ends with / for directories)" }, + { on = [ "r" ], exec = "rename --cursor=before_ext", desc = "Rename a file or directory" }, + { on = [ ";" ], exec = "shell", desc = "Run a shell command" }, + { on = [ ":" ], exec = "shell --block", desc = "Run a shell command (block the UI until the command finishes)" }, + { on = [ "." ], exec = "hidden toggle", desc = "Toggle the visibility of hidden files" }, + { on = [ "s" ], exec = "search fd", desc = "Search files by name using fd" }, + { on = [ "S" ], exec = "search rg", desc = "Search files by content using ripgrep" }, + { on = [ "" ], exec = "search none", desc = "Cancel the ongoing search" }, + { on = [ "z" ], exec = "jump zoxide", desc = "Jump to a directory using zoxide" }, + { on = [ "Z" ], exec = "jump fzf", desc = "Jump to a directory, or reveal a file using fzf" }, + + # Linemode + { on = [ "m", "s" ], exec = "linemode size", desc = "Set linemode to size" }, + { on = [ "m", "p" ], exec = "linemode permissions", desc = "Set linemode to permissions" }, + { on = [ "m", "m" ], exec = "linemode mtime", desc = "Set linemode to mtime" }, + { on = [ "m", "n" ], exec = "linemode none", desc = "Set linemode to none" }, + + # Copy + { on = [ "c", "c" ], exec = "copy path", desc = "Copy the absolute path" }, + { on = [ "c", "d" ], exec = "copy dirname", desc = "Copy the path of the parent directory" }, + { on = [ "c", "f" ], exec = "copy filename", desc = "Copy the name of the file" }, + { on = [ "c", "n" ], exec = "copy name_without_ext", desc = "Copy the name of the file without the extension" }, + + # Filter + { on = [ "f" ], exec = "filter --smart", desc = "Filter the files" }, + + # Find + { on = [ "/" ], exec = "find --smart", desc = "Find next file" }, + { on = [ "?" ], exec = "find --previous --smart", desc = "Find previous file" }, + { on = [ "n" ], exec = "find_arrow", desc = "Go to next found file" }, + { on = [ "N" ], exec = "find_arrow --previous", desc = "Go to previous found file" }, + + # Sorting + { on = [ ",", "m" ], exec = "sort modified --dir-first", desc = "Sort by modified time" }, + { on = [ ",", "M" ], exec = "sort modified --reverse --dir-first", desc = "Sort by modified time (reverse)" }, + { on = [ ",", "c" ], exec = "sort created --dir-first", desc = "Sort by created time" }, + { on = [ ",", "C" ], exec = "sort created --reverse --dir-first", desc = "Sort by created time (reverse)" }, + { on = [ ",", "e" ], exec = "sort extension --dir-first", desc = "Sort by extension" }, + { on = [ ",", "E" ], exec = "sort extension --reverse --dir-first", desc = "Sort by extension (reverse)" }, + { on = [ ",", "a" ], exec = "sort alphabetical --dir-first", desc = "Sort alphabetically" }, + { on = [ ",", "A" ], exec = "sort alphabetical --reverse --dir-first", desc = "Sort alphabetically (reverse)" }, + { on = [ ",", "n" ], exec = "sort natural --dir-first", desc = "Sort naturally" }, + { on = [ ",", "N" ], exec = "sort natural --reverse --dir-first", desc = "Sort naturally (reverse)" }, + { on = [ ",", "s" ], exec = "sort size --dir-first", desc = "Sort by size" }, + { on = [ ",", "S" ], exec = "sort size --reverse --dir-first", desc = "Sort by size (reverse)" }, + + # Tabs + { on = [ "t" ], exec = "tab_create --current", desc = "Create a new tab using the current path" }, + + { on = [ "1" ], exec = "tab_switch 0", desc = "Switch to the first tab" }, + { on = [ "2" ], exec = "tab_switch 1", desc = "Switch to the second tab" }, + { on = [ "3" ], exec = "tab_switch 2", desc = "Switch to the third tab" }, + { on = [ "4" ], exec = "tab_switch 3", desc = "Switch to the fourth tab" }, + { on = [ "5" ], exec = "tab_switch 4", desc = "Switch to the fifth tab" }, + { on = [ "6" ], exec = "tab_switch 5", desc = "Switch to the sixth tab" }, + { on = [ "7" ], exec = "tab_switch 6", desc = "Switch to the seventh tab" }, + { on = [ "8" ], exec = "tab_switch 7", desc = "Switch to the eighth tab" }, + { on = [ "9" ], exec = "tab_switch 8", desc = "Switch to the ninth tab" }, + + { on = [ "[" ], exec = "tab_switch -1 --relative", desc = "Switch to the previous tab" }, + { on = [ "]" ], exec = "tab_switch 1 --relative", desc = "Switch to the next tab" }, + + { on = [ "{" ], exec = "tab_swap -1", desc = "Swap the current tab with the previous tab" }, + { on = [ "}" ], exec = "tab_swap 1", desc = "Swap the current tab with the next tab" }, + + # Tasks + { on = [ "w" ], exec = "tasks_show", desc = "Show the tasks manager" }, + + # Goto + { on = [ "g", "h" ], exec = "cd ~", desc = "Go to the home directory" }, + { on = [ "g", "c" ], exec = "cd ~/.config", desc = "Go to the config directory" }, + { on = [ "g", "d" ], exec = "cd ~/Downloads", desc = "Go to the downloads directory" }, + { on = [ "g", "t" ], exec = "cd /tmp", desc = "Go to the temporary directory" }, + { on = [ "g", "" ], exec = "cd --interactive", desc = "Go to a directory interactively" }, + + # Help + { on = [ "~" ], exec = "help", desc = "Open help" }, +] + +[tasks] + +keymap = [ + { on = [ "" ], exec = "close", desc = "Hide the task manager" }, + { on = [ "" ], exec = "close", desc = "Hide the task manager" }, + { on = [ "w" ], exec = "close", desc = "Hide the task manager" }, + + { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "" ], exec = "inspect", desc = "Inspect the task" }, + { on = [ "x" ], exec = "cancel", desc = "Cancel the task" }, + + { on = [ "~" ], exec = "help", desc = "Open help" } +] + +[select] + +keymap = [ + { on = [ "" ], exec = "close", desc = "Cancel selection" }, + { on = [ "" ], exec = "close", desc = "Cancel selection" }, + { on = [ "" ], exec = "close --submit", desc = "Submit the selection" }, + + { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, + { on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, + + { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, + { on = [ "" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, + + { on = [ "~" ], exec = "help", desc = "Open help" } +] + +[input] + +keymap = [ + { on = [ "" ], exec = "close", desc = "Cancel input" }, + { on = [ "" ], exec = "close --submit", desc = "Submit the input" }, + { on = [ "" ], exec = "escape", desc = "Go back the normal mode, or cancel input" }, + + # Mode + { on = [ "i" ], exec = "insert", desc = "Enter insert mode" }, + { on = [ "a" ], exec = "insert --append", desc = "Enter append mode" }, + { on = [ "I" ], exec = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" }, + { on = [ "A" ], exec = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, + { on = [ "v" ], exec = "visual", desc = "Enter visual mode" }, + { on = [ "V" ], exec = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" }, + + # Character-wise movement + { on = [ "h" ], exec = "move -1", desc = "Move back a character" }, + { on = [ "l" ], exec = "move 1", desc = "Move forward a character" }, + { on = [ "" ], exec = "move -1", desc = "Move back a character" }, + { on = [ "" ], exec = "move 1", desc = "Move forward a character" }, + { on = [ "" ], exec = "move -1", desc = "Move back a character" }, + { on = [ "" ], exec = "move 1", desc = "Move forward a character" }, + + # Word-wise movement + { on = [ "b" ], exec = "backward", desc = "Move back to the start of the current or previous word" }, + { on = [ "w" ], exec = "forward", desc = "Move forward to the start of the next word" }, + { on = [ "e" ], exec = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = [ "" ], exec = "backward", desc = "Move back to the start of the current or previous word" }, + { on = [ "" ], exec = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + + # Line-wise movement + { on = [ "0" ], exec = "move -999", desc = "Move to the BOL" }, + { on = [ "$" ], exec = "move 999", desc = "Move to the EOL" }, + { on = [ "" ], exec = "move -999", desc = "Move to the BOL" }, + { on = [ "" ], exec = "move 999", desc = "Move to the EOL" }, + { on = [ "" ], exec = "move -999", desc = "Move to the BOL" }, + { on = [ "" ], exec = "move 999", desc = "Move to the EOL" }, + + # Delete + { on = [ "" ], exec = "backspace", desc = "Delete the character before the cursor" }, + { on = [ "" ], exec = "backspace --under", desc = "Delete the character under the cursor" }, + { on = [ "" ], exec = "backspace", desc = "Delete the character before the cursor" }, + { on = [ "" ], exec = "backspace --under", desc = "Delete the character under the cursor" }, + + # Kill + { on = [ "" ], exec = "kill bol", desc = "Kill backwards to the BOL" }, + { on = [ "" ], exec = "kill eol", desc = "Kill forwards to the EOL" }, + { on = [ "" ], exec = "kill backward", desc = "Kill backwards to the start of the current word" }, + { on = [ "" ], exec = "kill forward", desc = "Kill forwards to the end of the current word" }, + + # Cut/Yank/Paste + { on = [ "d" ], exec = "delete --cut", desc = "Cut the selected characters" }, + { on = [ "D" ], exec = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" }, + { on = [ "c" ], exec = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" }, + { on = [ "C" ], exec = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" }, + { on = [ "x" ], exec = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" }, + { on = [ "y" ], exec = "yank", desc = "Copy the selected characters" }, + { on = [ "p" ], exec = "paste", desc = "Paste the copied characters after the cursor" }, + { on = [ "P" ], exec = "paste --before", desc = "Paste the copied characters before the cursor" }, + + # Undo/Redo + { on = [ "u" ], exec = "undo", desc = "Undo the last operation" }, + { on = [ "" ], exec = "redo", desc = "Redo the last operation" }, + + # Help + { on = [ "~" ], exec = "help", desc = "Open help" } +] + +[completion] + +keymap = [ + { on = [ "" ], exec = "close", desc = "Cancel completion" }, + { on = [ "" ], exec = "close --submit", desc = "Submit the completion" }, + { on = [ "" ], exec = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" }, + + { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "~" ], exec = "help", desc = "Open help" } +] + +[help] + +keymap = [ + { on = [ "" ], exec = "escape", desc = "Clear the filter, or hide the help" }, + { on = [ "q" ], exec = "close", desc = "Exit the process" }, + { on = [ "" ], exec = "close", desc = "Hide the help" }, + + # Navigation + { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, + { on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, + + { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, + { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, + + { on = [ "" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, + { on = [ "" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, + + # Filtering + { on = [ "/" ], exec = "filter", desc = "Apply a filter for the help items" }, +] \ No newline at end of file diff --git a/dot_config/yazi/theme.toml b/dot_config/yazi/theme.toml new file mode 100644 index 0000000..04a8ccf --- /dev/null +++ b/dot_config/yazi/theme.toml @@ -0,0 +1,3 @@ +# 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/theme.json" diff --git a/dot_config/yazi/yazi.toml b/dot_config/yazi/yazi.toml new file mode 100644 index 0000000..5ad8af1 --- /dev/null +++ b/dot_config/yazi/yazi.toml @@ -0,0 +1,8 @@ +# 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/yazi.json" + +[manager] +sort_by = "natural" +sort_dir_first = true +show_hidden = true diff --git a/dot_mambarc b/dot_mambarc new file mode 100644 index 0000000..e2517f7 --- /dev/null +++ b/dot_mambarc @@ -0,0 +1,2 @@ + channels: + - conda-forge diff --git a/dot_zshrc b/dot_zshrc new file mode 100644 index 0000000..be1dd16 --- /dev/null +++ b/dot_zshrc @@ -0,0 +1,137 @@ +autoload -Uz compinit +compinit + +# autocompletion with an arrow-key driven interface +zstyle ':completion:*' menu select + + +# create a zkbd compatible hash; +# to add other keys to this hash, see: man 5 terminfo +typeset -g -A key + +key[Home]="${terminfo[khome]}" +key[End]="${terminfo[kend]}" +key[Insert]="${terminfo[kich1]}" +key[Backspace]="${terminfo[kbs]}" +key[Delete]="${terminfo[kdch1]}" +key[Up]="${terminfo[kcuu1]}" +key[Down]="${terminfo[kcud1]}" +key[Left]="${terminfo[kcub1]}" +key[Right]="${terminfo[kcuf1]}" +key[PageUp]="${terminfo[kpp]}" +key[PageDown]="${terminfo[knp]}" +key[Shift-Tab]="${terminfo[kcbt]}" + +# setup key accordingly +[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line +[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode +[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char +[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history +[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history +[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char +[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char +[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history +[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history +[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete + +# Finally, make sure the terminal is in application mode, when zle is +# active. Only then are the values from $terminfo valid. +if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then + autoload -Uz add-zle-hook-widget + function zle_application_mode_start { echoti smkx } + function zle_application_mode_stop { echoti rmkx } + add-zle-hook-widget -Uz zle-line-init zle_application_mode_start + add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop +fi + + +# history search +autoload -Uz up-line-or-beginning-search down-line-or-beginning-search +zle -N up-line-or-beginning-search +zle -N down-line-or-beginning-search + +[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search +[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search + + +# shift, alt, tab and mod modifiers +key[Control-Left]="${terminfo[kLFT5]}" +key[Control-Right]="${terminfo[kRIT5]}" + +[[ -n "${key[Control-Left]}" ]] && bindkey -- "${key[Control-Left]}" backward-word +[[ -n "${key[Control-Right]}" ]] && bindkey -- "${key[Control-Right]}" forward-word + +# zsh-autosuggestions +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +# zsh-syntax-highlighting.zsh +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + + +# >>> mamba initialize >>> +# !! Contents within this block are managed by 'mamba init' !! +export MAMBA_EXE='/usr/bin/micromamba'; +export MAMBA_ROOT_PREFIX='~/.micromamba'; +__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__mamba_setup" +else + alias micromamba="$MAMBA_EXE" # Fallback on help from mamba activate +fi +unset __mamba_setup +# <<< mamba initialize <<< + + +# starship config +eval "$(starship init zsh)" + +# fnm config +eval "$(fnm env --use-on-cd)" + +# thefuck config +fuck() { + unfunction fuck + eval $(thefuck --alias) + fuck "$@" +} + +# yazi config +function ya() { + local tmp="$(mktemp -t "yazi-cwd.XXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + cd -- "$cwd" + fi + rm -f -- "$tmp" +} + +# atuin config +eval "$(atuin init zsh)" + +# zoxide config +eval "$(zoxide init zsh)" + +# sops keys +export SOPS_AGE_RECIPIENTS="op://Private/Age/public key" +export SOPS_AGE_KEY="op://Private/Age/private key" + +# custome alias +# alias code=code-insiders +alias ..='cd ..' +alias ...='cd ../..' +alias ls=eza +alias f=fuck +alias v=nvim +alias mm=micromamba +alias ma='micromamba activate' +alias mda='micromamba activate base' +alias mc='micromamba create' +alias mr='micromamba run' +alias mi='micromamba install' +alias conda='micromamba' +alias sops='op run --no-masking -- sops' +alias dotfiles='chezmoi' + +# Created by `pipx` on 2024-02-17 11:33:21 +export PATH="$PATH:/home/ree/.local/bin"