My configuration for TMUX, including plugins submodules.
Go to file
2023-03-31 17:20:45 +07:00
plugins first commit 2023-03-19 01:35:56 +07:00
sidebar first commit 2023-03-19 01:35:56 +07:00
.gitmodules first commit 2023-03-19 01:35:56 +07:00
gitmux.conf add gitmux.conf 2023-03-19 16:03:06 +07:00
README.md OSC 52 and URxvt 2023-03-20 12:26:46 +07:00
tmux.conf add repeatable select-window 2023-03-31 17:20:45 +07:00

tmuxrc

Tmux Fzf

tmuxrc is a collection of RUNCOM & Plugins dedicated to the terminal multiplexer Tmux.

  • I use this configuration with my custom bash environment to always work in Tmux locally and in SSH sessions.

Features

  • Plugins (included as submodules):
  • Prefix rebinded to Ctrl+x (Ctrl+w for remote/ssh sessions).
  • Toggle Sync mode for visible panes with Prefix-a.
  • Toggle Zoom current Pane with Prefix-Z. Next & Previous: Prefix-e,Prefix-z.
  • Open a popup session changer with Prefix-Ctrl+j.
  • Open a popup Scratch session with Prefix-Ctrl+g.
  • Nice status (display current command) & color theme with true colors.
  • Compatible with my environment config: bashrc.
  • Check more in the conf file …

Requirements

  • Tmux 3.3+:
    • libevent 2.x (apt or build)
    • ncurses (apt or build)
  • Gitmux
  • Fzf 0.35+ for fzf-tmux
  • exa for the tmux-sidebar: sudo apt install exa
  • bash 5+
  • bash_completion
  • My environment config: bashrc

Installation

Tmux

  • With APT:
# check version and repository with apt
sudo apt show -a tmux 2> /dev/null | grep -E 'Version:|APT-Sources:'

# if your apt repositories deliver at least 3.3, you can install it
sudo apt install tmux
# or if there is a specific repository
sudo apt -t repo-backports install tmux
  • Or build & install:
mkdir -p $HOME/Builds && cd $HOME/Builds
wget https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz
tar -zxf tmux-*.tar.gz
cd tmux-*/
./configure
make && sudo make install

Gitmux

# for linux_amd64
sudo apt install jq
_RELEASES=$(curl -s https://api.github.com/repos/arl/gitmux/releases/latest)
_URL=$(echo "$_RELEASES" | jq -r '.assets[] | select( .name | match("linux_amd64")) | .browser_download_url')
wget -c -nv "$_URL" -O - | sudo tar --no-same-owner -xzv -C /usr/local/bin gitmux

Fzf

  • With APT:
# check version and repository with apt
sudo apt show -a fzf 2> /dev/null | grep -E 'Version:|APT-Sources:'

# if your apt repositories deliver at least 0.35, you can install it
sudo apt install fzf
# or if there is a specific repository
sudo apt -t repo-backports install fzf
  • Or build & install:
mkdir -p $HOME/Builds && cd $HOME/Builds
git clone --depth 1 https://github.com/junegunn/fzf.git
cd fzf
sudo ./install --all --no-bash --no-zsh --no-fish
sudo cp shell/completion.bash /etc/bash_completion.d/fzf
sudo cp bin/* /usr/local/bin/

tmuxrc

# backup current files
mkdir -p $HOME/.backups
cp -r --backup=t {"$HOME"/.tmux/,"$HOME"/.tmux.conf,"$HOME"/.config/tmux/} $HOME/.backups/
rm -Rf "$HOME"/.tmux/ "$HOME"/.tmux.conf "$HOME"/.config/tmux/

# install
mkdir -p $HOME/.config
cd $HOME/.config
git clone --depth=1 --recurse-submodules https://git.tkapias.net/tkapias/tmuxrc tmux
cp tmux/gitmux.conf $HOME/.config/

Configuration

TERM name, true color and osc 52 copy

You may need to modify the name of your $TERM in the "terminal-features" & "terminal-overrides" inside tmux.conf.

Your terminal need features related to 256 or true colors and OSC 52 copy.

URxvt - Rxvt-unicode

Urxvt is an old terminal but it is currently my favorite due to the amount of customizations available and it's performance.

By default it can not perform OSC 52 or display some font icons. Please refer to my other repository urxvtrc.

SSH/Remote

If you install this configuration on a remote system, you will need another prefix than on the local tmux (ctrl+x).

You can change the prefix to ctrl+w on the remote system like this:

sed -i -e 's/C-x/C-w/g' -e 's/Ctrl-x/Ctrl-w/g' $HOME/.config/tmux/tmux.conf