From 6079e9aa792b39121464c290632176e820ed3cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Sat, 2 Mar 2024 15:03:12 +0100 Subject: [PATCH] Initial push --- .gitignore | 1 + plugins/.gitignore | 0 tmux-no-shift.conf | 6 +++++ tmux.conf | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 plugins/.gitignore create mode 100644 tmux-no-shift.conf create mode 100644 tmux.conf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..559ca1c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +plugins/**/ diff --git a/plugins/.gitignore b/plugins/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tmux-no-shift.conf b/tmux-no-shift.conf new file mode 100644 index 0000000..2e2d2be --- /dev/null +++ b/tmux-no-shift.conf @@ -0,0 +1,6 @@ +# From byobu +bind -n F2 new-window +bind -n F3 previous-window +bind -n F4 next-window +bind -n F8 command-prompt -p "(rename-window) " "rename-window '%%'" +bind -n S-F12 source ~/.config/tmux/tmux.conf \; display-message "F-keys: SHIFT" diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..455c8c1 --- /dev/null +++ b/tmux.conf @@ -0,0 +1,66 @@ +# set-option -sa terminal-overrides ",xterm*:Tc" +# set -g mouse on + +unbind C-b +set -g prefix C-a +bind C-a send-prefix + +set -g default-terminal "screen-256color" +set -as terminal-features ",xterm-256color:RGB" + +# # Vim style pane selection +# bind h select-pane -L +# bind j select-pane -D +# bind k select-pane -U +# bind l select-pane -R + +# Start windows and panes at 1, not 0 +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# # Use Alt-arrow keys without prefix key to switch panes +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 + +# From byobu but using S +unbind -n F2 +unbind -n F3 +unbind -n F4 +unbind -n F8 + +bind -n S-F2 new-window +bind -n S-F3 previous-window +bind -n S-F4 next-window +bind -n S-F8 command-prompt -p "(rename-window) " "rename-window '%%'" +bind -n S-F12 source ~/.config/tmux/tmux-no-shift.conf \; display-message "F-keys: NO SHIFT" + +# Shift Alt vim keys to switch windows +# bind -n M-H previous-window +# bind -n M-L next-window + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'kylepeeler/tmux-nightowl' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @nightowl-show-network false +set -g @nightowl-show-weather false +set -g @nightowl-show-powerline true +set -g @nightowl-show-left-icon "" +set -g @nightowl-military-time true + +run '~/.config/tmux/plugins/tpm/tpm' + +# set vi-mode +set-window-option -g mode-keys vi +# keybindings +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel + +bind '|' split-window -v -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" +