Skip to content

Latest commit

 

History

History
85 lines (59 loc) · 1.68 KB

README.md

File metadata and controls

85 lines (59 loc) · 1.68 KB

Tmux Configuration

  1. Install tmux:
  sudo pacman -S tmux

Note

You need to install fzf if you want to work with tmux sessions.

  sudo pacman -S fzf
  1. Install TPM (Tmux Plugin Manager):
  git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
  1. copy the tmux.conf file from this repository to ~/.config/tmux/tmux.conf
  git clone https://github.com/sujit-shrc/dotfiles.git
  cp -r dotfiles/tmux ~/.config/
  1. Or if you want to do manually:
  mkdir -p ~/.config/tmux/tmux.conf
  # then copy all the code from tmux.conf in this repo and paste it into ~/.config/tmux/tmux.conf file
  1. Configure tmux in your shell which is you are using: Add to ~/.bashrc or ~/.zshrc:
  alias tmux='tmux -f ~/.config/tmux/tmux.conf'
  1. Reload shell config:
  source ~/.bashrc  # or ~/.zshrc
  1. Start tmux:
  tmux
  1. Install plugins: Press prefix + I (usually Ctrl-b then Shift-i)

Tip

To customize further, add settings to tmux.conf and plugins with set -g @plugin lines.

Additional key bindings and configs with i3 wm

Important

If you want to auto start tmux then configure it with i3wm like this

  1. Auto start tmux with i3:
  nano ~/.config/i3/config
  [[ $TERM == "screen" ]] && exec tmux
  1. Sync System Clipboard with tmux clipboard:
  sudo pacman -S xclip

Then add to your tmux.conf:

  set -g set-clipboard on
  bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
  bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"