dotfiles/.config/tmux/tmux.conf

58 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-03-19 21:18:01 +01:00
# Start a session if none exists
new-session -s main
# Start htop and split window
2021-12-20 17:12:22 +01:00
set-hook -t main session-created 'send-keys -t main:0 "sudo htop" C-m; split-window'
2016-04-16 16:31:54 +02:00
# 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
2024-06-20 09:19:24 +02:00
# split panes using # and -
bind "#" split-window -h
bind "-" split-window -v
2016-04-16 16:31:54 +02:00
unbind '"'
unbind %
2020-10-11 19:59:56 +02:00
# reload config file
bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf
2016-04-16 16:31:54 +02:00
# 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"
2018-12-28 23:51:01 +01:00
run $XDG_CONFIG_HOME/tmux/plugins/tmux/catppuccin.tmux
2020-07-02 12:55:35 +02:00
# Configure the catppuccin plugin
set -g @catppuccin_flavor "macchiato"
set -g @catppuccin_window_status_style "rounded"
2016-04-16 16:31:54 +02:00
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'catppuccin/tmux'
2016-04-16 16:31:54 +02:00
# 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}"
2016-04-16 16:31:54 +02:00
2024-06-20 09:19:24 +02:00
# 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'"
2016-04-16 16:31:54 +02:00
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm