nix is now the master #1
71
.zshrc
71
.zshrc
@ -10,16 +10,7 @@
|
|||||||
############################
|
############################
|
||||||
|
|
||||||
# Required packages:
|
# Required packages:
|
||||||
# - zsh
|
|
||||||
# - oh-my-zsh-git (AUR)
|
|
||||||
# - zsh-theme-powerlevel10k
|
|
||||||
# - zsh-syntax-highlighting
|
|
||||||
# - zsh-completions
|
|
||||||
# - zsh-autosuggestions
|
|
||||||
# - nerd-font-hack (AUR)
|
# - nerd-font-hack (AUR)
|
||||||
# - lsd
|
|
||||||
# - fzf
|
|
||||||
# - pkgfile
|
|
||||||
# - trash-cli (with gvfs)
|
# - trash-cli (with gvfs)
|
||||||
|
|
||||||
export PATH=$HOME/.local/bin:$HOME/.dotnet/tools:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/bin:$PATH
|
export PATH=$HOME/.local/bin:$HOME/.dotnet/tools:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/bin:$PATH
|
||||||
@ -27,41 +18,20 @@ export PATH=$HOME/.local/bin:$HOME/.dotnet/tools:$XDG_DATA_HOME/npm_global/bin:$
|
|||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
[ -n $SSH_CONNECTION ] && source ~/.profile
|
[ -n $SSH_CONNECTION ] && source ~/.profile
|
||||||
|
|
||||||
# Oh my zsh stuff
|
# NIXOS specific stuff
|
||||||
|
source /etc/zshrc
|
||||||
|
|
||||||
# powerline instant promt
|
# P10K stuff
|
||||||
if [ -z $SSH_CONNECTION ]; then
|
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
fi
|
fi
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
|
# wal subshell for terminal colors
|
||||||
|
if test -f $XDG_CACHE_HOME/wal/sequences; then
|
||||||
|
(cat $XDG_CACHE_HOME/wal/sequences &)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ZSH="/usr/share/oh-my-zsh"
|
|
||||||
HISTFILE="$XDG_CACHE_HOME/zsh_history"
|
|
||||||
|
|
||||||
if [[ -n $SSH_CONNECTION ]]; then
|
|
||||||
ZSH_THEME="gallois"
|
|
||||||
else
|
|
||||||
ZSH_THEME="../../zsh-theme-powerlevel10k/powerlevel10k"
|
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
||||||
[[ ! -f "$XDG_CACHE_HOME/p10k.zsh" ]] || source "$XDG_CACHE_HOME/p10k.zsh"
|
|
||||||
#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# wal subshell
|
|
||||||
(cat ~/.cache/wal/sequences &)
|
|
||||||
|
|
||||||
DISABLE_UPDATE_PROMPT=true
|
|
||||||
DISABLE_AUTO_UPDATE=true
|
|
||||||
ZSH_CACHE_DIR="$XDG_CACHE_HOME/oh-my-zsh" # mkdir ~/.cache/oh-my-zsh
|
|
||||||
_Z_DATA="$XDG_CACHE_HOME/z"
|
|
||||||
ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST
|
|
||||||
|
|
||||||
plugins=(
|
plugins=(
|
||||||
git
|
git
|
||||||
last-working-dir
|
last-working-dir
|
||||||
@ -69,22 +39,7 @@ plugins=(
|
|||||||
z
|
z
|
||||||
)
|
)
|
||||||
|
|
||||||
autoload -U compinit
|
|
||||||
|
|
||||||
# start oh my zsh
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
# Sytax highlight
|
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
||||||
|
|
||||||
# autosugestion
|
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
||||||
|
|
||||||
# command not found
|
|
||||||
source /usr/share/doc/pkgfile/command-not-found.zsh # dont forget to run pkgfile -u
|
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
|
|
||||||
export MANPAGER="bat -l man -p"
|
export MANPAGER="bat -l man -p"
|
||||||
|
|
||||||
# ZSH percent fix
|
# ZSH percent fix
|
||||||
@ -96,11 +51,8 @@ export FZF_DEFAULT_OPTS="--ansi"
|
|||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
alias sudo='sudo '
|
|
||||||
alias please='sudo '
|
alias please='sudo '
|
||||||
|
alias ls='exa --icons'
|
||||||
[ -z $SSH_CONNECTION ] && alias ls='exa --icons'
|
|
||||||
|
|
||||||
alias svim='sudoedit'
|
alias svim='sudoedit'
|
||||||
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfile config --local status.showUntrackedFiles no
|
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfile config --local status.showUntrackedFiles no
|
||||||
alias open="xdg-open"
|
alias open="xdg-open"
|
||||||
@ -111,11 +63,12 @@ alias modx="chmod +x"
|
|||||||
alias mv="mv -iv"
|
alias mv="mv -iv"
|
||||||
alias cp="cp -riv"
|
alias cp="cp -riv"
|
||||||
alias mkdir="mkdir -pv"
|
alias mkdir="mkdir -pv"
|
||||||
alias yeet="sudo pacman -Rns"
|
|
||||||
alias ip="ip -c=auto"
|
alias ip="ip -c=auto"
|
||||||
alias syu="sudo pacman -Syu"
|
alias syu="sudo nix-channel --update"
|
||||||
alias virsh="virsh -c qemu:///system"
|
alias virsh="virsh -c qemu:///system"
|
||||||
alias k="kubectl"
|
alias k="kubectl"
|
||||||
alias ssh="TERM=xterm-256color ssh"
|
alias ssh="TERM=xterm-256color ssh"
|
||||||
alias df="duf"
|
alias df="duf"
|
||||||
|
alias du="dust"
|
||||||
alias nom="npm"
|
alias nom="npm"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user