diff --git a/sync.sh b/sync.sh index a25f29e..411b187 100755 --- a/sync.sh +++ b/sync.sh @@ -1,4 +1,4 @@ -while getopts ":hbsdtclw" VALUE "$@"; do +while getopts ":hbsdtclwu" VALUE "$@"; do if [ "$VALUE" = "h" ] ; then echo "sync.sh syncs configuration files, applications, and Vim bundles between computers" echo " -h Shows this help" @@ -81,7 +81,13 @@ while getopts ":hbsdtclw" VALUE "$@"; do sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf sudo vi `which wemux` +"execute \"normal gg/tmux\nnnea -2\nea -2\ggZZ\"" -sudo vi /usr/local/etc/wemux.conf +":execute \"normal gg/host_list\nnww\"" + sudo vi /usr/local/etc/wemux.conf +":execute \"normal gg/host_list\nnww\"" + fi + if [ "$VALUE" = "u" ] ; then + sudo cp unison/unisonNetworkOnPortForward.sh /etc/network/if-up.d/ + sudo vim /etc/rc.local +"execute \"normal /exit 0\Osudo -u stonewareslord ${PWD}/unison/unisonMonitor.sh &\ggZZ\"" + vim unison/unisonSync.sh +"execute \"gg/sync\$hci\"${PWD}\ggZZ\"" + echo "30 12 * * * ${PWD}/unison/unisonSync.sh" >> /etc/cron.d/unison fi done echo "Done syncing" diff --git a/unison/unisonKill.sh b/unison/unisonKill.sh new file mode 100644 index 0000000..faa488b --- /dev/null +++ b/unison/unisonKill.sh @@ -0,0 +1,2 @@ +#! /bin/bash +ps aux | grep unison | awk '{print $2}' | xargs kill -9 diff --git a/unison/unisonMonitor.sh b/unison/unisonMonitor.sh new file mode 100644 index 0000000..9cd5d76 --- /dev/null +++ b/unison/unisonMonitor.sh @@ -0,0 +1,2 @@ +#! /bin/bash +unison default ~/Documents ssh://stonewareslord@localhost:9922//home/vinh/Backup/Documents -repeat watch -times -logfile /tmp/unison.log diff --git a/unison/unisonNetworkOnPortForward.sh b/unison/unisonNetworkOnPortForward.sh new file mode 100644 index 0000000..7b462ff --- /dev/null +++ b/unison/unisonNetworkOnPortForward.sh @@ -0,0 +1,2 @@ +#! /bin/bash +sudo -u stonewareslord ssh stonewareslord@austenwares.com -Y -C -f -N -L 9922:austenwares.com:22 diff --git a/unison/unisonSync.sh b/unison/unisonSync.sh new file mode 100644 index 0000000..3a75308 --- /dev/null +++ b/unison/unisonSync.sh @@ -0,0 +1,3 @@ +#! /bin/bash +sync="~/applications/sync/" +unison -batch -times $SYNC ssh://stonewareslord@localhost:9922//home/stonewareslord/unison/sync -logfile /tmp/unison.log diff --git a/vimrc b/vimrc index 2818302..7902a44 100644 --- a/vimrc +++ b/vimrc @@ -18,7 +18,7 @@ nnoremap q nnoremap :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out nnoremap G G$ vnoremap G G$ -nnoremap :GundoToggle +nnoremap :GundoToggle nnoremap :TagbarToggle nnoremap + nnoremap - @@ -56,7 +56,7 @@ vnoremap # :call VisualSelection('b') nnoremap :nohlsearchgzo nnoremap U nnoremap K ik$ -nnoremap :wg +nnoremap :upg "nnoremap s c vnoremap gj j vnoremap gk k @@ -108,6 +108,7 @@ nnoremap W nnoremap :bp nnoremap :bn nnoremap z _| +nnoremap bn G?Bundleyyp$hdi'"+gP0Wl3d/\/x:nohlsearch:up:BundleInstall nmap [e nmap ]e vmap [egv @@ -182,6 +183,13 @@ let g:php_refactor_command='php /usr/local/bin/refactor.phar' let loaded_matchit = 1 filetype off call vundle#rc() +"Bundle 'Floobits/floobits-vim' +"Bundle 'tsaleh/vim-matchit' +"Bundle 'Shougo/neosnippet' +"Bundle 'honza/vim-snippets' +"Bundle 'msanders/snipmate.vim' +"Bundle 'vim-scripts/YankRing.vim' +"Bundle 'majutsushi/tagbar' Bundle 'gmarik/vundle' Bundle 'Chiel92/vim-autoformat' Bundle 'tpope/vim-surround' @@ -212,13 +220,7 @@ Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-unimpaired' Bundle 'kien/ctrlp.vim' Bundle 'godlygeek/tabular' -"Bundle 'Floobits/floobits-vim' -"Bundle 'tsaleh/vim-matchit' -"Bundle 'Shougo/neosnippet' -"Bundle 'honza/vim-snippets' -"Bundle 'msanders/snipmate.vim' -"Bundle 'vim-scripts/YankRing.vim' -"Bundle 'majutsushi/tagbar' +Bundle 'tpope/vim-abolish' filetype plugin indent on if exists("+undofile") if isdirectory($HOME . '/.vim/undo') == 0