home/.zshrc

57 lines
1.3 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
# Source some private stuff or custom things that are different on my systems.
2025-07-23 01:53:01 +02:00
# This file is not in the Git repository!
2025-07-23 00:14:57 +02:00
source ~/.penv
# Do some exports!
source ~/.zsh/exports.sh
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-23 00:14:57 +02:00
# Obsolete?
#if [ -f /usr/bin/shellpic ]; then
# if [ -f ~/images/tux.png ]; then
# /usr/bin/shellpic --shell24 --scale-x 50 ~/images/tux.png
# fi
#fi
2016-06-16 02:11:20 +02:00
2025-07-23 00:14:57 +02:00
# Obsolete?
2020-05-01 20:31:48 +02:00
#source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
2020-04-28 19:46:37 +02:00
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
2020-05-01 20:31:48 +02:00
#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
2025-07-22 23:13:38 +02:00
# Source some functions
for function in ~/.zsh/functions.d/*.sh; do
source $function
done
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