143 lines
3.7 KiB
Bash
143 lines
3.7 KiB
Bash
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
|
fi
|
|
export ZSH="$HOME/.oh-my-zsh"
|
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
HIST_STAMPS="dd.mm.yyyy"
|
|
plugins=(git)
|
|
source $ZSH/oh-my-zsh.sh
|
|
autoload -U +X bashcompinit && bashcompinit
|
|
[ -f /usr/share/bash-completion/completions/dnf ] && source /usr/share/bash-completion/completions/dnf
|
|
|
|
######################
|
|
# User configuration #
|
|
######################
|
|
|
|
export EDITOR='nvim'
|
|
|
|
# nullpoint custom fastfetch
|
|
alias fastfetch='fastfetch --file-raw /etc/nullpoint-logo'
|
|
|
|
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
|
|
[ -f /etc/profile.d/vte.sh ] && source /etc/profile.d/vte.sh
|
|
fi
|
|
|
|
#export LS_COLORS='rs=0:no=00:mi=00:mh=00:ln=01;36:or=01;31:di=01;34:ow=04;01;34:st=34:tw=04;34:pi=01;33:so=01;33:do=01;33:bd=01;33:cd=01;33:su=01;35:sg=01;35:ca=01;35:ex=01;32:'
|
|
|
|
##########
|
|
|
|
# lang
|
|
alias python='python3.13'
|
|
alias pip='python -m pip'
|
|
alias ptpython="python -m ptpython"
|
|
alias ptpy="python -m ptpython"
|
|
alias py13='python3.13'
|
|
alias py9='python3.9'
|
|
alias bpytop="python -m bpytop"
|
|
|
|
# python venv
|
|
alias pvcreate="python -m venv .venv"
|
|
alias pvactivate="source .venv/bin/activate"
|
|
alias pvinstall="echo 'Creating Python-venv' && pvcreate && echo 'Entering venv' && pvactivate && echo 'Upgrading pip' && pip install pip --upgrade && echo 'Installing Dependencies' && pip install -r requirements.txt && echo 'Done.'"
|
|
|
|
# qol
|
|
alias cls="clear"
|
|
alias root="sudo su --shell /bin/zsh"
|
|
alias open="xdg-open"
|
|
alias filenum="du -a | cut -d/ -f2 | sort | uniq -c | sort -nr"
|
|
alias pg="progress"
|
|
alias hist="history"
|
|
alias untar="tar -zxvf"
|
|
alias neofetch=fastfetch
|
|
|
|
# grep
|
|
alias antigrep="grep -v"
|
|
alias grep2="grep -A 2 -B 2"
|
|
alias grep4="grep -A 4 -B 4"
|
|
alias grep8="grep -A 8 -B 8"
|
|
alias grep16="grep -A 16 -B 16"
|
|
alias grep32="grep -A 32 -B 32"
|
|
alias ag="alias | grep"
|
|
|
|
# packages
|
|
alias get="sudo dnf install"
|
|
alias upd="sudo dnf check-upgrade"
|
|
alias upg="sudo dnf upgrade"
|
|
|
|
# chars
|
|
alias c="clear"
|
|
alias t="bpytop"
|
|
alias p="ptpy"
|
|
alias h="history | grep"
|
|
alias v="nvim"
|
|
alias n="nano"
|
|
alias o="open"
|
|
alias e="\d"
|
|
alias ":q"="exit"
|
|
|
|
# git
|
|
alias gs="git status"
|
|
alias gt="git log --all --graph --decorate --oneline --abbrev-commit"
|
|
alias gnoc='git shortlog -sn | cat' # Number Of Commit by user
|
|
alias gloc='git ls-files | while read f; do git blame -w -M -C -C --line-porcelain "$f" | grep -I "^author "; done | sort -f | uniq -ic | sort -n --reverse' # Lines Of Code by user (in final version)
|
|
alias gpa='gaa && gc -m "." && gp -4'
|
|
|
|
# dirs
|
|
alias tmp="cd ~/.tmp"
|
|
|
|
# extensions
|
|
alias sudo="sudo "
|
|
alias watch="watch "
|
|
alias watch1="watch -n 1 "
|
|
|
|
# better ls via lsd
|
|
alias ls="lsd"
|
|
alias l="ls -1"
|
|
alias la="ls -A"
|
|
alias laa="ls -a"
|
|
alias lsa="ls -lA"
|
|
alias lla="ls -lA"
|
|
alias ltree="ls --tree"
|
|
alias d0="ls --tree"
|
|
alias d="ls --depth 1 --tree"
|
|
alias d1="ls --depth 1 --tree"
|
|
alias d2="ls --depth 2 --tree"
|
|
alias d3="ls --depth 3 --tree"
|
|
alias d4="ls --depth 4 --tree"
|
|
alias d5="ls --depth 5 --tree"
|
|
alias d6="ls --depth 6 --tree"
|
|
|
|
# more ls
|
|
alias lo="\ls --color=tty"
|
|
alias dtree="tree --du -h"
|
|
alias gtree="tree --du -h -F -C | grep 'G] ' --color=never"
|
|
|
|
# better cat via batcat
|
|
alias bat="bat --pager ''"
|
|
alias pat="bat --pager '' --plain"
|
|
alias lat="bat"
|
|
|
|
# more fancy batcat stuff
|
|
alias man="batman"
|
|
|
|
# tmux
|
|
alias s="tmux"
|
|
alias sa="tmux attach"
|
|
alias sn="tmux new -s"
|
|
alias san="tmux attach -t"
|
|
alias sl="tmux ls"
|
|
alias sk="tmux kill-session -t"
|
|
alias ska="tmux kill-session -a"
|
|
|
|
#####
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
# Enable bash completion compatibility in zsh
|
|
autoload -U +X bashcompinit && bashcompinit
|
|
autoload -U +X compinit && compinit
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
|