From 8a37bf71789fb5a48f19c72457571090ae40235f Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Tue, 16 Dec 2014 18:21:41 +0100 Subject: [PATCH] iterm conf + clipper --- install/_install.sh | 16 +++-- install/brew.sh | 4 +- {install => iterm}/Solarized Dark.itermcolors | 0 .../com.googlecode.iterm2.plist | 29 ++++++-- .../screen-256color-italic.terminfo | 0 .../xterm-256color-italic.terminfo | 0 tmux.conf | 68 +++++++++---------- vimrc | 3 + aliases => zsh/aliases | 2 + exports => zsh/exports | 0 functions => zsh/functions | 0 zshrc | 2 +- 12 files changed, 72 insertions(+), 52 deletions(-) rename {install => iterm}/Solarized Dark.itermcolors (100%) rename {install => iterm}/com.googlecode.iterm2.plist (97%) rename {install => terminfo}/screen-256color-italic.terminfo (100%) rename {install => terminfo}/xterm-256color-italic.terminfo (100%) rename aliases => zsh/aliases (97%) rename exports => zsh/exports (100%) rename functions => zsh/functions (100%) diff --git a/install/_install.sh b/install/_install.sh index 1d8bbf3c..7b6cb2ef 100755 --- a/install/_install.sh +++ b/install/_install.sh @@ -17,16 +17,16 @@ export PATH=/usr/local/bin:/usr/local/sbin:$PATH # install some neccessary brew packages brew install brew-cask +brew install clipper brew install coreutils brew install git brew install macvim --with-cscope --with-lua --HEAD -brew install reattach-to-user-namespace +brew install rbenv +brew install ruby-build brew install tmux brew install the_silver_searcher brew install wget brew install zsh -brew install docker -brew install boot2docker brew cask install dropbox brew cask install forklift @@ -38,6 +38,9 @@ chsh -s /usr/local/bin/zsh /usr/bin/env zsh sudo mv /etc/zshenv /etc/zprofile +# clipper +ln -sfv /usr/local/opt/clipper/*.plist ~/Library/LaunchAgents + # install all submodules git submodule init git submodule update @@ -48,18 +51,17 @@ ln -s ~/dotfiles/editorconfig ~/.editorconfig ln -s ~/dotfiles/gitconfig ~/.gitconfig ln -s ~/dotfiles/gitignore ~/.gitignore ln -s ~/dotfiles/eslintrc ~/.eslintrc -ln -s ~/dotfiles/jscsrc ~/.jscsrc ln -s ~/dotfiles/slate.js ~/.slate.js ln -s ~/dotfiles/tmux.conf ~/.tmux.conf ln -s ~/dotfiles/vim ~/.vim ln -s ~/dotfiles/vimrc ~/.vimrc ln -s ~/dotfiles/zsh ~/.zsh ln -s ~/dotfiles/zshrc ~/.zshrc -ln -s ~/dotfiles/zsh/pure/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup # set xterm/screen terminals to enable italic fonts in terminal -tic ~/dotfiles/install/screen-256color-italic.terminfo -tic ~/dotfiles/install/xterm-256color-italic.terminfo +ln -s ~/dotfiles/zsh/pure/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup +tic ~/dotfiles/terminfo/screen-256color-italic.terminfo +tic ~/dotfiles/terminfo/xterm-256color-italic.terminfo # set iterm terminal to xterm-256color-italic and enable italics! # now restart your terminal/iterm2 and hope for the best diff --git a/install/brew.sh b/install/brew.sh index d3653dab..0d71212a 100755 --- a/install/brew.sh +++ b/install/brew.sh @@ -5,6 +5,8 @@ brew tap homebrew/php # install additional brew packages -- see _install.sh too brew install curl +brew install docker +brew install boot2docker brew install fasd brew install ffmpeg brew install ghostscript @@ -19,8 +21,6 @@ brew install php55-mcrypt brew install php55-xdebug brew install php55-intl brew install composer -brew install rbenv -brew install ruby-build brew install ssh-copy-id brew install unrar brew install youtube-dl diff --git a/install/Solarized Dark.itermcolors b/iterm/Solarized Dark.itermcolors similarity index 100% rename from install/Solarized Dark.itermcolors rename to iterm/Solarized Dark.itermcolors diff --git a/install/com.googlecode.iterm2.plist b/iterm/com.googlecode.iterm2.plist similarity index 97% rename from install/com.googlecode.iterm2.plist rename to iterm/com.googlecode.iterm2.plist index 0a9a03e7..846b1608 100644 --- a/install/com.googlecode.iterm2.plist +++ b/iterm/com.googlecode.iterm2.plist @@ -420,12 +420,29 @@ NSScrollAnimationEnabled + NSTableView Columns KeyBingingTable + + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU1N0cmluZwGEhAhOU09iamVjdACF + hAErATCG + + 198 + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU1N0cmluZwGEhAhOU09iamVjdACF + hAErATGG + + 302 + + NSTableView Hidden Columns KeyBingingTable + + NSTableView Sort Ordering KeyBingingTable + NSWindow Frame NSColorPanel 427 356 214 309 0 0 1920 1058 NSWindow Frame Preferences - 2468 328 924 485 1920 0 1920 1058 + 548 409 924 485 0 0 1920 1200 NSWindow Frame iTerm Window 0 - 2034 103 1130 656 1920 0 1920 1080 + 0 12 1914 1166 0 0 1920 1200 New Bookmarks @@ -1164,6 +1181,8 @@ OpenTmuxWindowsIn 0 + PMPrintingExpandedStateForPrint2 + PassOnControlClick PasteFromClipboard @@ -1202,7 +1221,7 @@ PrefsCustomFolder - /Users/webgefrickel/dotfiles/install + /Users/webgefrickel/dotfiles/iterm PromptOnQuit QuitWhenAllWindowsClosed @@ -1220,7 +1239,7 @@ SUHasLaunchedBefore SULastCheckTime - 2014-10-28T10:51:36Z + 2014-12-16T11:33:10Z SavePasteHistory Show Toolbelt @@ -1276,6 +1295,6 @@ findRegex_iTerm iTerm Version - 2.0.0.20141022 + 2.0.0.20141103 diff --git a/install/screen-256color-italic.terminfo b/terminfo/screen-256color-italic.terminfo similarity index 100% rename from install/screen-256color-italic.terminfo rename to terminfo/screen-256color-italic.terminfo diff --git a/install/xterm-256color-italic.terminfo b/terminfo/xterm-256color-italic.terminfo similarity index 100% rename from install/xterm-256color-italic.terminfo rename to terminfo/xterm-256color-italic.terminfo diff --git a/tmux.conf b/tmux.conf index 8e5dbadf..f4e5a53a 100644 --- a/tmux.conf +++ b/tmux.conf @@ -2,18 +2,15 @@ set -g default-terminal "screen-256color-italic" # zsh -set-option -g default-shell $SHELL +set -g default-shell $SHELL # bind default prefix to ctrl-a set -g prefix C-a unbind-key C-b bind-key a send-prefix -# reparing copy & paste by default -set-option -g default-command "reattach-to-user-namespace -l zsh" - # more history -set-option -g history-limit 10000 +set -g history-limit 10000 # Fix for sending keys to Vim setw -g xterm-keys on @@ -24,20 +21,15 @@ set -sg escape-time 50 # use vim motions :-) setw -g mode-keys vi -# reparing copy & paste -# Setup 'v' to begin selection as in Vim -bind-key -t vi-copy v begin-selection -bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" - -# Update default binding of `Enter` to also use copy-pipe -unbind -t vi-copy Enter -bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" - - # Force a reload of te config file unbind-key r bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded!" +# Copy & Paste with clipper -- see https://github.com/wincent/clipper +# starting copy & paste with Ctrl+a [ +bind-key -t vi-copy v begin-selection +bind-key -t vi-copy y copy-pipe "nc localhost 8377" + # Saner window splitting / new windows bind-key \ split-window -h -c "#{pane_current_path}" bind-key - split-window -v -c "#{pane_current_path}" @@ -53,19 +45,21 @@ bind-key -r C-k resize-pane -U bind-key -r C-h resize-pane -L bind-key -r C-l resize-pane -R + # Smart pane switching with awareness of vim splits -bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L" -bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D" -bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U" -bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R" -bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l" +is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' +bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" +bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" # Mouse support set -g mode-mouse on -set-option -g mouse-select-pane on -set-option -g mouse-select-window on -set-option -g mouse-resize-pane on +set -g mouse-select-pane on +set -g mouse-select-window on +set -g mouse-resize-pane on # counting panes starts at 1 set -g base-index 1 @@ -76,20 +70,20 @@ set -g display-time 2000 # statusbar colors solarized dark -set-option -g status-bg black -set-option -g status-fg yellow -set-option -g status-attr default -set-window-option -g window-status-fg brightblue -set-window-option -g window-status-bg default -set-window-option -g window-status-current-fg brightred -set-window-option -g window-status-current-bg default -set-option -g pane-border-fg black -set-option -g pane-active-border-fg brightgreen -set-option -g message-bg black -set-option -g message-fg brightred -set-option -g display-panes-active-colour blue -set-option -g display-panes-colour brightred -set-window-option -g clock-mode-colour green +set -g status-bg black +set -g status-fg yellow +set -g status-attr default +set -g pane-border-fg black +set -g pane-active-border-fg brightgreen +set -g message-bg black +set -g message-fg brightred +set -g display-panes-active-colour blue +set -g display-panes-colour brightred +setw -g window-status-fg brightblue +setw -g window-status-bg default +setw -g window-status-current-fg brightred +setw -g window-status-current-bg default +setw -g clock-mode-colour green # Custom status bar - with Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤ set -g status-left-length 32 diff --git a/vimrc b/vimrc index 89091ccf..245b977d 100644 --- a/vimrc +++ b/vimrc @@ -339,6 +339,9 @@ nnoremap vs :source ~/.vimrc " Opens an edit command with the path of the currently edited file filled in nnoremap o :e =expand("%:p:h") . "/" +" Yank to clipboard with clipper -- see https://github.com/wincent/clipper +nnoremap y :call system('nc localhost 8377', @0) + " reset search nmap :noh diff --git a/aliases b/zsh/aliases similarity index 97% rename from aliases rename to zsh/aliases index 6e00ec51..864abe5a 100644 --- a/aliases +++ b/zsh/aliases @@ -37,6 +37,8 @@ alias -s html=vim alias -s md=vim alias -s txt=vim +# clipper -- https://github.com/wincent/clipper +alias clip="nc localhost 8377" # gnu coreutils alias ls="gls -al --color=auto" diff --git a/exports b/zsh/exports similarity index 100% rename from exports rename to zsh/exports diff --git a/functions b/zsh/functions similarity index 100% rename from functions rename to zsh/functions diff --git a/zshrc b/zshrc index 31d8bf4c..8aee8098 100644 --- a/zshrc +++ b/zshrc @@ -1,5 +1,5 @@ # Load the functions, aliases, function etc. -for file in ~/dotfiles/{exports,aliases,functions}; do +for file in ~/dotfiles/zsh/{exports,aliases,functions}; do [ -r "$file" ] && source "$file" done unset file