Skip to content

Instantly share code, notes, and snippets.

@vjt
Created April 26, 2021 09:04
Show Gist options
  • Save vjt/ff9e4bce984e987ff9c6cd13d65f32c4 to your computer and use it in GitHub Desktop.
Save vjt/ff9e4bce984e987ff9c6cd13d65f32c4 to your computer and use it in GitHub Desktop.

Revisions

  1. vjt created this gist Apr 26, 2021.
    65 changes: 65 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    #
    # -*- ~/.tmux.conf -*-
    # - [email protected] -
    #
    set -g mouse on
    set -g monitor-activity on
    set -g default-terminal "screen-256color"
    set -g repeat-time 200

    set -g clock-mode-style 12
    set -g clock-mode-colour red

    set -g pane-active-border-style fg='#ff0000'
    set -g status-style fg='#ffffff',bg='#0000ff'
    set -g window-status-current-style fg='#ff5555'
    set -g window-status-activity-style fg='#ffffff',bg='#000044'

    #set -g status-right "#W - #T - #(cat /proc/loadavg | awk '{print $1, $2, $3}')"
    set -g status-right "#W - #T"
    set -g status-right-length 100
    set -g status-right-style bg='#ff0000',fg='#ffffff'

    set -g history-limit 10000

    set -g prefix C-f
    unbind C-b
    bind-key C-f send-prefix

    # C-f C-f switches between the last two windows
    bind-key C-f last-window
    bind-key 'f' last-pane

    bind-key - split-window
    bind-key | split-window -h

    bind-key C-l respawn-pane -k
    unbind-key l

    unbind-key &
    bind-key k confirm-before -p "Kill window #W?" kill-window
    bind-key \\ confirm-before -p "Kill session #S?" kill-session

    bind-key '#' split-window 'htop'
    bind-key 'm' command-prompt -p "man:" "split-window 'exec man %%'"
    bind-key 'o' command-prompt -p "ssh:" "split-window 'exec ssh %%'"

    bind-key -n S-Left resize-pane -L 1
    bind-key -n S-Up resize-pane -U 1
    bind-key -n S-Right resize-pane -R 1
    bind-key -n S-Down resize-pane -D 1

    bind-key -n S-Pageup copy-mode -eu
    bind-key -T copy-mode-vi S-Pagedown send-keys -X page-down

    bind-key -n C-Up select-pane -U
    bind-key -n C-Down select-pane -D
    bind-key -n C-Right select-pane -R
    bind-key -n C-Left select-pane -L

    bind-key P choose-buffer

    bind-key = select-layout tiled

    # Send keys to all panes
    bind-key C-Y set-window-option synchronize-panes \; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"