221 lines
5.3 KiB
Bash
221 lines
5.3 KiB
Bash
# If you come from bash you might have to change your $PATH.
|
|
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|
export PATH="$PATH:$HOME/go/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.0/bin:$HOME/.ghcup/bin:$HOME/.gem/ruby/3.0.0/bin"
|
|
|
|
export ZSH=/usr/share/oh-my-zsh
|
|
|
|
[[ -r "/usr/share/z/z.sh" ]] && source /usr/share/z/z.sh
|
|
|
|
# Path to your oh-my-zsh installation.
|
|
|
|
#POWERLEVEL9K_MODE='nerdfont-complete'
|
|
#
|
|
#POWERLEVEL9K_FOLDER_ICON=""
|
|
#
|
|
#POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
|
|
#
|
|
#POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER=true
|
|
#
|
|
#POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND='black'
|
|
#POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND='178'
|
|
#POWERLEVEL9K_VCS_CLEAN_BACKGROUND='green'
|
|
#POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='yellow'
|
|
#POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='016'
|
|
#POWERLEVEL9K_VIRTUALENV_BACKGROUND='green'
|
|
#POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND="blue"
|
|
#POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="015"
|
|
#POWERLEVEL9K_NODE_VERSION_BACKGROUND="034"
|
|
#POWERLEVEL9K_JAVA_VERSION_BACKGROUND="016"
|
|
#POWERLEVEL9K_TIME_BACKGROUND='255'
|
|
#POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='245'
|
|
#POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='black'
|
|
#POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
|
|
#
|
|
#POWERLEVEL9K_TIME_FORMAT="%D{%H:%M}"
|
|
|
|
|
|
#P9K__LEFT=(root_indicator dir dir_writable virtualenv vcs)
|
|
#P9K__RIGHT=(status background_jobs command_execution_time)
|
|
#
|
|
#function chpwd {
|
|
# if [[ $PWD/ == ${HOME}/Documents/Development/Node/* ]]; then
|
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=("${P9K__RIGHT[@]:0:2}" "node_version" "${P9K__RIGHT[@]:2}")
|
|
# elif [[ $PWD/ == ${HOME}/Documents/Development/Java/* ]]; then
|
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=("${P9K__RIGHT[@]:0:2}" "java_version" "${P9K__RIGHT[@]:2}")
|
|
# elif [[ $PWD/ == ${HOME}/Documents/School/OGP/* ]]; then
|
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=("${P9K__RIGHT[@]:0:2}" "java_version" "${P9K__RIGHT[@]:2}")
|
|
# else
|
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(${P9K__RIGHT})
|
|
# fi
|
|
#}
|
|
|
|
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(${P9K__LEFT})
|
|
#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(${P9K__RIGHT})
|
|
|
|
#POWERLEVEL9K_SHOW_CHANGESET=true
|
|
#
|
|
if [[ $TERM == xterm-termite ]]; then
|
|
. /etc/profile.d/vte.sh
|
|
__vte_osc7
|
|
fi
|
|
|
|
HYPHEN_INSENSITIVE="true"
|
|
COMPLETION_WAITING_DOTS="true"
|
|
|
|
#source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
|
ZSH_THEME="avit"
|
|
|
|
alias nodeindex="node lib/index.js"
|
|
|
|
plugins=(
|
|
git
|
|
archlinux
|
|
tig gitfast colorize command-not-found cp dirhistory sudo zsh-autosuggestions
|
|
zsh-syntax-highlighting
|
|
)
|
|
|
|
ZSH_COMPDUMP=/tmp/zcompdump-$USER
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
|
|
HYPHEN_INSENSITIVE="true"
|
|
COMPLETION_WAITING_DOTS="true"
|
|
|
|
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
|
|
|
|
# User configuration
|
|
|
|
export MANPATH="/usr/local/man:$MANPATH"
|
|
export LANG=en_US.UTF-8
|
|
export BROWSER=/usr/bin/firefox
|
|
export EDITOR=/usr/bin/nvim
|
|
export TERM="xterm-256color"
|
|
export LC_ALL=en_GB.utf8
|
|
export QT_QPA_PLATFORMTHEME="qt5ct"
|
|
|
|
if [[ -d $HOME/.emacs.d/bin && -z $(echo $PATH | grep -o $HOME/.emacs.d/bin) ]]
|
|
then
|
|
export PATH="${PATH}:$HOME/.emacs.d/bin"
|
|
fi
|
|
|
|
export FFF_CD_ON_EXIT=1
|
|
export FFF_HIDDEN=0
|
|
export EDITOR="nvim"
|
|
export FFF_OPENER="xdg-open"
|
|
export FFF_STAT_CMD="stat"
|
|
|
|
f() {
|
|
fff "$@"
|
|
cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/.fff_d")"
|
|
}
|
|
|
|
|
|
# Python Virtualenv Stuff
|
|
|
|
export WORKON_HOME=~/Documents/Development/Python/virtualenvs
|
|
#source /usr/bin/virtualenvwrapper.sh
|
|
|
|
py() {
|
|
PY_PREV_DIR=$PWD
|
|
source "$1/bin/activate" # commented out by conda initialize
|
|
}
|
|
|
|
depy() {
|
|
deactivate
|
|
cd $PY_PREV_DIR
|
|
}
|
|
|
|
alias mkpy="python -m venv"
|
|
|
|
bindkey -v
|
|
bindkey "^?" backward-delete-char
|
|
#zle-line-init() { zle -K vicmd; }
|
|
#zle -N zle-line-init
|
|
|
|
HYPHEN_INSENSITIVE="true"
|
|
COMPLETION_WAITING_DOTS="true"
|
|
|
|
# Aliases
|
|
|
|
# Zsh
|
|
alias zshrc="vim ~/.zshrc"
|
|
alias reload="source ~/.zshrc"
|
|
|
|
# Paru
|
|
alias syu="paru -Syu"
|
|
alias s="paru -S $@"
|
|
alias r="paru -R $@"
|
|
|
|
# Git
|
|
|
|
alias ga="git add ."
|
|
alias gc="git commit -m"
|
|
alias gac="git commit -a -m"
|
|
alias gpsh="git push"
|
|
alias gpll="git pull"
|
|
|
|
gacp() {
|
|
gac $1 &&
|
|
gpsh
|
|
}
|
|
|
|
# Configs
|
|
|
|
alias polybarc="$EDITOR ~/.config/polybar/config"
|
|
alias i3c="$EDITOR ~/.config/i3/config"
|
|
alias termitec="$EDITOR ~/.config/termite/config"
|
|
alias rofic="$EDITOR ~/.config/rofi/config.rasi"
|
|
alias vimrc="$EDITOR ~/.config/nvim/init.vim"
|
|
|
|
alias vim="nvim"
|
|
alias vi="vim"
|
|
alias v="vi"
|
|
|
|
alias sys="systemctl"
|
|
alias sysu="systemctl --user"
|
|
|
|
# Scripts
|
|
|
|
alias ls=exa
|
|
alias l="exa -l"
|
|
|
|
alias c="alacritty --hold -e zsh & disown"
|
|
|
|
alias ds4="bluetoothctl power on && sudo ds4drv --hidraw --udp"
|
|
|
|
twitch() {
|
|
$BROWSER "https://twitch.tv/popout/$1/chat" &
|
|
mpv "https://twitch.tv/$1"
|
|
}
|
|
|
|
zoommode() {
|
|
echo "Loading v4l2loopback module..."
|
|
sudo modprobe v4l2loopback
|
|
echo "Loading PulseAudio null-source..."
|
|
pactl load-module module-null-source source_name=null
|
|
}
|
|
|
|
copy() {
|
|
echo "${PWD}/${1}" | xclip -i
|
|
}
|
|
|
|
paste() {
|
|
cp "$(xclip -o)" .
|
|
}
|
|
|
|
wakezolder() {
|
|
wol -p 8009 -i 192.168.1.200 d4:3d:7e:fc:0e:32
|
|
}
|
|
|
|
# If you come from bash you might have to change your $PATH.
|
|
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|
|
|
eval $(thefuck --alias)
|
|
alias config='/usr/bin/git --git-dir=/home/daan/.cfg/ --work-tree=/home/daan'
|
|
alias config='/usr/bin/git --git-dir=/home/daan/.cfg/ --work-tree=/home/daan'
|
|
|
|
alias chadgit="GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_tor -o IdentitiesOnly=yes' git"
|
|
|
|
source /usr/share/skim/key-bindings.zsh
|
|
source /usr/share/skim/completion.zsh
|