Closed fazlearefin closed 7 months ago
Possible .tmux.conf
:
# Enable true color support for xterm-compatible terminals
set-option -sa terminal-overrides ",xterm*:Tc"
# Enable mouse support
set -g mouse on
# Set vi key bindings for copy mode
setw -g mode-keys vi
# Double click to select word and copy to clipboard using xsel
bind -T copy-mode DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
# Triple click to select line and copy to clipboard using xsel
bind -T copy-mode TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
# Unbind Enter key in copy mode (vi) and bind it to copy selection to clipboard using xsel
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -ib"
# Increase scrollback buffer size
set-option -g history-limit 200000
# Enable system clipboard integration
set-option -s set-clipboard on
# Toggle synchronization of keystrokes to all panes in the window
bind * setw synchronize-panes
# Move the current window to the first position
bind-key T swap-window -t 0
# Clear the scrollback buffer
bind -n C-k clear-history
# change the thickness of pane borders
set -g pane-border-lines heavy # possible values are: 'single', 'double', 'heavy', 'simple'
# Reload the tmux configuration file
unbind r
bind r source-file ~/.tmux.conf
# Split windows vertically and horizontally, preserving the current path
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Plugin manager
set -g @plugin 'tmux-plugins/tpm'
# Sane defaults for tmux
set -g @plugin 'tmux-plugins/tmux-sensible'
# Enhanced copy and paste functionality
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_selection 'primary' # Use the primary selection for yanking
set -g @yank_selection_mouse 'clipboard' # Use the clipboard for mouse-based yanking
#set -g @yank_action 'copy-pipe-and-cancel' # Yank behavior
set -g @yank_action 'copy-pipe-no-clear' # Yank behavior
# Catppuccin theme configuration
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-cpu' # Plugin for displaying CPU usage
# Window separators and numbering
set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " █"
# Window title styles
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
# Status bar configuration
set -g @catppuccin_status_modules_right "directory cpu host date_time session"
set -g @catppuccin_status_modules_left ""
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_right_separator "█"
# Pane border styles
set -g @catppuccin_pane_border_style "fg=yellow"
set -g @catppuccin_pane_active_border_style "fg=green"
# Date and time format
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M %Z"
# Directory format
set -g @catppuccin_directory_text "#{b:pane_current_path}"
# Theme flavor
set -g @catppuccin_flavour 'macchiato' # Available flavors: 'frappe', 'latte', 'mocha', 'macchiato'
run '~/.tmux/plugins/tpm/tpm' # get it from: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# HOW TO ENABLE THE PLUGINS:
## (prefix below is Ctrl-b by default)
## prefix + I: Installs new plugins from GitHub or any other git repository
## prefix + U: updates plugin(s)
## prefix + alt + u: remove/uninstall plugins not on the plugin list
## prefix + r: reload ~/.tmux.conf
Remove powerline packages (powerline, fonts-powerline) and use tmux-plugin-manager with updated
.tmux.conf
fileRemove installation of
xclip
package in favor ofxsel
Remove line
source "/usr/share/powerline/bindings/tmux/powerline.conf"
from.tmux.conf
Update the tmux screenshot in README