From 39b82ef71b84077c6ebd9f53ca1f017e3670243a Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 19 Nov 2024 00:34:56 +0200 Subject: Some zshrc changes and refactoring to adapt to nixos --- .zshrc | 36 +++++++----------------------------- nixos/hosts/default/home.nix | 2 +- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/.zshrc b/.zshrc index 92bd969..c63879b 100644 --- a/.zshrc +++ b/.zshrc @@ -1,12 +1,4 @@ START_TIME=$(date +%s.%3N) -# -# # Fix for tmux on openSuse with WSL2 -# mkdir -p /tmp -# export TMUX_TMPDIR='/tmp' -# -# # Enable rustup tab completion for zsh - https://rust-lang.github.io/rustup/installation/index.html -# rustup completions zsh > ~/.zfunc/_rustup -# fpath+=~/.zfunc # Install zinit if missing if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then @@ -26,14 +18,10 @@ autoload -Uz _zinit zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting zinit ice wait lucid && zinit light zsh-users/zsh-completions zinit ice wait lucid && zinit light Aloxaf/fzf-tab +zinit ice wait lucid && zinit snippet OMZP::command-not-found zinit ice wait lucid atload'_zsh_autosuggest_start && bindkey "^y" autosuggest-accept' zinit light zsh-users/zsh-autosuggestions -# Zsh snippets -zinit ice wait lucid && zinit snippet OMZP::git -# zinit ice wait lucid && zinit snippet OMZP::sudo -# zinit ice wait lucid && zinit snippet OMZP::command-not-found - # Completion styling zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" @@ -43,8 +31,6 @@ zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath' # Load oh my posh eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)" -# zinit ice wait atload"eval '$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)'" -# zinit load zdharma-continuum/null # Shell integrations zinit ice wait lucid atload'source <(fzf --zsh)' && zinit load zdharma-continuum/null @@ -67,24 +53,16 @@ setopt hist_ignore_all_dups setopt hist_save_no_dups setopt hist_ignore_dups setopt hist_find_no_dups -# -# # Aliases -# alias nvim='nvim.sh' -# alias cat='bat' + +# Aliases +alias cat='bat' alias ls='eza' alias tree='eza --tree' alias c='clear' alias vim='nvim' alias gs='git status' -# alias python='python3.12' -# alias py='python' -# -# alias pbcopy='xclip -selection clipboard' -# alias pbpaste='xclip -selection clipboard -o' -# -# # Exports -# export COLORTERM=truecolor -# export EDITOR=nvim + +export EDITOR=nvim # export PAGER=nvimpager export FZF_DEFAULT_OPTS=" \ --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ @@ -102,7 +80,7 @@ export FZF_DEFAULT_OPTS=" \ # *) export PATH="$PNPM_HOME:$PATH" ;; # esac # # pnpm end -# + # Start ssh-agent if not running eval $(keychain --quiet --eval --timeout 300 ~/.ssh/id_ed25519) diff --git a/nixos/hosts/default/home.nix b/nixos/hosts/default/home.nix index 1020447..cd361de 100644 --- a/nixos/hosts/default/home.nix +++ b/nixos/hosts/default/home.nix @@ -33,6 +33,7 @@ tmux bc keychain + bat # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the @@ -80,7 +81,6 @@ # /etc/profiles/per-user/kyren/etc/profile.d/hm-session-vars.sh # home.sessionVariables = { - EDITOR = "vim"; }; # Let Home Manager install and manage itself. -- cgit v1.3.1