From 918103f48ba2eba7f1ed496fbdbbdd2275f421fd Mon Sep 17 00:00:00 2001 From: Dominik Agres Date: Thu, 6 Nov 2025 01:49:30 +0100 Subject: [PATCH] Separated zshrc in multiple fiels, allowing loading according source based on hostname --- zsh/.zshrc | 47 +++++++++++++---------------------------------- zsh/.zshrc_fedora | 7 +++++++ 2 files changed, 20 insertions(+), 34 deletions(-) create mode 100644 zsh/.zshrc_fedora diff --git a/zsh/.zshrc b/zsh/.zshrc index 1e4e8ca..57661f2 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -3,18 +3,20 @@ export ZSH="$HOME/.oh-my-zsh" ZSH_THEME="eastwood" HIST_STAMPS="dd.mm.yyyy" plugins=(git sudo) + +# Load sources source $ZSH/oh-my-zsh.sh -# -- Linux Specific -- +case "$HOST" in + arch) source ~/.zshrc_arch ;; + fedora-mac) source ~/.zshrc_fedora ;; +esac +# Start on boot if [[ -z $DISPLAY ]] && [[ $(tty) == /dev/tty1 ]]; then - startx + exec sway fi - - -# -- Local Setup --- - # Preferred editor for local and remote sessions if [[ -n $SSH_CONNECTION ]]; then export EDITOR='nvim' @@ -23,29 +25,6 @@ if [[ -n $SSH_CONNECTION ]]; then fi -# -- Env Paths --- - -# go -#export PATH=/usr/local/go/bin:$PATH - -# pyenv -#export PYENV_ROOT="$HOME/.pyenv" -#export PATH="$PYENV_ROOT/bin:$PATH" -#eval "$(pyenv init --path)" -#eval "$(pyenv init -)" - -# pipx -#export PATH="$PATH:/Users/agres/.local/bin" -#export PATH="$HOME/.local/bin:$PATH" -# pipx Linux -export PATH="$HOME/.local/bin:$PATH" - - -# bun -#[ -s "/Users/agres/.bun/_bun" ] && source "/Users/agres/.bun/_bun" -#export BUN_INSTALL="$HOME/.bun" -#export PATH="$BUN_INSTALL/bin:$PATH" - # -- Customization -- # Alais: ls to run tree (without any flags) @@ -61,13 +40,10 @@ ls() { # Alias: list all modified and new files in current directory alias lsgit='git status --porcelain | cut -c 4- | xargs ls -l' -# Alias: wifi to print qr code in terminal from file (device adjustable) -alias wifi='cat /Users/agres/Projects/python_lang/wifi_qr/wifi_password.txt | qr --asci' - -# Alias: connect and disconnect bluetooth headphones +# Bluetooth headphones alias airpods-connect='echo -e "connect 80:95:3A:DC:8E:41" | bluetoothctl >> /dev/null' alias airpods-disconnect='echo -e "disconnect 80:95:3A:DC:8E:41" | bluetoothctl >> /dev/null' -alias airpods='echo -e "select 12:34:56:78:9A:BC\ninfo 80:95:3A:DC:8E:41" | bluetoothctl | grep "Connected: "' +alias airpods='echo -e "info 80:95:3A:DC:8E:41" | bluetoothctl | grep "Connected: "' # Alias: avoid nano alias nano=nvim @@ -75,3 +51,6 @@ alias nano=nvim # Alias quick mount network smdb drive alias md0='sudo mount --mkdir -t cifs //192.168.0.200/MD0 /mnt/md0 -o username=agres' +# Load ssh keys in terminal +alias loadssh='eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519' + diff --git a/zsh/.zshrc_fedora b/zsh/.zshrc_fedora new file mode 100644 index 0000000..8f68027 --- /dev/null +++ b/zsh/.zshrc_fedora @@ -0,0 +1,7 @@ +# -- Env Paths --- + +export GOPATH=$HOME/.local/go/ +export GOBIN=$HOME/.local/go/bin +export PATH=$PATH:$GOBIN +export PATH="$HOME/.local/bin:$PATH" +