Skip to content
Browse files

Improved wemux status line

  • Loading branch information...
1 parent 21f52a2 commit e2179aaf97dfc808ff738dbd5ebee81604768205 @zolrath committed
Showing with 86 additions and 134 deletions.
  1. +86 −132 tmux.conf
  2. +0 −2 zshrc
View
218 tmux.conf
@@ -1,139 +1,93 @@
-# ----------------------------------------
-# Keybindings
-# ----------------------------------------
+# Use something easier to type as the prefix.
+set -g prefix C-f
unbind C-b
-unbind C-a
-unbind %
-unbind , #
-unbind .
-unbind n
-unbind p
-unbind [
-unbind '"'
-unbind h
-unbind j
-unbind k
-unbind l
-unbind Left
-unbind Right
-unbind Down
-unbind Up
-unbind &
-unbind "'"
-
-# I especially like being able to search with /,? when in copy-mode
-setw -g mode-keys vi
-set-option -g prefix C-a # C-a for prefix just like screen
-
-bind C-a last-window
-bind | split-window -h
-bind \ split-window -h
-bind _ split-window -v
-bind - split-window -v
-bind x kill-pane
-bind X kill-window
-bind q confirm-before kill-session
-bind Q confirm-before kill-server
-# -r flag allows repeated use without sending command sequence again.
-bind -r , previous-window # <
-bind -r . next-window # >
-bind -r < swap-window -t :-
-bind -r > swap-window -t :+
-bind n command-prompt 'rename-window %%'
-bind N command-prompt 'rename-session %%'
-bind Escape copy-mode -u
-bind r source-file ~/.tmux.conf; display-message " ✱ ~/.tmux.conf is reloaded"
-bind R refresh-client
-bind a send-key C-a
-bind -r Left resize-pane -L 2
-bind -r Right resize-pane -R 2
-bind -r Down resize-pane -D 2
-bind -r Up resize-pane -U 2
-bind j select-pane -D # Similar to 'C-w j' to navigate windows in Vim
-bind k select-pane -U
-bind h select-pane -L
-bind l select-pane -R
+bind C-f send-prefix
+
+# Relax!
+set -sg escape-time 0
+set -sg repeat-time 600
-# ----------------------------------------
-# Fix Copy/Pasing in OS X.
-# ----------------------------------------
-# Make pasteboard in OS X work.
+# This is hilariously absurd. How many nerds use tmux on OS X every day and
+# it's still fundamentally broken?
set -g default-command "reattach-to-user-namespace -l zsh"
-# Set vi-copy mode to vim keybindings.
-bind-key -t vi-copy 'v' begin-selection
-bind-key -t vi-copy 'y' copy-selection
-# Copy tmux copy buffer to mac clipboard
-bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
-# Paste macs clipboard into tmux copy buffer
-bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
-
-# ----------------------------------------
-# Zoom in on current pane.
-# ----------------------------------------
-# unbind +
-# unbind -
-# bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
-# bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
-
-# ----------------------------------------
-# Mouse can be used to select/resize windows and panes.
-# ----------------------------------------
-set -g mode-mouse on
-set -g mouse-select-pane on
-set -g mouse-select-window on
-set -g mouse-utf8 on
-
-# ----------------------------------------
-# Miscellaneous
-# ----------------------------------------
-set -g destroy-unattached off
-
-# ---------------------------------------------------------
-# Theme
-# ---------------------------------------------------------
-# ----------------------------------------
-# Status Bar
-# ----------------------------------------
-# Make window numbers start at 1 instead of 0.
+
+# Less stretching to get to the first item.
set -g base-index 1
-setw -g aggressive-resize on
-set -g history-limit 1000
+setw -g pane-base-index 1
-# Set window notifications
-setw -g monitor-activity on
-set -g visual-activity on
+# Reload the config.
+bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
+
+unbind t
+bind t run-shell 'wemux display_users'
+# Saner splitting.
+bind v split-window -h
+bind s split-window -v
+bind S choose-session \; run-shell 'sleep 5s; wemux summon'
+
+# Pane movement
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
-set -g status-bg black
+# Pane resizing
+bind -r Left resize-pane -L 2
+bind -r Down resize-pane -D 2
+bind -r Up resize-pane -U 2
+bind -r Right resize-pane -R 2
+
+# Window movement
+bind -r , select-window -t :-
+bind -r . select-window -t :+
+
+# 256 colors please
+set -g default-terminal "screen-256color"
+
+# Bad Wolf
set -g status-fg white
-set -g status-interval 60
-set -g status-right-length 60
-set -g status-left-length 60
-
-set -g status-left ' #[bold]❐ #S#[default] ⣿'
-set -g status-right '#[bold]#(whoami) ● #H#[default] ⡇ #[fg=blue]%H:%M#[default] '
-
-# ----------------------------------------
-# Window Settings
-# ----------------------------------------
-## highlight active window
-set-window-option -g window-status-current-bg colour148
-set-window-option -g window-status-current-fg colour22
-set-window-option -g window-status-current-attr bold
-set-window-option -g window-status-current-format ' #I #W '
-
-## set window notifications
-set-option -g visual-activity on
-set-option -g visual-content on
-set-window-option -g monitor-activity on
-set-window-option -g automatic-rename off
-
-## tmux window titling for X
-set-option -g set-titles on
-set-option -g set-titles-string '[#I] #W'
-set-window-option -g automatic-rename on
-set-window-option -g window-status-format ' #I #W '
-set-window-option -g window-status-attr bold
-
-## pane border and colors
-set-option -g pane-active-border-fg yellow
-set-option -g pane-border-fg white
+set -g status-bg colour234
+set -g window-status-activity-attr bold
+set -g pane-border-fg colour245
+set -g pane-active-border-fg colour39
+set -g message-fg colour16
+set -g message-bg colour221
+set -g message-attr bold
+
+# Custom status bar
+# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
+set -g status-left-length 32
+set -g status-right-length 150
+set -g status-interval 5
+
+# Inconsolata-dz-Powerline Theme:
+#[fg=white,bg=colour39,noreverse,bold]
+#green hostname: fg=colour22,bg=colour148
+set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
+set -g status-right '#[fg=colour238,bg=colour234,nobold]⮂#[fg=colour245,bg=colour238] #h #[fg=colour252]⮂#[fg=colour235,bg=colour252,bold] #(wemux status_users) '
+set -g window-status-format "#[fg=white,bg=colour234] #I #W "
+set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
+bind t run-shell 'wemux display_users'
+# Alternate Theme for shells without Inconsolata-dz-Powerline:
+# set -g status-left ' #[bold]❐ #S#[default] ⣿'
+# set -g status-right '#[bold]#(whoami) ● #H#[default] ⡇ #[fg=blue]%H:%M#[default] '
+
+# Activity
+setw -g monitor-activity on
+set -g visual-activity off
+
+# Autorename sanely.
+setw -g automatic-rename on
+
+# Better name management
+bind c new-window \; command-prompt "rename-window '%%'"
+bind C new-window
+bind , command-prompt "rename-window '%%'"
+
+# Copy mode
+setw -g mode-keys vi
+bind [ copy-mode
+unbind p
+bind p paste-buffer
+bind -t vi-copy v begin-selection
+bind -t vi-copy y copy-selection
View
2 zshrc
@@ -54,8 +54,6 @@ alias gl="git smart-log"
# ----------------------------------------
# Tmux Related
# ----------------------------------------
-# Set wemux mode to host.
-export WEMUX_HOST=true
# Load Tmuxinator
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator
# Function to let me set tmux title.

0 comments on commit e2179aa

Please sign in to comment.
Something went wrong with that request. Please try again.