dot

packages and services management
Log | Files | Refs | README

commit 729e4a872cdd88efc2d7129064de63b371ab1ef7
parent ba968f5019d95d0a5fe257032ffcc2662f9d352b
Author: josuah <mail@josuah.net>
Date:   Thu, 22 Sep 2016 23:36:24 -0400

Switching slowly to tmux...

Diffstat:
MREADME | 6+++---
Mshell/.profile | 10++++++----
Mtmux/.tmux.conf | 25+++++++++++++++----------
Mvim/.vimrc | 24+++---------------------
4 files changed, 27 insertions(+), 38 deletions(-)

diff --git a/README b/README @@ -2,9 +2,10 @@ http://josuah.net mail@josuah.net __ /\ \/ ____ ____ __ /\ _____ / /_ /\ / __ \ / __// / / /.'__ // __ \ - //////_///_\\\ ///_//////_////// //// - _,-' / \____/\___/ \____/ \____/ \/ \/ 's dotfiles + / // /_/ /_\ \ / /_/ // /_/ // / / / + _,-' / \____/\___/ \____/ \____/ \/ \/ 's dotfiles =\_,-'========================================================================== +Portable tools and their config, built in ~/ by a script. INSTALL @@ -48,7 +49,6 @@ VIM undotree http://github.com/mbbill/undotree surround http://github.com/tpope/vim-surround lion http://github.com/tommcdo/vim-lion - multiple http://github.com/terryma/vim-multiple-cursors fzy http://github.com/Dkendal/fzy-vim gitgutter http://github.com/airblade/vim-gitgutter racket http://github.com/wlangstroth/vim-racket diff --git a/shell/.profile b/shell/.profile @@ -56,9 +56,11 @@ ps1() then local color branch="$(git branch | sed -n 's/^\* // p')" [ "$(git status --porcelain)" ] && color=31 || color=32 - printf ' \033[%sm%s\033[0m \r' "$color" "$branch" + printf ' \033[%sm%s\033[0m ' "$color" "$branch" fi + printf '\r' + # Error code [ "$code" -eq 0 ] || printf '\033[38C\033[31;1m %s \033[0m\r' "$code" @@ -68,9 +70,9 @@ ps1() then printf '\033[45C\033[36;1m %s \033[0m\r' "$mail_count" fi - # Abduco sessions - local abduco=" $(($(abduco 2>/dev/null | wc -l) - 1)) " - printf '\033[51C\033[33;1m%s\033[0m\r' "${abduco# 0 }" + # Tmux sessions + local tmux="$(tmux list-sessions 2>/dev/null | wc -l)" + [ $tmux != 0 ] && printf '\033[50C\033[33;1m %s \033[0m\r' "$tmux" # Non printable: terminal status, bell, empty line at the bottom. printf '\a\033]0;shell\007\033[s\n\n\033[2A' diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -24,11 +24,18 @@ bind -t vi-copy v begin-selection bind -t vi-copy C-v rectangle-toggle bind -t vi-copy y copy-pipe "xclip -i" -# Vim/Tmux Navigation +# Pane Management bind k select-pane -U bind j select-pane -D bind h select-pane -L bind l select-pane -R +bind C-k resize-pane -U 3 +bind C-j resize-pane -D 3 +bind C-h resize-pane -L 8 +bind C-l resize-pane -R 8 + +# Managing sessions +bind -n C-z detach # Reload config bind r source-file ~/.tmux.conf\; display-message "Config reloaded" @@ -60,21 +67,19 @@ set -g status-bg black set -g window-status-separator " " set -g window-status-format " #I #W " -set -g window-status-style bold,fg=black +set -g window-status-style bold +set -g window-status-fg black set -g window-status-current-format " #I #W " -set -g window-status-current-style bold,fg=white +set -g window-status-current-style bold +set -g window-status-current-fg white -set -g window-status-bell-style default -set -g window-status-bell-fg black +set -g window-status-bell-fg white set -g window-status-bell-bg red # BORDERS 2016-09-21 #------------------------------------------------------------------------------- -set -g pane-border-bg default -set -g pane-border-fg white - -set -g pane-active-border-bg default -set -g pane-active-border-fg white +set -g pane-border-style fg=white +set -g pane-active-border-style fg=red diff --git a/vim/.vimrc b/vim/.vimrc @@ -23,19 +23,6 @@ set virtualedit=block formatprg=fmt " Editing set wildmenu wildmode=longest:full,full " Completion -" FUNCTIONS -"------------------------------------------------------------------------------- - -function! TmuxMove(dir) - let wnr = winnr() - silent! execute 'wincmd ' . a:dir - " If the winnr is still the same after we moved, it is the last pane - if wnr == winnr() - call system('tmux select-pane -' . tr(a:dir, 'phjkl', 'lLDUR')) - end -endfunction - - " MAPPINGS 2016-09-20 "------------------------------------------------------------------------------- @@ -50,7 +37,7 @@ nmap <leader><leader> : \ <cr>: nmap <leader>w :w<cr> nmap <leader>s :set <c-d> -nmap <leader>h :help +nmap <leader>h :help nmap <leader>b :pwd \| echo '' \| ls \| echo ''<cr>:b nmap <leader>T :pwd \| echo '' \| tabs \| echo ''<cr>:tab nmap <leader>c :pwd \| echo '' \| clist \| echo ''<cr> @@ -82,12 +69,6 @@ nmap [C :cfirst<cr> | nmap ]C :clast<cr> nmap [<leader> mzO<Esc>k`z<C-e> nmap ]<leader> mzo<Esc>k`z -" Navigation -nmap <c-h> :call TmuxMove('h')<cr> -nmap <c-j> :call TmuxMove('j')<cr> -nmap <c-k> :call TmuxMove('k')<cr> -nmap <c-l> :call TmuxMove('l')<cr> - " Parentheses vmap <leader>p myomzr\|`zlhr\`ylhr/ @@ -106,7 +87,8 @@ highlight NonText cterm=bold ctermfg=1 highlight SpecialKey cterm=bold ctermfg=1 highlight CursorLine cterm=bold highlight CursorColumn cterm=bold ctermbg=none -highlight CursorLineNR cterm=none ctermfg=0 ctermbg=3 +highlight CursorLineNr cterm=bold ctermfg=7 +highlight LineNr cterm=bold ctermfg=0 highlight StatusLine cterm=bold ctermfg=3 highlight StatusLineNC cterm=bold ctermfg=7 highlight VertSplit cterm=none ctermfg=7 ctermbg=0