From f5cd194e74e840917622d23029ee0267a7b2df02 Mon Sep 17 00:00:00 2001 From: m1ngsama Date: Thu, 3 Apr 2025 17:21:17 +0800 Subject: [PATCH] add tmux config --- tmux/tmux.conf | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 tmux/tmux.conf diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..3c37f56 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,57 @@ +#set -g default-terminal "tmux-256color" +set -g default-terminal "xterm-256color" +#set -ga terminal-overrides ",*256col*:Tc" +set -ga terminal-overrides ",xterm-256color:Tc" +# action key +unbind C-b +set-option -g prefix C-t +set-option -g repeat-time 0 +set-option -g focus-events on + +#### Key bindings + +set-window-option -g mode-keys vi + +#bind t send-key C-t +# Reload settings +bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!" +# Open current directory +bind o run-shell "open '#{pane_current_path}'" +bind -r e kill-pane -a + +# Moving window +bind-key -n C-S-Left swap-window -t -1 \; previous-window +bind-key -n C-S-Right swap-window -t +1 \; next-window + +#### basic settings + +set-option -g status-justify "left" +#set-option utf8-default on +#set-option -g mouse-select-pane +set-window-option -g mode-keys vi +#set-window-option -g utf8 on +# look'n feel +set-option -g status-fg cyan +set-option -g status-bg black +set -g pane-active-border-style fg=colour166,bg=default +set -g window-style fg=colour10,bg=default +set -g window-active-style fg=colour12,bg=default +set-option -g history-limit 64096 + +set -sg escape-time 10 + + +# allow the title bar to adapt to whatever host you connect to +set -g set-titles on +set -g set-titles-string "#T" + +# import +if-shell "uname -s | grep -q Darwin" "source ~/.config/tmux/macos.conf" + +source ~/.config/tmux/theme.conf +source ~/.config/tmux/statusline.conf +source ~/.config/tmux/utility.conf + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-pain-control' +run '~/.config/tmux/plugins/tpm/tpm'