feat: yazi plugins [glow, projects, custom_scripts-set_wallpaper]

This commit is contained in:
2025-04-13 12:25:36 +02:00
parent 5d779b0b66
commit 80f1083683
11 changed files with 172 additions and 26 deletions

58
.zshrc
View File

@ -1,9 +1,3 @@
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme
source ~/.zprofile
autoload -Uz compinit
compinit
@ -13,7 +7,6 @@ compinit
# Path to your Oh My Zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(
git
@ -50,7 +43,9 @@ source $HOME/.oh-my-zsh/custom/plugins/fzf-tab-completion/zsh/fzf-zsh-completion
zstyle ':completion:*' fzf-search-display true
zstyle ':completion::*:cd::*' fzf-cd-widget
zstyle ':completion::*:ls::*' fzf-completion-opts --preview='eval head {1}'
zstyle ':completion::*:lsd::*' fzf-completion-opts --preview='eval head -n30 {1}'
zstyle ':completion::*:cat::*' fzf-completion-opts --preview='eval head {1}'
zstyle ':completion::*:nvim::*' fzf-completion-opts --preview='eval head {1}'
# Map widgets to key
@ -69,21 +64,10 @@ bindkey '^xn' fzf-insert-named-directory
## Git
bindkey '^@g' fzf-select-git-widget
bindkey '^@ga' fzf-git-add-files
bindkey '^@a' fzf-git-add-files
bindkey '^@gc' fzf-git-change-repository
# GitHub
bindkey '^@h' fzf-select-github-widget
bindkey '^@hs' fzf-github-show-issue
bindkey '^@hc' fzf-github-close-issue
## Docker
bindkey '^@d' fzf-select-docker-widget
bindkey '^@dc' fzf-docker-remove-containers
bindkey '^@di' fzf-docker-remove-images
bindkey '^@dv' fzf-docker-remove-volumes
zplug load
# zplug load
# ___ _ __ ___ ____
# / _ \| '_ ` _ \|_ /
@ -94,23 +78,53 @@ source $ZSH/oh-my-zsh.sh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# My secrets and configs
[[ ! -f ~/.exports ]] || source ~/.exports
autoload bashcompinit
bashcompinit
# yazi cwd wrapper
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# Default aliases
alias vim="nvim"
alias j="jump"
alias b="bookmark"
alias ls="lsd"
alias y="yazi"
alias ls="eza --git-repos --git"
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(gopass completion zsh)"
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
export PATH="$PATH:$HOME/tools/git-scripts"
export PATH="$PATH:/usr/local/share/dotnet"
export EDITOR=nvim
# Added by LM Studio CLI (lms)
export PATH="$PATH:/Users/paramah/.lmstudio/bin"
# bun completions
[ -s "/Users/paramah/.bun/_bun" ] && source "/Users/paramah/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
source $HOME/.atuin/bin/env
eval "$(oh-my-posh init zsh)"
. "$HOME/.atuin/bin/env"
eval "$(atuin init zsh)"