Separated zshrc in multiple fiels, allowing loading according source based on hostname

This commit is contained in:
2025-11-06 01:49:30 +01:00
parent f5f32f5f45
commit 918103f48b
2 changed files with 20 additions and 34 deletions
+13 -34
View File
@@ -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'
+7
View File
@@ -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"