mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add Tmux
Being able to use a unified terminal setup between local and remote hosts has some real advantages.
This commit is contained in:
64
config/tmux/tmux.conf
Normal file
64
config/tmux/tmux.conf
Normal file
@@ -0,0 +1,64 @@
|
||||
# Reload config
|
||||
unbind r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
# Themeing
|
||||
source-file ~/.config/omarchy/current/theme/tmux.conf
|
||||
|
||||
# General
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",*:RGB"
|
||||
set -g mouse on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g renumber-windows on
|
||||
set -g history-limit 50000
|
||||
set -g escape-time 0
|
||||
set -g focus-events on
|
||||
set -g set-clipboard on
|
||||
setw -g aggressive-resize on
|
||||
set -g detach-on-destroy off
|
||||
|
||||
# Status bar
|
||||
set -g status-position top
|
||||
set -g status-interval 5
|
||||
set -g status-left-length 30
|
||||
set -g status-right-length 50
|
||||
set -g window-status-separator ""
|
||||
|
||||
# Vi mode for copy
|
||||
setw -g mode-keys vi
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
|
||||
# Saner splits that open in the same directory
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# Pane navigation
|
||||
unbind Left
|
||||
unbind Down
|
||||
unbind Up
|
||||
unbind Right
|
||||
bind Left select-pane -L
|
||||
bind Down select-pane -D
|
||||
bind Up select-pane -U
|
||||
bind Right select-pane -R
|
||||
|
||||
# Pane resizing
|
||||
bind -r S-Left resize-pane -L 5
|
||||
bind -r S-Down resize-pane -D 5
|
||||
bind -r S-Up resize-pane -U 5
|
||||
bind -r S-Right resize-pane -R 5
|
||||
|
||||
# Window navigation
|
||||
unbind PPage
|
||||
bind PPage previous-window
|
||||
bind NPage next-window
|
||||
|
||||
# New windows in same directory
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
# Sessions
|
||||
bind C new-session
|
||||
bind X kill-session
|
||||
26
default/themed/tmux.conf.tpl
Normal file
26
default/themed/tmux.conf.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
# Status bar
|
||||
set -g status-style "bg={{ background }},fg={{ foreground }}"
|
||||
|
||||
# Left: session name
|
||||
set -g status-left "#[fg={{ background }},bg={{ accent }},bold] #S #[bg={{ background }}] "
|
||||
|
||||
# Right: hostname + prefix indicator
|
||||
set -g status-right "#[fg={{ accent }}]#{?client_prefix,PREFIX ,}#[fg={{ color8 }}]#h "
|
||||
|
||||
# Window tabs
|
||||
set -g window-status-format "#[fg={{ color8 }}] #I:#W "
|
||||
set -g window-status-current-format "#[fg={{ accent }},bold] #I:#W "
|
||||
|
||||
# Pane borders
|
||||
set -g pane-border-style "fg={{ color8 }}"
|
||||
set -g pane-active-border-style "fg={{ accent }}"
|
||||
|
||||
# Messages
|
||||
set -g message-style "bg={{ background }},fg={{ accent }}"
|
||||
set -g message-command-style "bg={{ background }},fg={{ accent }}"
|
||||
|
||||
# Copy mode
|
||||
set -g mode-style "bg={{ accent }},fg={{ background }}"
|
||||
|
||||
# Clock
|
||||
setw -g clock-mode-colour "{{ accent }}"
|
||||
@@ -120,6 +120,7 @@ swayosd
|
||||
system-config-printer
|
||||
tldr
|
||||
tree-sitter-cli
|
||||
tmux
|
||||
tobi-try
|
||||
ttf-cascadia-mono-nerd
|
||||
ttf-ia-writer
|
||||
|
||||
9
migrations/1770638893.sh
Normal file
9
migrations/1770638893.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
echo "Add Tmux as an option with themed styling"
|
||||
|
||||
omarchy-pkg-add tmux
|
||||
|
||||
if [[ ! -f ~/.config/tmux/tmux.conf ]]; then
|
||||
mkdir -p ~/.config/tmux
|
||||
cp $OMARCHY/config/tmux/tmux.config ~/.config/tmux/tmux.conf
|
||||
omarchy-theme-reset
|
||||
fi
|
||||
Reference in New Issue
Block a user