[tmux] less tmux

This commit is contained in:
Josh Sherman 2017-12-23 16:46:20 -06:00
parent 64dc22d6f9
commit e3d86800be
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
7 changed files with 0 additions and 199 deletions

117
tmux.conf
View file

@ -1,117 +0,0 @@
# Snag the tmux version
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)'
# Run plugins
run-shell '$HOME/.dotfiles/vendor/tmux-plugins/tmux-sensible/sensible.tmux'
# Make tmux display things in 24bit colors.
set -sg default-terminal 'screen-256color'
set -asg terminal-overrides ',xterm-256color:Tc,screen-256color:Tc'
set -g default-shell /bin/zsh
# Start at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
set -g display-panes-time 2000
# Remap prefix to Control + \
unbind-key C-b
set -g prefix 'C-Space'
bind-key 'C-Space' send-prefix
# Force a reload of the config file
bind r source-file ~/.tmux.conf \; display-message 'Configuration reloaded!'
# Quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Vim-mode
set -g status-keys vi
setw -g mode-keys vi
# Copy mode and paste
bind v copy-mode
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.4" | bc)" -eq 1 ]' \
'bind-key -t vi-copy v begin-selection; \
bind-key -t vi-copy y copy-selection; \
bind-key -t vi-copy y copy-pipe "xclip -selection c > /dev/null";'
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'tmux copy-selection ; xclip -selection c > /dev/null'
bind-key p run 'xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer'
# Mouse stuff
set -g mouse on
bind c clear-history
bind o new-window
bind [ previous-window
bind ] next-window
bind-key s split-window -h
bind-key S split-window -v
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key H resize-pane -L 10
bind-key J resize-pane -D 10
bind-key K resize-pane -U 10
bind-key L resize-pane -R 10
bind-key M-j resize-pane -D 2
bind-key M-k resize-pane -U 2
bind-key M-h resize-pane -L 2
bind-key M-l resize-pane -R 2
# Open new vertical split and open vim with ctrl-p
bind-key V split-window -h 'vim -c "CtrlP"'
# Window titles
set -g set-titles on
set -g set-titles-string '#W'
setw -g allow-rename off
setw -g automatic-rename off
# Customize the status bar
set -g status on
set -g status-interval 10
set -g status-position bottom
set -g status-justify left
set -g status-left ''
set -g status-left-length 20
set -g status-right '#T'
set -g status-right-length 50
# Customize the window status tabs
setw -g window-status-current-format ' [#I:#{=25:window_name}] '
setw -g window-status-format ' #I:#{=24:window_name} '
setw -g window-status-separator ''
# Colors
set-option -g status-bg colour11
set-option -g status-fg colour8
set-option -g status-attr default
set-window-option -g window-status-bg colour11
set-window-option -g window-status-fg colour8
set-window-option -g window-status-attr default
set-window-option -g window-status-current-bg colour14
set-window-option -g window-status-current-fg colour8
set-window-option -g window-status-current-attr default
set-option -g pane-border-fg colour0
set-option -g pane-active-border-fg colour10
set-option -g message-bg colour9
set-option -g message-fg colour15
set-option -g message-attr default
set-option -g display-panes-active-colour colour9
set-option -g display-panes-colour colour10
set-window-option -g clock-mode-colour colour10
set-window-option -g window-status-activity-style default
set-window-option -g window-status-bell-style bg=colour1,fg=colour15

View file

@ -1,8 +0,0 @@
# ~/.tmuxinator/blog.yml
name: blog
root: ~/Code/joshtronic/joshtronic.com
windows:
- escritoire:
- jekyll: docker-compose up

View file

@ -1,10 +0,0 @@
# ~/.tmuxinator/crowdsync.yml
name: crowdsync
root: ~/Code/joshtronic/crowdsync
pre: docker-compose up -d
windows:
- code:
- docker: docker-compose up

View file

@ -1,20 +0,0 @@
# ~/.tmuxinator/ginpop.yml
name: ginpop
root: ~/Code/joshtronic/ginpop.com
pre: docker-compose up -d
windows:
- code:
- webpack:
layout: main-vertical
panes:
- npm run dev
- npm run prod
- db:
layout: main-vertical
panes:
- docker-compose exec mysql sh -c 'mysql -uroot -pmysql scenekids'
- docker-compose exec redis redis-cli
- docker: docker-compose up

View file

@ -1,10 +0,0 @@
# ~/.tmuxinator/holidayapi.yml
name: hapi
root: ~/Code/joshtronic/holidayapi.com
pre: docker-compose up -d
windows:
- code:
- docker: docker-compose up

View file

@ -1,24 +0,0 @@
# ~/.tmuxinator/sumo.yml
name: sumo
root: ~/Code/appsumo/sumome
pre: docker-compose up -d
windows:
- code:
- repl:
layout: main-vertical
panes:
- docker-compose exec node bash
- docker-compose exec tests bash
- db:
layout: main-vertical
panes:
- docker-compose exec mysql sh -c 'mysql -usumome sumome'
- docker-compose exec redis redis-cli
- server:
layout: main-vertical
panes:
- docker-compose up
- docker-compose exec node sh -c 'DEBUG="" grunt server'

10
zshrc
View file

@ -131,16 +131,6 @@ man() {
man "$@"
}
ssh() {
if [ -z ${TMUX+x} ]; then
command ssh "$@"
else
tmux rename-window "$*"
command ssh "$@"
tmux set-window-option automatic-rename "on" 1>/dev/null
fi
}
function username() {
if [[ `whoami` != 'josh' ]]; then
echo "%F{248}%n%F{reset}"