Skip to content

Instantly share code, notes, and snippets.

@sshadmand
Forked from spicycode/tmux.conf
Last active May 4, 2022 19:44
Show Gist options
  • Save sshadmand/70a9d339f49aeaf343de7ef8f74a54a2 to your computer and use it in GitHub Desktop.
Save sshadmand/70a9d339f49aeaf343de7ef8f74a54a2 to your computer and use it in GitHub Desktop.

Revisions

  1. Sean revised this gist Nov 22, 2016. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion Adding tmux
    Original file line number Diff line number Diff line change
    @@ -7,4 +7,17 @@ Install TMP
    [Copy and paste tmux.conf below into local file.]

    Load tmux configurations
    #> tmux source-file ~/.tmux.conf
    #> tmux source-file ~/.tmux.conf

    Note, some actions, like opening folders
    or starting apps from with tmux, do not work properly.
    To fix this, on OSX:
    #> brew install reattach-to-user-namespace
    #> vi ~/.bash_aliases

    and add these lines
    alias sublime='reattach-to-user-namespace sublime'
    alias open='reattach-to-user-namespace open'

    Then load the changes
    #> source ~/.bash_aliases
  2. Sean revised this gist Nov 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tmux.conf
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@
    # http://www.dayid.org/comp/tm.html

    ####
    # Settings
    # Settings including active mouse, scrolling and more ...
    ####

    # 0 is too far from ` ;)
  3. Sean revised this gist Nov 22, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,9 @@
    # prefix + ctrl-s = Persist session
    # prefix + ctrl-r = Resurect session

    # For all other commands, see cheat sheet:
    # http://www.dayid.org/comp/tm.html

    ####
    # Settings
    ####
  4. Sean revised this gist Nov 22, 2016. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,24 @@
    #####
    # Instructions
    ####

    # BE SURE TO INSTALL TMUX Plugin Manager
    # https://github.com/tmux-plugins/tpm
    # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
    # then Load tmux configurations
    #> tmux source-file ~/.tmux.conf

    # Once installed load plugins in your session with
    #> ctrl-b + I
    # Once installed:
    # prefix + y = copy line to clipboard
    # prefix + ctrl-s = Persist session
    # prefix + ctrl-r = Resurect session

    ####
    # Settings
    ####

    # 0 is too far from ` ;)
    set -g base-index 1

  5. Sean revised this gist Nov 22, 2016. 2 changed files with 43 additions and 2 deletions.
    11 changes: 10 additions & 1 deletion Adding tmux
    Original file line number Diff line number Diff line change
    @@ -1 +1,10 @@
    touch ~/.tmux.conf
    Create a tmux conf file
    #> touch ~/.tmux.conf

    Install TMP
    #> git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

    [Copy and paste tmux.conf below into local file.]

    Load tmux configurations
    #> tmux source-file ~/.tmux.conf
    34 changes: 33 additions & 1 deletion tmux.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,24 @@
    # BE SURE TO INSTALL TMUX Plugin Manager
    # https://github.com/tmux-plugins/tpm
    # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
    # then Load tmux configurations
    #> tmux source-file ~/.tmux.conf

    # 0 is too far from ` ;)
    set -g base-index 1

    #retreuve persisted tmux after restart
    #https://github.com/tmux-plugins/tmux-resurrect
    set -g @plugin 'tmux-plugins/tmux-resurrect'

    # automaticually saves tmux session every 15mins
    # https://github.com/tmux-plugins/tmux-continuum
    set -g @continuum-restore 'on'

    #allow copy and paste from tmux
    #https://github.com/tmux-plugins/tmux-yank
    set -g @plugin 'tmux-plugins/tmux-yank'

    # Automatically set window title
    set-window-option -g automatic-rename on
    set-option -g set-titles on
    @@ -64,4 +82,18 @@ set -g window-status-current-attr bold
    set -g status-interval 60
    set -g status-left-length 30
    set -g status-left '#[fg=green](#S) #(whoami)'
    set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
    set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'



    # List of plugins
    set -g @plugin 'tmux-plugins/tpm'
    set -g @plugin 'tmux-plugins/tmux-sensible'

    # Other examples:
    # set -g @plugin 'github_username/plugin_name'
    # set -g @plugin '[email protected]/user/plugin'
    # set -g @plugin '[email protected]/user/plugin'

    # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
    run '~/.tmux/plugins/tpm/tpm'
  6. Sean revised this gist Nov 17, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Adding tmux
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    touch ~/.tmux.conf
  7. Sean revised this gist Nov 17, 2016. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ set -g status-keys vi
    set -g history-limit 10000

    setw -g mode-keys vi
    setw -g mode-mouse on
    set -g mouse on
    setw -g monitor-activity on

    bind-key v split-window -h
    @@ -32,6 +32,7 @@ bind j select-pane -D
    bind k select-pane -U
    bind l select-pane -R


    # Use Alt-vim keys without prefix key to switch panes
    bind -n M-h select-pane -L
    bind -n M-j select-pane -D
    @@ -63,4 +64,4 @@ set -g window-status-current-attr bold
    set -g status-interval 60
    set -g status-left-length 30
    set -g status-left '#[fg=green](#S) #(whoami)'
    set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
    set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
  8. @spicycode spicycode created this gist Sep 20, 2011.
    66 changes: 66 additions & 0 deletions tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,66 @@
    # 0 is too far from ` ;)
    set -g base-index 1

    # Automatically set window title
    set-window-option -g automatic-rename on
    set-option -g set-titles on

    #set -g default-terminal screen-256color
    set -g status-keys vi
    set -g history-limit 10000

    setw -g mode-keys vi
    setw -g mode-mouse on
    setw -g monitor-activity on

    bind-key v split-window -h
    bind-key s split-window -v

    bind-key J resize-pane -D 5
    bind-key K resize-pane -U 5
    bind-key H resize-pane -L 5
    bind-key L resize-pane -R 5

    bind-key M-j resize-pane -D
    bind-key M-k resize-pane -U
    bind-key M-h resize-pane -L
    bind-key M-l resize-pane -R

    # Vim style pane selection
    bind h select-pane -L
    bind j select-pane -D
    bind k select-pane -U
    bind l select-pane -R

    # Use Alt-vim keys without prefix key to switch panes
    bind -n M-h select-pane -L
    bind -n M-j select-pane -D
    bind -n M-k select-pane -U
    bind -n M-l select-pane -R

    # Use Alt-arrow keys without prefix key to switch panes
    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

    # Shift arrow to switch windows
    bind -n S-Left previous-window
    bind -n S-Right next-window

    # No delay for escape key press
    set -sg escape-time 0

    # Reload tmux config
    bind r source-file ~/.tmux.conf

    # THEME
    set -g status-bg black
    set -g status-fg white
    set -g window-status-current-bg white
    set -g window-status-current-fg black
    set -g window-status-current-attr bold
    set -g status-interval 60
    set -g status-left-length 30
    set -g status-left '#[fg=green](#S) #(whoami)'
    set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'