Skip to content

Instantly share code, notes, and snippets.

@mikejoh
Last active January 9, 2022 09:43
Show Gist options
  • Save mikejoh/d2021745632f404ab8a47a3667168398 to your computer and use it in GitHub Desktop.
Save mikejoh/d2021745632f404ab8a47a3667168398 to your computer and use it in GitHub Desktop.
My version of tmux (via iTerm2) on Mac OSX

tmux

Tested on Mac OSX High Sierra 10.13+ with iTerm2

Install tpm plugin manager

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

and add the following in the end of your ~/.tmux.conf, uncomment any plugins that you wont be using:

run '~/.tmux/plugins/tpm/tpm'

To update all tpm provided plugins to tmux run: ~/.tmux/plugins/tpm/bin/update_plugins all

Reload the tmux environment and install plugins: Ctrl-A + I

Here's the rest of my ~/.tmux.conf, please note the status bar includes plugins that i've used/create. Check the plugin list for more info:

# Use Ctrl-A instead of Ctrl-B, remap Caps Lock to Ctrl!
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind-key R source ~/.tmux.conf \; display-message "tmux.conf reloaded."
bind e setw synchronize-panes on
bind E setw synchronize-panes off

set-option -g history-limit 20000
setw -g mouse on

# Easy-to-remember split pane commands
bind | split-window -h -c '#{pane_current_path}' # vertical pane
bind - split-window -v -c '#{pane_current_path}' # horizontal pane
unbind '"'
unbind %

# Task manager
set -g @tasks_manager 'taskwarrior'

# Icons
set -g @tasks_icon_urgent '⧗'
set -g @tasks_icon_outstanding '+'

# Status bar
set -g status-fg colour231
set -g status-bg colour234
set -g status-left-length 20
set -g status-left '#[fg=colour254,bg=colour254,bold] #S  #[fg=colour254,bg=colour234,nobold]'
set -g status-right-length 150
set -g status-right '#{k8s_status} | #{tasks_status} | #{battery_percentage} | %Y-%m-%d | %H:%M:%S '
set -g status-interval 1
set -g status-position bottom
set -g status-attr dim

set -g window-status-format "#[fg=colour254,bg=colour234]#I #[fg=colour254] #[fg=colour254]#W "
set -g window-status-current-format "#[fg=colour234,bg=colour238]#[fg=colour254,bg=colour238] #I  #[fg=colour254,bold]#W #[fg=colour238,bg=colour234,nobold]"
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'

set-window-option -g window-status-fg colour249
set-window-option -g window-status-activity-attr none
set-window-option -g window-status-bell-attr none
set-window-option -g window-status-activity-fg yellow
set-window-option -g window-status-bell-fg red

# Plugins
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-k8s'
set -g @plugin 'chriszarate/tmux-tasks'
set -g @plugin 'mikejoh/tmux-k8s'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment