diff --git a/tmux.conf b/tmux.conf index 00c9f92f..ac6cd6dc 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,6 +1,6 @@ ## Behavior ############### # set correct Term -set-option -g default-terminal "screen-256color" +# set-option -g default-terminal "screen-256color" # Zero-based indexing is fine in programming languages, but not so much in # a multiplexer when zero is on the other side of the keyboard. set -g base-index 1 @@ -14,8 +14,6 @@ set -s escape-time 0 setw -g aggressive-resize on # go zsh, go set-option -g default-shell $SHELL -# share clipboard -set-option -g default-command "/usr/local/bin/reattach-to-user-namespace -l $SHELL" # a mouse set -g mode-mouse on setw -g mouse-select-window on @@ -24,8 +22,8 @@ setw -g mouse-select-pane on ## Key bindings ########### # Remap the key prefix -unbind C-b set -g prefix C-a +unbind C-b # Restore go-to-start-of-line shortcut bind a send-prefix # Go to last active window @@ -43,8 +41,13 @@ unbind [ bind Escape copy-mode unbind p bind p paste-buffer + bind-key -t vi-copy 'v' begin-selection -bind-key -t vi-copy 'y' copy-selection +bind-key -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" + +unbind -t vi-copy Enter +bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" + bind h select-pane -L bind j select-pane -D bind k select-pane -U @@ -53,11 +56,6 @@ bind-key -r C-h select-window -t :- bind-key -r C-l select-window -t :+ # after copying to a tmux buffer, hit y again to copy to clipboard bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" -# pane selection -bind Left select-pane -L -bind Right select-pane -R -bind Up select-pane -U -bind Down select-pane -D# # quick view of processes bind '~' split-window "exec top" # Cycling through windows @@ -67,7 +65,7 @@ bind-key -n C-left prev ## Looks ######################## # default statusbar colors -set-option -g status-bg '#222222' +set-option -g status-bg '#333333' set-option -g status-fg yellow #yellow set-option -g status-attr default # default window title colors @@ -92,8 +90,8 @@ set-window-option -g clock-mode-colour green #green ## Status bar ################### -set -g status-justify left -set -g status-right-length 60 -set -g status-left-length 60 -set -g status-left '#[bg=blue] #[fg=black]#[bold]#S #[default]' -set -g status-right '#[bg=#383838] #(whoami)@#H ' +set-option -g status-justify left +set-option -g status-right-length 60 +set-option -g status-left-length 60 +set-option -g status-left '#[bg=blue] #[fg=white]#[bold]#S #[default]' +set-option -g status-right '#[bg=#383838] #(whoami)@#H'