From 826f502af0302f4bf54146e42a1729e71205d4a8 Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Wed, 1 Jul 2026 23:53:06 +0200 Subject: [PATCH] Add basic tmux configuration for WSL --- .../group_vars/workstation_dev_wsl.yml | 4 +++ dotfiles/workstation_dev_wsl/.tmux.conf | 27 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 dotfiles/workstation_dev_wsl/.tmux.conf diff --git a/ansible/inventory/group_vars/workstation_dev_wsl.yml b/ansible/inventory/group_vars/workstation_dev_wsl.yml index 2a50925..efccd71 100644 --- a/ansible/inventory/group_vars/workstation_dev_wsl.yml +++ b/ansible/inventory/group_vars/workstation_dev_wsl.yml @@ -6,6 +6,7 @@ workstation_dev_wsl_packages: - lazygit - pinentry-curses - python3-pip + - tmux workstation_dev_wsl_excluded_packages: - pcscd - pinentry-gnome3 @@ -25,3 +26,6 @@ workstation_dev_wsl_dotfiles: - src: .gnupg/gpg-agent.conf dest: .gnupg/gpg-agent.conf mode: "0600" + - src: .tmux.conf + dest: .tmux.conf + mode: "0644" diff --git a/dotfiles/workstation_dev_wsl/.tmux.conf b/dotfiles/workstation_dev_wsl/.tmux.conf new file mode 100644 index 0000000..e46cf4b --- /dev/null +++ b/dotfiles/workstation_dev_wsl/.tmux.conf @@ -0,0 +1,27 @@ +# Prefix and Emacs-style key handling +unbind C-b +set -g prefix C-x +bind C-x send-prefix +set -g status-keys emacs +setw -g mode-keys emacs + +# General behavior +set -g mouse on +set -g base-index 1 +setw -g pane-base-index 1 +set -g renumber-windows on +set -g history-limit 10000 +set -s escape-time 0 +set -g focus-events on + +# Keep the current directory when creating windows and panes +bind c new-window -c "#{pane_current_path}" +bind '"' split-window -v -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" + +# Reload the configuration with C-x r +bind r source-file ~/.tmux.conf \; display-message "tmux configuration reloaded" + +# Terminal capabilities +set -g default-terminal "tmux-256color" +set -as terminal-features ",xterm-256color:RGB"