From 36a538aff84b36c25f9290548f64683bb25d96dc Mon Sep 17 00:00:00 2001 From: katherine Date: Tue, 26 Jan 2016 00:38:26 -0700 Subject: dynamically updating titles --- .vimrc | 2 ++ .zshrc | 13 +++++++++++++ .zshrc-freebsd | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.vimrc b/.vimrc index f2bd25a..9f95841 100644 --- a/.vimrc +++ b/.vimrc @@ -77,6 +77,8 @@ set noshowmode "allow edited background buffers set hidden +set title + "spelling set spelllang=en_gb diff --git a/.zshrc b/.zshrc index b8a01a7..af86879 100644 --- a/.zshrc +++ b/.zshrc @@ -31,6 +31,19 @@ if [[ -d ~/.cabal-sandbox/bin ]]; then PATH=$PATH:~/.cabal-sandbox/bin fi +# dynamic title +if [[ "$TERM" == "rxvt-256color" ]]; then + + precmd() { + print -Pn "\e]0;zsh: %(1j,%j job%(2j|s|); ,)%~\a" + } + + preexec() { + printf "\033]0;%s\a" "$1" + } + +fi + #################### PROMPT ################### PROMPT="%{%B$fg[white]%}┌[" # if non-zero, previous return val diff --git a/.zshrc-freebsd b/.zshrc-freebsd index e1ccb23..0525972 100644 --- a/.zshrc-freebsd +++ b/.zshrc-freebsd @@ -1,6 +1,6 @@ ################### ALIASES ################## alias ls='ls -G' -alias ll='ls -lG' +alias ll='ls -lGh' alias grep='grep --color=auto' alias diff='colordiff' alias less='less -R' -- cgit v1.2.3