dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 47953d24503b60b1c117b241163e490dba8f1851
parent 3724a313dd41a7aab5dfe4e8e2d9abd45b645e63
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri, 20 Apr 2018 08:11:58 -0400

Smarter terminal window titles

Diffstat:
M.bashrc | 1+
M.vim/vimrc | 1+
M.zshrc | 3+++
3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -20,6 +20,7 @@ else fi export PS1=$usercolor'\u\[\033[m\]@\[\033[32m\]\h:\[\033[m\]\W\[\033[31m\]$(__git_ps1 " (%s)")\[\033[m\]\$ ' +export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"' [ -r "$BASH_COMPLETION" ] && source "$BASH_COMPLETION" unset BASH_COMPLETION diff --git a/.vim/vimrc b/.vim/vimrc @@ -301,6 +301,7 @@ augroup myvimrc autocmd VimEnter * let w:active_window = 1 | call MyItalicize() | call MyDiffOpt() autocmd WinEnter * let w:active_window = 1 autocmd WinLeave * unlet! w:active_window + autocmd BufEnter * let &titlestring=hostname() . ':%t%h' if has('win32') || has('win64') autocmd GuiEnter * simalt ~x elseif has('gui_macvim') diff --git a/.zshrc b/.zshrc @@ -34,6 +34,9 @@ RPS1="[%?]" PS1="%{$usercolor%}%n%{$reset%}@%{$fg[green]%}%m:%{$reset%}%c%{$fg[red]%}\$(__git_ps1 \" (%s)\")%{$reset%}%(!.#.\$) " unset usercolor reset +precmd() { echo -ne "\033]0;${USER}@${HOST}:${PWD}\007" } +preexec() { echo -ne "\033]0;${USER}@${HOST}:${@}\007" } + [ -d /usr/share/zsh/site-functions/ ] && fpath=(/usr/share/zsh/site-functions/ $fpath) [ -d "$HOME/.zsh/functions" ] && fpath=("$HOME/.zsh/functions" $fpath)