Skip to content

Instantly share code, notes, and snippets.

@akrami
Created October 7, 2021 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akrami/a8caeee4987a691d89c47596abc64ea3 to your computer and use it in GitHub Desktop.
Save akrami/a8caeee4987a691d89c47596abc64ea3 to your computer and use it in GitHub Desktop.
my tmux configuration
# Change default shell to zsh
set -g default-shell /bin/zsh
# Enable mouse with m
set -g mouse on
# Replace C-b with C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Replace h/w pane keys to | and -
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Switch betewen panes using alt + arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Use shift + arrow key to move between windows in a session
bind -n S-Left previous-window
bind -n S-Right next-window
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 0
# Length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
# Theme
set-option -sa terminal-overrides ",xterm*:Tc"
set -g pane-border-style fg='#6272a4'
set -g pane-active-border-style fg='#ff79c6'
set -g message-style bg='#44475a',fg='#8be9fd'
set -g status-style bg='#44475a',fg='#bd93f9'
set -g status-interval 1
set -g status-left '#[fg=#f8f8f2] ⏻ #(whoami)@#h '
set-window-option -g window-status-style fg='#bd93f9',bg=default
set-window-option -g window-status-current-style fg='#ff79c6',bg='#282a36'
set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]"
set -g window-status-format "#[fg=#253144]#[bg=#44475a] #I #W #[fg=#44475a] "
set -g status-right '#[fg=#8be9fd,bg=#44475a]#[fg=#44475a,bg=#8be9fd] #(ps aux | grep $(whoami) | grep php | wc -l) php '
set -ga status-right '#[fg=#ff79c6,bg=#8be9fd]#[fg=#44475a,bg=#ff79c6] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") '
set -ga status-right '#[fg=#bd93f9,bg=#ff79c6]#[fg=#f8f8f2,bg=#bd93f9] %a #[fg=#6272a4]%Y-%m-%d #[fg=#f8f8f2]%T ⏾ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment