- Install tmux:
sudo pacman -S tmuxNote
You need to install fzf if you want to work with tmux sessions.
sudo pacman -S fzf- Install TPM (Tmux Plugin Manager):
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm- copy the
tmux.conffile from this repository to~/.config/tmux/tmux.conf
git clone https://github.com/sujit-shrc/dotfiles.git
cp -r dotfiles/tmux ~/.config/- 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- Configure
tmuxin your shell which is you are using: Add to~/.bashrcor~/.zshrc:
alias tmux='tmux -f ~/.config/tmux/tmux.conf'- Reload shell config:
source ~/.bashrc # or ~/.zshrc- Start tmux:
tmux- 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.
Important
If you want to auto start tmux then configure it with i3wm like this
- Auto start tmux with i3:
nano ~/.config/i3/config
[[ $TERM == "screen" ]] && exec tmux- Sync System Clipboard with tmux clipboard:
sudo pacman -S xclipThen 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"