dot

packages and services management
Log | Files | Refs | README

commit ba968f5019d95d0a5fe257032ffcc2662f9d352b
parent 65c53bc5bfb48044b7cbef4a7dad01784310a8a8
Author: josuah <mail@josuah.net>
Date:   Thu, 22 Sep 2016 17:33:59 -0400

Added visual changes

Diffstat:
Mshell/.profile | 24++++++++++++++----------
Mtmux/.tmux.conf | 13+++++--------
Mvim/.vimrc | 14++++++++------
3 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/shell/.profile b/shell/.profile @@ -49,13 +49,20 @@ ps1() # PWD with $HOME replaced by ~ [ "${pwd##$HOME**}" ] && local pwd="$PWD" || local pwd="~${PWD#$HOME}" - printf '\033[1m%s\033[0m \r' "$pwd" + printf '\033[1m%s\033[0m \033[3C' "$pwd" + + # Git branch and status + if git rev-parse &> /dev/null + 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" + fi # Error code [ "$code" -eq 0 ] || printf '\033[38C\033[31;1m %s \033[0m\r' "$code" # Mails - local mail_count="$(find "$MAIL/new" -mindepth 1 2>/dev/null | wc -l)" if [ "$mail_count" -gt 0 ] then printf '\033[45C\033[36;1m %s \033[0m\r' "$mail_count" @@ -83,19 +90,16 @@ alias l='ls -F -w 80 --color' alias ll='l -lh' alias la='l -A' alias lla='l -Alh' -alias weather='curl -4 wttr.in' -alias lines='find . -name "*.[ch]" | xargs wc -l' -alias myip='curl icanhazip.com' -alias a='buffers attach' -alias r='buffers run' -alias v='buffers run $VISUAL' +alias v='$VISUAL' alias p='$PAGER' +alias t='tmux attach || tmux' alias f='find . -type f ! -path "*/.git/*" | fzy' alias d='find . -type d ! -path "*/.git/*" | fzy' alias c='cd "$(d)"' alias g='grep --color=always' -alias xo='DISPLAY=:0 xclip -o | xargs' -alias xi='DISPLAY=:0 xclip -i' +alias weather='curl -4 wttr.in' +alias lines='find . -name "*.[ch]" | xargs wc -l' +alias myip='curl icanhazip.com' # FUNCTIONS diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -15,6 +15,7 @@ set -g renumber-windows on set -g prefix C-Space unbind C-b +bind C-Space send-key C-Space set-option -g status-keys vi @@ -24,14 +25,10 @@ bind -t vi-copy C-v rectangle-toggle bind -t vi-copy y copy-pipe "xclip -i" # Vim/Tmux Navigation -bind -n C-k if "[ $(tmux display -p '#{pane_current_command}') = vim ]" \ - "send-keys C-k" "select-pane -U" -bind -n C-j if "[ $(tmux display -p '#{pane_current_command}') = vim ]" \ - "send-keys C-j" "select-pane -D" -bind -n C-h if "[ $(tmux display -p '#{pane_current_command}') = vim ]" \ - "send-keys C-h" "select-pane -L" -bind -n C-l if "[ $(tmux display -p '#{pane_current_command}') = vim ]" \ - "send-keys C-l" "select-pane -R" +bind k select-pane -U +bind j select-pane -D +bind h select-pane -L +bind l select-pane -R # Reload config bind r source-file ~/.tmux.conf\; display-message "Config reloaded" diff --git a/vim/.vimrc b/vim/.vimrc @@ -102,12 +102,14 @@ iabbrev =_ <Esc>a=<Esc>:set ve=all<CR>v080lhr=:set ve=block<CR>A " HIGHLIGHTS 2016-09-10 "------------------------------------------------------------------------------- -highlight NonText cterm=bold ctermfg=0 -highlight SpecialKey cterm=bold ctermfg=0 -highlight Cursorline cterm=bold -highlight StatusLine cterm=bold ctermfg=3 -highlight StatusLineNC cterm=bold ctermfg=7 -highlight VertSplit cterm=none ctermfg=7 ctermbg=0 +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 StatusLine cterm=bold ctermfg=3 +highlight StatusLineNC cterm=bold ctermfg=7 +highlight VertSplit cterm=none ctermfg=7 ctermbg=0 " AUTOCOMMANDS 2016-09-10