Add default zsh configuration

This commit is contained in:
Xarus
2025-03-04 12:01:13 +01:00
parent 6be3781408
commit ca4085a943
3 changed files with 61 additions and 0 deletions

33
.profile.local Normal file
View File

@@ -0,0 +1,33 @@
# set hostname
export HOST_SHORT="${HOSTNAME/[0-9]*/}"
# setup aliases
alias t="tmux attach || tmux"
alias ta="tmux attach"
alias lr="ls -alhtr"
alias cp="cp --sparse=always"
alias clone="rsync -a --deletei -S -i -v -h"
alias gc="git commit -m"
alias gs="git status"
alias gd="git diff"
alias gds="git diff --staged"
alias gls="git lg"
alias glss="git lgs"
alias gst="git stash"
# tmux gdb config
gdb-tmux() {
local id="$(tmux split-pane -hPF "#D" "tail -f /dev/null")"
tmux last-pane
local tty="$(tmux display-message -p -t "$id" '#{pane_tty}')"
gdb -ex "dashboard -output $tty" "$@"
tmux kill-pane -t "$id"
}
# sudo alias
alias "49.3"="sudo"

1
.tmux.conf Symbolic link
View File

@@ -0,0 +1 @@
.config.local/ohmytmux/.tmux.conf

27
.zshrc Normal file
View File

@@ -0,0 +1,27 @@
# Powerlevel10k instant prompt configuration
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
# Ohmyzsh configuration
ZSH_THEME="robbyrussell"
plugins=(git)
source "${HOME}/.config.local/ohmyzsh/oh-my-zsh.sh"
# Powerlevel10k configuration
source "${HOME}/.config.local/powerlevel10k/powerlevel10k.zsh-theme"
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# fzf configuration
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# ZSH Shell specific config
HISTSIZE=1000000
SAVEHIST=1000000
setopt share_history
unsetopt autocd
# User config
source "${HOME}/.profile.local"
export EDITOR='vim'