Added a script to refresh the active tab when saving a file

It's got a ways to go, but a good start
This commit is contained in:
Josh Sherman 2013-12-06 15:18:12 -05:00
parent af50614159
commit d4678f8172
3 changed files with 13 additions and 1 deletions

8
bash/refresh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
osascript -e 'tell application "Safari"' \
-e 'activate' \
-e 'do javascript "window.location.reload();" in first document' \
-e 'end tell' > /dev/null;
osascript -e 'tell application "iTerm" to activate'

View file

@ -78,6 +78,7 @@ noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
"map <Leader>e :e! ~/.vim_runtime/vimrc<CR>
"autocmd! bufwritepost vimrc source ~/.vim_runtime/vimrc
autocmd BufWritePost * silent !~/Source/dotfiles/bash/refresh
set wildmode=list:longest
set wildmenu

View file

@ -63,7 +63,7 @@ alias gs="git status"
alias grep="grep --exclude-dir=.git"
# jekyll
alias jekyll="jekyll --auto --server"
alias jekyll="jekyll --watch serve"
# local tunnel
alias lt="localtunnel -k ~/.ssh/id_rsa.pub 80"
@ -159,3 +159,6 @@ then
else
_update_brew_update
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"