Arquivos de configuração pessoal do tmux
Find a file
2026-04-30 09:28:10 -05:00
assets atualização nos arquivos de README.md 2026-04-30 09:28:10 -05:00
.gitignore exceções de versionamento e definição de atributos específicos para arquivos e diretórios Git 2026-03-19 09:21:40 -05:00
README.en-US.md atualização nos arquivos de README.md 2026-04-30 09:28:10 -05:00
README.md atualização nos arquivos de README.md 2026-04-30 09:28:10 -05:00
tmux.conf removida a quebra de linha no estilo Windows '\r\n' na linha 18 2026-03-23 16:14:34 -05:00

tmux Logo

tmuxfiles

Personal tmux configuration with session persistence support

License: MIT tmux TPM pt-BR


Table of Contents


Overview

This repository contains a personal tmux configuration. It is recommended to apply these settings on a fresh tmux installation, before any customization, to avoid conflicts with existing system or user profile definitions.

By default, tmux uses /etc/tmux.conf for global behavior and ~/.tmux.conf for local, user-specific behavior. The configurations in this repository target local use, with ~/.tmux.conf pointing to ~/.tmux/main.conf, where all tmux behavior is centralized.


Included Features

Plugin Description
Tmux Resurrect Enables session persistence after system shutdown.
Tmux Continuum Automatically starts tmux after system or server reboot.

Prerequisites

  • tmux installed
  • Git installed and configured

Installation

Create the default tmux configuration file:

touch ~/.tmux.conf

Set the path to the configuration file:

echo -n "source-file ~/.tmux/tmux.conf" >> ~/.tmux.conf

Clone this repository into the user configuration directory, following the XDG Base Directory Specification:

# Clone from Codeberg
git clone https://forge.itamarcampos.com.br/itamcampos/tmuxfiles ~/.tmux

# or... clone from GitHub
git clone https://github.com/itamcampos/tmuxfiles ~/.tmux

Install the TPM (Tmux Plugin Manager):

# Create the plugins directory and clone the TPM repository
mkdir -p ~/.tmux/plugins
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Grant execution permissions to the TPM scripts:

find ~/.tmux/plugins/tpm -type f \( -name "*.sh" -o -path "*/bin/*" -o -path "*/bindings/*" \) -exec chmod +x {} \;

To verify the installation, open a new tmux session:

tmux new -s main

Plugin Management

Installing plugins

  1. Add the new plugin to ~/.tmux/tmux.conf using the set -g @plugin '...' directive
  2. Press Ctrl+b + I (uppercase I) to install

Saving and restoring sessions

Operation Shortcut
Save tmux environment prefix + Ctrl-s
Restore tmux environment prefix + Ctrl-r

Other Operations

Remove all saved sessions:

rm -vrf ~/.tmux/plugins/tmux-continuum/*
rm -vrf ~/.tmux/plugins/tmux-resurrect/*

Restart the tmux server:

tmux kill-server

Delete all tmux configuration:

rm -vrf ~/.tmux/*

Troubleshooting

This section covers methods to resolve issues related to TPM and plugin installation.

Simulates the standard installation process inside a clean, temporary tmux session, minimizing conflicts with pre-existing configurations.

# Kill all tmux server instances
tmux kill-server

# Grant execution permissions to TPM components
find ~/.tmux/plugins/tpm -type f \( -name "*.sh" -o -path "*/bin/*" -o -path "*/bindings/*" \) -exec chmod +x {} \;

# Create a detached session and reload the configuration
tmux new-session -d -s temp
tmux send-keys -t temp 'tmux source-file ~/.tmux.conf' Enter
sleep 10

# Trigger plugin installation and wait for completion
tmux send-keys -t temp C-b I
sleep 10

# Verify created directories and kill the temporary session
ls -la ~/.tmux/plugins/
tmux kill-session -t temp

2. Direct Script Execution

Invokes the TPM install script directly, bypassing potential session state or keybinding inconsistencies.

export TMUX_PLUGIN_MANAGER_PATH="$HOME/.tmux/plugins/"
~/.tmux/plugins/tpm/scripts/install_plugins.sh

3. Full TPM Reinstallation

If the previous methods do not resolve the issue, a full reinstallation of TPM can fix deeper corruption or configuration problems.

# Remove the current directory and clone a fresh copy
rm -rf ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

# Grant permissions and restart the server
find ~/.tmux/plugins/tpm -type f \( -name "*.sh" -o -path "*/bin/*" -o -path "*/bindings/*" \) -exec chmod +x {} \;
tmux kill-server
tmux new -s main

References


Made by itamcampos