home/.zshrc

47 lines
1.1 KiB
Bash
Raw Normal View History

2025-07-23 01:30:23 +02:00
# Source some global/public stuff.
2025-07-23 00:14:57 +02:00
source ~/.env
2015-06-24 22:17:56 +02:00
2025-07-23 01:30:23 +02:00
# Load Oh-my-Zsh.
2025-07-23 00:14:57 +02:00
source ~/.zsh/oh-my-zsh.sh
2015-08-14 05:10:44 +02:00
# I use xterm and this sets a nice title with hostname and cwd in it.
case $TERM in
2025-07-23 01:25:04 +02:00
linux*)
export TERM=linux
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
;;
2015-06-27 23:22:54 +02:00
xterm*)
2015-06-27 23:08:27 +02:00
export TERM=xterm-256color
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
;;
2025-07-23 01:25:04 +02:00
screen*)
2015-06-27 23:08:27 +02:00
export TERM=screen-256color
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
;;
esac
2016-06-16 02:11:20 +02:00
2025-07-22 23:13:38 +02:00
# Source some functions
for function in ~/.zsh/functions.d/*.sh; do
source $function
done
2025-09-10 00:37:51 +02:00
home up
2025-07-23 01:30:23 +02:00
# Update tmux window title to the current running command.
2025-07-23 01:25:04 +02:00
if [ -n "$TMUX" ]; then
function preexec() {
local cmd=${1[(wr)^(*=*|sudo|su|command)]}
print -Pn "\e]2;${cmd%% *}\a"
}
function precmd() {
print -Pn "\e]2;zsh\a"
}
fi
2025-09-10 02:40:51 +02:00
# Source some private stuff or custom things that are different on my
# systems. This file is not in the Git repository! Everything in this
# file overrides configuration settings already loaded. Stuff configured
# in this file must not be required in any of the above configuration
# and scripts.
2025-07-23 03:57:13 +02:00
source ~/.penv