Skip to content

Tmux configuration, that supercharges your tmux to build cozy and cool terminal environment

Notifications You must be signed in to change notification settings

JstRelax/tmux-config

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Updates:

  1. Fixed bugs which caused errors while running tmux post installation.
  2. Updated tmux-powerline to reflect tun0 IP when connected using VPN.
  3. Cleaned up tmux-powerline; removed status-date and sysstat_loadavg.

Installation

To install tmux-config:

$ git clone https://github.com/iamkashz/tmux-config.git
$ ./tmux-config/install.sh

# can jump into tmux session using
$ tmux new

Setup tmux with terminator

Note: xclip is needed to fix the mouse copy-paste issue.

$ sudo apt install terminator xclip
  1. Right click on Terminal Emulator > Edit Applicaiton.
  2. Set Command as terminator.
  3. Launch Terminal Emulator, terminator should launch directly.

image

Auto launch tmux at terminal spawn

  1. Launch terminator (or Terminal Emulator if it auto launches terminator).
  2. Right click > Prferences > Profiles tab
  3. Under default profile, select sub-tab Command
  4. Set Custom command as tmux.

image

Custom Status line

Left part: left

Right part: right

The left part contains only current session name. The right part contains CPU & Memory Usage, username@hostname, tun0 IP (if connected to VPN) and battery indicator.

Hide/show status bar using <prefix> C-s keybinding.

tmux cheatsheet for beginners

TMUX CHEATSHEET

So ~/.tmux.conf overrides default key bindings for many action, to make them more reasonable, easy to recall and comfortable to type.

tmux key Description
C-a Default prefix, used instead of "C-b". Same prefix is used in screen program, and it's easy to type. The only drawback of "C-a" is that underlying shell does not receive the keystroke to move to the beginning of the line.
<prefix> C-e Open ~/.tmux.conf file in your $EDITOR
<prefix> C-r Reload tmux configuration from ~/.tmux.conf file
<prefix> r Rename current window
<prefix> R Rename current session
<prefix> _ Split new pane horizontally
<prefix> | Split new pane vertically
<prefix> < Select next pane
<prefix> > Select previous pane
<prefix> ← Select pane on the left
<prefix> → Select pane on the right
<prefix> ↑ Select pane on the top
<prefix> ↓ Select pane on the bottom
<prefix> C-← Resize pane to the left
<prefix> C-→ Resize pane to the right
<prefix> C-↑ Resize pane to the top
<prefix> C-↓ Resize pane to the bottom
<prefix> > Move to next window
<prefix> < Move to previous window
<prefix> Tab Switch to most recently used window
<prefix> L Link window from another session by entering target session and window reference
<prefix> \ Swap panes back and forth with 1st pane. When in main-horizontal or main-vertical layout, the main panel is always at index 1. This keybinding let you swap secondary pane with main one, and do the opposite.
<prefix> C-o Swap current active pane with next one
<prefix> + Toggle zoom for current pane
<prefix> x Kill current pane
<prefix> X Kill current window
<prefix> C-x Kill other windows but current one (with confirmation)
<prefix> Q Kill current session (with confirmation)
<prefix> C-u Merge current session with another. Essentially, this moves all windows from current session to another one
<prefix> d Detach from session
<prefix> D Detach other clients except current one from session
<prefix> C-s Toggle status bar visibility
<prefix> m Monitor current window for activity
<prefix> M Monitor current window for silence by entering silence period
<prefix> F12 Switch off all key binding and prefix hanling in current window. See "Nested sessions" paragraph for more info

About

Tmux configuration, that supercharges your tmux to build cozy and cool terminal environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 76.5%
  • Dockerfile 23.5%