dotfiles/zsh/.zshrc

61 lines
1.9 KiB
Bash

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="obraun"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
# Spawn tmux shell if its my pc
if [ $HOST = "bodenheizung" ]; then
ZSH_TMUX_AUTOSTART=true
plugins=(git tmux)
fi
source $ZSH/oh-my-zsh.sh
# User configuration
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias keepup='paru -Syu'
alias vim='nvim'
alias package-leaves='paru -Qdt'
alias autoremove='paru -Rns $(pacman -Qdtq)'
alias autoclean='paru -Sc'
alias autoclean-all='paru -Scc'
alias kexec-load="sudo kexec -l /boot/vmlinuz-linux-zen --initrd=/boot/initramfs-linux-zen.img --reuse-cmdline"
alias fvim='nvim $(fzf --preview="cat {}")'
alias update-dotfiles='cd ~/dotfiles && git pull'
alias cd..='cd ..'
# Setup better history with fzf
source <(fzf --zsh)
HISTFILE=~/.zsh_history
HISTSIZE=10000
HISTSAVE=10000
# Setup zoxide
eval "$(zoxide init zsh --cmd cd)"
# Setup global aliases if available
if [ -f /etc/bash.bash_aliases ]; then
source /etc/bash.bash_aliases
fi