mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
modularized zshrc
This commit is contained in:
parent
cf509c03fc
commit
d1bec20d74
9 changed files with 147 additions and 125 deletions
30
zsh/term_title
Normal file
30
zsh/term_title
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Set terminal title
|
||||
set_term_title() {
|
||||
[[ -o interactive ]] || return
|
||||
# Bubble information up to the terminal
|
||||
case $TERM_PROGRAM in
|
||||
Apple_Terminal)
|
||||
local SEARCH=' '
|
||||
local REPLACE='%20'
|
||||
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
|
||||
printf '\e]7;%s\a' "$PWD_URL"
|
||||
;;
|
||||
*)
|
||||
# NOOP
|
||||
;;
|
||||
esac
|
||||
case $TERM in
|
||||
screen*)
|
||||
#print -Pn "\ek%n@%m: %~\e\\" #breaks tmux
|
||||
print -Pn "\e]2;%n@%m: %~\a"
|
||||
;;
|
||||
xterm*|*rxvt*)
|
||||
print -Pn "\e]2;%n@%m: %~\a"
|
||||
;;
|
||||
*)
|
||||
# NOOP
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# vim: ft=zsh
|
||||
Loading…
Add table
Add a link
Reference in a new issue