58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
# Start a session if none exists
|
|
new-session -s main
|
|
# Start htop and split window
|
|
set-hook -t main session-created 'send-keys -t main:0 "sudo htop" C-m; split-window'
|
|
# remap prefix from 'C-b' to 'C-a'
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# Use C-b to send prefix twice so it acts on nested session
|
|
bind-key -n C-b send-prefix
|
|
|
|
# split panes using # and -
|
|
bind "#" split-window -h
|
|
bind "-" split-window -v
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# reload config file
|
|
bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf
|
|
|
|
# switch panes using Alt-arrow without prefix
|
|
bind -n M-Left select-pane -L
|
|
bind -n M-Right select-pane -R
|
|
bind -n M-Up select-pane -U
|
|
bind -n M-Down select-pane -D
|
|
|
|
# Options to make tmux more pleasant
|
|
set -g mouse on
|
|
set -g default-terminal "tmux-256color"
|
|
|
|
run $XDG_CONFIG_HOME/tmux/plugins/tmux/catppuccin.tmux
|
|
|
|
# Configure the catppuccin plugin
|
|
set -g @catppuccin_flavor "macchiato"
|
|
set -g @catppuccin_window_status_style "rounded"
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'catppuccin/tmux'
|
|
|
|
# Make the status line pretty and add some modules
|
|
set -g status-right-length 100
|
|
set -g status-left-length 100
|
|
set -g status-left ""
|
|
set -g status-right "#{E:@catppuccin_status_application}"
|
|
# set -agF status-right "#{E:@catppuccin_status_cpu}"
|
|
set -ag status-right "#{E:@catppuccin_status_session}"
|
|
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
|
# set -agF status-right "#{E:@catppuccin_status_battery}"
|
|
set -agF status-right "#{@catppuccin_status_host}"
|
|
|
|
|
|
|
|
# Ensure and load TPM
|
|
if "test ! -d $XDG_CONFIG_HOME/tmux/plugins/tpm" \
|
|
"run 'git clone https://github.com/tmux-plugins/tpm $XDG_CONFIG_HOME/tmux/plugins/tpm && $XDG_CONFIG_HOME/tmux/plugins/tpm/bin/install_plugins'"
|
|
|
|
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm |