From 3f0d7a55e34b2b0c7e1595fd46468b45fa52bcc2 Mon Sep 17 00:00:00 2001 From: Jake Runyan Date: Mon, 9 Sep 2024 17:04:03 -0700 Subject: [PATCH] Add tmux --- tmux/README.md | 29 +++++++++++++++++++++++++++ tmux/tmux.conf | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 tmux/README.md create mode 100644 tmux/tmux.conf diff --git a/tmux/README.md b/tmux/README.md new file mode 100644 index 0000000..2e59d5f --- /dev/null +++ b/tmux/README.md @@ -0,0 +1,29 @@ +# Tmux +My custom tmux configuration. + +## Requirements +tmux >= 3.1 + +## Installation + +1. Clone this repo and link `tmux.conf` to `~/.tmux.conf`. Note it's a hidden file in this default configuration. +``` +ln -sfn /path/to/dotfiles/tmux/tmux.conf ~/.tmux.conf +``` +2. Clone the TPM repo directly into the config folder. +``` +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +``` +3. Reopen terminal or re-source tmux. +``` +tmux source ~/.tmux.conf +``` + +## Plugins Notes + +### TPM +Tmux Package Manager is de facto package manager for tmux. + +## Shortcut Reference +`` key combo is `C-a` by default (Ctrl + a), changed from standard `C-b`. +``` diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..1397db9 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,54 @@ +# Custom tmux config. +# @jrunyan +# https://github.com/runyanjake/tmux + +### Theme + +# Window +set -g set-titles on +set -g set-titles-string '#W - Tmux' +set -g base-index 1 +set -g window-status-format "#[fg=colour239,bg=colour222] #I:#W " +set -g window-status-style fg=colour239,bg=colour208 + +# Pane +set -g pane-base-index 1 +set -g pane-border-style "fg=colour239,bg=default" +set -g pane-active-border-style "fg=colour215,bg=default" + +# Status Bar +set -g status-position top +set -g status-bg colour215 +set -g status-fg colour239 +set -g status-left-length 40 +set -g status-right-length 100 +set -g status-left '#[bg=colour236,fg=gray] [#S] ' + +### Functionality + +# Set custom prefix key +unbind C-b +set -g prefix C-Space +bind C-Space send-prefix + +# Split panes using | and - +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +# Enable mouse support +set -g mouse on + +# Allow the terminal to scrollback +set -g history-limit 10000 + +### Plugins + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' + +# Initialize tmux plugin manager (Keep @ bottom of file) +run ~/.tmux/plugins/tpm/tpm +