added all the dotfiles

This commit is contained in:
liph
2025-12-19 22:53:46 +00:00
parent e29ca99666
commit 303cd3b5a9
61 changed files with 3148 additions and 0 deletions

174
zshrc/.aliases.zsh Executable file
View File

@@ -0,0 +1,174 @@
alias nt='/mnt/ssd1/scripts/nothumb.sh'
alias nn='/mnt/ssd1/scripts/nonum.sh'
alias rt='/mnt/ssd1/scripts/retag.sh'
alias ea='/mnt/ssd1/scripts/extraudio.sh'
alias dd='/mnt/ssd1/scripts/m3u8.sh'
# podmand
alias pops='sudo podman ps'
alias pos='sudo podman start'
alias post='sudo podman stop'
alias poc='sudo podman-compose up -d'
alias pocp='sudo podman-compose pull'
alias pocf='sudo podman-compose up -d --force-recreate'
alias pocst='sudo podman-compose stop'
alias pocs='sudo podman-compose start'
alias pocrs='sudo podman-compose restart'
alias porm='sudo podman rm'
alias pormf='sudo podman rm -f'
alias pormi='sudo podman rmi'
alias pors='sudo podman restart'
alias pol='sudo podman logs'
alias poi='sudo podman images'
alias pocd='sudo podman-compose down'
alias pocdf='pocd && pocf'
alias pocup='pocp && poc'
alias pocupf='pocp && pocf'
alias pocdupd='pocst && pocd && pocp && poc'
alias cl='clear'
alias cld='clear && cd'
alias neo='neofetch'
alias f='fuck'
alias soz='source ~/.zshrc'
alias rmm='sudo rm -R'
alias mc='musikcube'
alias mat='tldr'
# 8 commandlinetools zoxide_openfiles_nvim
alias nzo="~/scripts/zoxide_openfiles_nvim.sh"
alias rebo='sudo grub-mkconfig -o /boot/grub/grub.cfg; reboot'
alias shut='sudo grub-mkconfig -o /boot/grub/grub.cfg; shutdown now'
alias grubb='sudo grub-mkconfig -o /boot/grub/grub.cfg'
# called from ~/scrtipts/
alias nlof="~/scripts/fzf_listoldfiles.sh"
# alias fman="compgen -c | fzf | xargs man"
# tmux
alias ta='tmux attach'
alias tn='tmux new'
alias tns='~/scripts/tmux-sessionizer.sh'
# eza
alias lt='eza --tree --level=1 --long --icons --git'
alias ltt='eza --tree --level=2 --long --icons --git'
alias lttt='eza --tree --level=3 --long --icons --git'
alias ltre='eza --tree --level=1 --icons --git'
alias ltree='eza --tree --level=2 --icons --git'
alias ltreee='eza --tree --level=3 --icons --git'
#alias ls='eza --color=always --long --git --no-time --icons=always --no-user --no-permissions'
# mirrorlist
alias mbak='sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak'
alias mlist='sudo reflector --verbose --latest 10 --age 1 --download-timeout 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist'
# git commands
# alias gad='git add'
# alias gaf='git add *'
# alias gco='git commit -m'
# alias gp='git push'
# alias gcc='git clone'
alias lgit='lazygit'
# proton vpn
alias vpnn='sudo protonvpn c'
alias vpnr='sudo protonvpn reconnect' # reconnect after sleep
alias vpn='sudo protonvpn c -f' # connect to fastest server
alias vpnd='sudo protonvpn d' # diconnect current session
alias vpnp='sudo protonvpn c --p2p' # connect to fastest p2p server
alias vpns='protonvpn status' # check status
# NetworkManager
alias nmwi='nmcli device wifi list' # show you all possible wifi networks
alias nmst='nmcli device status' # shows you the current connection
alias nmco='nmcli device wifi connect' # add '$SSID' and '$PASSWORD'
alias nmsh='nmcli con show' # shows all valid connnections
alias nmup='nmcli con up' # add the name of the connection in ''
alias nmdo='nmcli con down' # add the nome of the connection in ''
# open with password
alias tshift='sudo -E timeshift-launcher'
alias part='sudo -E gparted'
# mtp mount (android etc)
alias mtpd='mtp-detect'
alias mtpm='jmtpfs ~/android_device'
alias mtpu='fusermount -u ~/android_device'
# mount not android
alias lsb='lsblk'
alias lsd='sudo mkdir /mount/'
alias lsm='sudo mount /dev/'
alias lsu='sudo umount /mount/'
# streamrip
alias ripp='rip search tidal album'
# paru
alias ys='paru -S' # install package
alias yr='paru -Rn' # remove package
alias yy='paru -Ss' # paru search for package
# trash-cli
alias te='trash-empty'
alias tr='trash-restore'
# pyenv
alias pyl='pyenv local' # set this for folder in spec python version
alias pyg='pyenv global' # changes the global python version
alias pyve='pyenv virtualenvs' # shows all possible vitualenvironments
alias pyd='pyenv virtualenv-delete'
alias pyn='pyenv virtualenv' # makes a new env $VSERION $NAME
alias pyv='pyenv versions'
alias pyil='pyenv install -l'
alias pyi='pyenv install'
# aria2 and yt-dlp
alias aryt="yt-dlp --external-downloader aria2c --external-downloader-args '-x 8 -j2'" # add URL in ''
alias aria='aria2c -x 8' # add URL in '' for 8 segmented download
alias yd='yt-dlp' # copy link from videodownload helper and add the URL in ''
# ffmpeg
alias ffcmp='ffmpeg -i video.mp4 -q:a 0 -map a audio.mp3' # convert on mp4 into mp3
alias ffcbmp='for file in *.mp4; do
ffmpeg -i "$file" -q:a 0 -map a "${file%.mp4}.mp3"
done' # batch rename all mp4 into mp3 add -af "volume=1.5" to increase audio volume by 1.5
alias photodetect='gphoto2 --auto-detect'
alias photoget='gphoto2 --get-all-files'
# borg backup
alias boinit='borg init --encryption repokey' # add folder like /folder/ initiates the backupfunction
alias bolist='borg list' # /backup/ creates a list of al the backups which are contained in this folder
alias boc='borg create --stats --progress --compression lz4' # /backup::backup1 dotfiles creates the backup. The ::backup1 will be name of the backup
# create placeholder sudo borg create --stats --compression lz4 ::{user}-{now} file or folder
alias bomo='borg mount /home/liph/backup /tmp/borg' # which repo to mount and where to mount it. make sure the folder already exists
alias boumo='borg umount /tmp/borg' # unmount the mount folder
# systemctl
alias sysen='sudo systemctl enable'
alias sysst='sudo systemctl start'
# disk space
alias dfh='df -h' # shows a list of all mounted drives
alias duh='du -sh' #calculates folder space
alias duf='duf' # analyzes diskspace
alias duaa='dua i' # opens dua in interactive mode
alias rns='sudo pacman -Rns $(pacman -Qdtq)' # remove orphaned packages
alias rsc='sudo pacman -Sc' # remove cached packeged
alias rmc='rm -rf ~/.cache/*' # clear user cache
# ip addr
alias ipa='sudo ip addr add '
alias ipl='sudo ip link set '
alias ipf='sudo ip addr flush '
# wireguard vpn
alias wgu='sudo wg-quick up' # start the connection you like to establish (f.E open)
alias wgd='sudo wg-quick down' # end the connection you like to end (f.E open)
alias wgc='sudo wg showconf' # show the config for a connection (f.E open)
alias wgs='sudo wg show' # show informations about the connection

27
zshrc/.export.zsh Executable file
View File

@@ -0,0 +1,27 @@
# FZF
export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'"
export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'"
export FZF_DEFAULT_OPTS="--height 50% --layout=default --border --color=hl:#2dd4bf"
export FZF_TMUX_OPTS=" -p90%,70% "
# FD
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .g-t"
export FZF_DEFAULT_OPTS='--bind tab:accept'
# temuxifier
export PATH="$HOME/.tmuxifier/bin:$PATH"
# yazi setup
export EDITOR="nvim"
# manpager
export MANPAGER='nvim +Man!'
export XDG_CURRENT_DESKTOP=Hyprland
export XDG_SESSION_TYPE=wayland
export QT_QPA_PLATFORM=wayland
export SDL_VIDEODRIVER=wayland
export CLUTTER_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1

17
zshrc/.plugins.zsh Executable file
View File

@@ -0,0 +1,17 @@
# Add in Powerline10k
#zinit ice depth=1; zinit light romkatv/powerlevel10k
# Add in plugins
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab
# Add in snippets from "OhMyZsh“
zinit snippet OMZP::git
zinit snippet OMZP::sudo
zinit snippet OMZP::archlinux
zinit snippet OMZP::aws
zinit snippet OMZP::kubectl
zinit snippet OMZP::kubectx
zinit snippet OMZP::command-not-found

94
zshrc/.zshrc Executable file
View File

@@ -0,0 +1,94 @@
# set the directory we want to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.locale/share}/zinit/zinit.git"
# Download Zinit
if [ ! -d "$ZINIT_HOME" ]; then
mkdir -p "$(dirname $ZINIT_HOME)"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
# Source zsh, alias
source "${ZINIT_HOME}/zinit.zsh"
source ~/.aliases.zsh
source ~/.plugins.zsh
source ~/.export.zsh
# Set up fzf key bindings and fuzzy completion
source <(fzf --zsh)
# Load completions
autoload -U compinit && compinit
## zinit cdreplay -q
eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/zen.toml)"
#eval "$(ssh-agent -s)"
#if ! pgrep -u "$USER" ssh-agent > /dev/null; then
# ssh-agent > ~/.ssh-agent.env
#fi
#if [[ -z "$SSH_AUTH_SOCK" ]]; then
# source ~/.ssh-agent.env > /dev/null
#fi
# Bindkey
bindkey -e
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
# History
HISTSIZE=5000
HISTFILE=~/.zsh_history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
# Completion styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
# Shell integration
eval "$(fzf --zsh)"
eval "$(zoxide init --cmd cd zsh)"
_fzf_comprun() {
local command=$1
shift
case "$command" in
cd) fzf --preview 'eza --tree --color=always {} | head -200' "$@" ;;
export|unset) fzf --preview "eval 'echo \$' {}" "$@" ;;
ssh) fzf --preview 'dig {}' "$@" ;;
*) fzf --preview "--preview 'bat -n --color=always --line-range :10 {}'" "$@" ;;
esac
}
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust
### End of Zinit's installer chunk
# . "$HOME/.local/bin/env"