dotfiles

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

commit 22d3a2a1e547909a2fbf838447aac58a443b704e
parent 47953d24503b60b1c117b241163e490dba8f1851
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri, 20 Apr 2018 09:12:16 -0400

Minor term title fixes

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

diff --git a/.vim/vimrc b/.vim/vimrc @@ -301,7 +301,6 @@ 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') @@ -393,4 +392,5 @@ else endif set autowrite set pastetoggle=<F2> +let &titlestring=hostname() . ':%t%h' " }}} diff --git a/.zshrc b/.zshrc @@ -34,8 +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" } +_set_title() { echo -ne "\033]0;$USER@$HOST:$1\007" } +precmd() { _set_title "$PWD" } +preexec() { _set_title "$1" } [ -d /usr/share/zsh/site-functions/ ] && fpath=(/usr/share/zsh/site-functions/ $fpath) [ -d "$HOME/.zsh/functions" ] && fpath=("$HOME/.zsh/functions" $fpath)