From 2b6e09cf5b9fbea06c8fbdb2cc9e247d078e89be Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Sun, 11 May 2025 12:02:18 +0200 Subject: [PATCH] Add tmux config --- .chezmoiexternal.toml | 6 ++++ dot_config/tmux/tmux.conf | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 dot_config/tmux/tmux.conf diff --git a/.chezmoiexternal.toml b/.chezmoiexternal.toml index f605d13..dce38bc 100644 --- a/.chezmoiexternal.toml +++ b/.chezmoiexternal.toml @@ -22,4 +22,10 @@ exact = true stripComponents = 1 refreshPeriod = "168h" +[".config/tmux/plugins/tpm"] + type = "archive" + url = "https://github.com/tmux-plugins/tpm/archive/master.tar.gz" + exact = true + stripComponents = 1 + refreshPeriod = "168h" diff --git a/dot_config/tmux/tmux.conf b/dot_config/tmux/tmux.conf new file mode 100644 index 0000000..f80ea17 --- /dev/null +++ b/dot_config/tmux/tmux.conf @@ -0,0 +1,58 @@ +set -s exit-empty off + +set-option -sa terminal-overrides ',xterm*:Tc' +set -g mouse on +set -ga terminal-overrides ',*256color*:smcup@:rmcup@' + +unbind C-b +set -g prefix C-a +bind C-a send-prefix + +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set -g renumber-windows on + +set -g @plugin "tmux-plugins/tpm" +set -g @plugin "tmux-plugins/tmux-sensible" +set -g @plugin "tmux-plugins/tmux-yank" +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'AngryMorrocoy/tmux-neolazygit' +set -g @plugin 'alexwforsythe/tmux-which-key' +set -g @plugin 'erikw/tmux-powerline' + +set -g @plugin "catppuccin/tmux" + +set -g @catpuccin_flavour 'mocha' + +run "~/.tmux/plugins/tmp/tpm" + +set -g status-keys vi +setw -g mode-keys vi +set -g history-limit 10000 + +bind-key -T copy-mode v send-keys -X begin-selection +bind-key -T copy-mode C-v send-keys -X rectangle-toggle +bind-key -T copy-mode y send-keys -X copy-selection-and-cancel + +bind-key Escape copy-mode +bind-key p paste-buffer + +bind '"' split-window -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" + +bind-key "C-f" run-shell "sesh connect \"$( + sesh list --icons | fzf-tmux -p 80%,70% \ + --no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \ + --header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \ + --bind 'tab:down,btab:up' \ + --bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \ + --bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \ + --bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \ + --bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \ + --bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \ + --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \ + --preview-window 'right:55%' \ + --preview 'sesh preview {}' +)\"" +