dotfiles-remastered/.zshrc
2024-09-08 21:55:53 +02:00

70 lines
2.0 KiB
Bash

############################
# #
# ███████╗███████╗██╗ ██╗ #
# ╚══███╔╝██╔════╝██║ ██║ #
# ███╔╝ ███████╗███████║ #
# ███╔╝ ╚════██║██╔══██║ #
# ███████╗███████║██║ ██║ #
# ╚══════╝╚══════╝╚═╝ ╚═╝ #
# #
############################
export PATH=$HOME/.local/bin:$XDG_DATA_HOME/npm_global/bin:$XDG_DATA_HOME/cargo/bin:$PATH
[[ $- != *i* ]] && return
[ -n $SSH_CONNECTION ] && source ~/.profile
# NIXOS specific stuff
source /etc/zshrc
# wal subshell for terminal colors
if test -f $XDG_CACHE_HOME/wal/sequences; then
(cat $XDG_CACHE_HOME/wal/sequences &)
fi
# Start oh-my-posh
eval "$(oh-my-posh init zsh --config $XDG_CONFIG_HOME/oh-my-posh/config.toml)"
# Variables
export MANPAGER="bat -l man -p"
# ZSH percent fix
export PROMPT_EOL_MARK=""
HISTFILE="$XDG_CACHE_HOME/zsh_history"
HISTSIZE=10000
SAVEHIST=10000
setopt APPEND_HISTORY
# FZF
export FZF_DEFAULT_COMMAND="fd --type file --color=always"
export FZF_DEFAULT_OPTS="--ansi"
# FZF history
source <(fzf --zsh)
# Aliases
alias vim="nvim"
alias please='sudo '
alias ls='exa --icons'
alias svim='sudoedit'
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfiles config --local status.showUntrackedFiles no
alias open="xdg-open"
alias mixer="pulsemixer"
alias yt-dl-audio="yt-dlp --extract-audio --audio-format mp3 -o '%(title)s.%(ext)s'"
#alias rm="trash" # broken autocompletion right now
alias modx="chmod +x"
alias mv="mv -iv"
alias cp="cp -riv"
alias mkdir="mkdir -pv"
alias ip="ip -c=auto"
alias syu="sudo nix-channel --update"
alias virsh="virsh -c qemu:///system"
alias k="kubectl"
alias ssh="TERM=xterm-256color ssh"
alias df="duf"
alias du="dust"
alias nom="npm"
alias code="codium"
alias lg="lazygit"