Thomas 1 week ago
parent
commit
53e3892c92
9 changed files with 220 additions and 40 deletions
  1. 9 0
      plugins/.gitattributes
  2. 4 0
      plugins/.gitignore
  3. 3 0
      plugins/.gitmodules
  4. 19 0
      plugins/.travis.yml
  5. 1 1
      plugins/tmux-power
  6. 1 1
      plugins/vim-tmux-navigator
  7. 28 38
      tmux.conf
  8. 77 0
      tmux.conf.save
  9. 78 0
      tmux_old.conf

+ 9 - 0
plugins/.gitattributes

@@ -0,0 +1,9 @@
+# Force text files to have unix eols, so Windows/Cygwin does not break them
+*.* eol=lf
+
+# These files are unfortunately not recognized as text files so
+# explicitly listing them here
+tpm eol=lf
+bin/* eol=lf
+bindings/* eol=lf
+tests/* eol=lf

+ 4 - 0
plugins/.gitignore

@@ -0,0 +1,4 @@
+**/.vagrant/
+run_tests
+tests/run_tests_in_isolation
+tests/helpers/helpers.sh

+ 3 - 0
plugins/.gitmodules

@@ -0,0 +1,3 @@
+[submodule "lib/tmux-test"]
+	path = lib/tmux-test
+	url = https://github.com/tmux-plugins/tmux-test.git

+ 19 - 0
plugins/.travis.yml

@@ -0,0 +1,19 @@
+# generic packages and tmux
+before_install:
+  - sudo apt-get update
+  - sudo apt-get install -y git-core expect
+  - sudo apt-get install -y python-software-properties software-properties-common
+  - sudo apt-get install -y libevent-dev libncurses-dev
+  - git clone https://github.com/tmux/tmux.git
+  - cd tmux
+  - git checkout 2.0
+  - sh autogen.sh
+  - ./configure && make && sudo make install
+
+install:
+  - git fetch --unshallow --recurse-submodules || git fetch --recurse-submodules
+  # manual `git clone` required for testing `tmux-test` plugin itself
+  - git clone https://github.com/tmux-plugins/tmux-test lib/tmux-test; true
+  - lib/tmux-test/setup
+
+script: ./tests/run_tests_in_isolation

+ 1 - 1
plugins/tmux-power

@@ -1 +1 @@
-Subproject commit 16bbde801378a70512059541d104c5ae35be32b9
+Subproject commit e68f9e6fb42cf372c2f17b51edc63abb4f6e9558

+ 1 - 1
plugins/vim-tmux-navigator

@@ -1 +1 @@
-Subproject commit 5b3c701686fb4e6629c100ed32e827edf8dad01e
+Subproject commit c45243dc1f32ac6bcf6068e5300f3b2b237e576a

+ 28 - 38
tmux.conf

@@ -1,77 +1,67 @@
-# sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
-# set-option -sa terminal-overrides ",xterm*:Tc"
-# Dont forget to git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
-set -g default-terminal screen-256color
+set -g default-terminal "tmux-256color"
 set -g mouse on
 set -g xterm-keys on
+
 unbind C-b
 set -g prefix C-Space
 bind C-Space send-prefix
 
 set-option -g detach-on-destroy off
-# Vim style pane selection
+
+# Vim-style pane navigation
 bind h select-pane -L
-bind j select-pane -D 
+bind j select-pane -D
 bind k select-pane -U
 bind l select-pane -R
 
-# Pane resizing (vim-like, Shift+HJKL)
+# Resize panes (Alt+HJKL)
 bind -n M-h resize-pane -L 3
 bind -n M-j resize-pane -D 3
 bind -n M-k resize-pane -U 3
 bind -n M-l resize-pane -R 3
 
-# Start windows and panes at 1, not 0
+# Window + pane indexing
 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-H select-pane -L
-# bind -n M-L select-pane -R
-# bind -n M-J select-pane -U
-# bind -n M-K select-pane -D
+set -g renumber-windows on
 
-# Shift arrow to switch windows
-# bind -n S-Left  previous-window
-# bind -n S-Right next-window
-
-# Shift Alt vim keys to switch windows
+# Window switching (Alt+Shift+H/L)
 bind -n M-H previous-window
 bind -n M-L next-window
 
-# set -g @catppuccin_flavour 'mocha'
+# vi-mode copy
+set-window-option -g mode-keys vi
+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
 
-set -g @plugin 'wfxr/tmux-power'
+# Split windows in current path
+bind '"' split-window -v -c "#{pane_current_path}"
+bind %   split-window -h -c "#{pane_current_path}"
+
+# plugins live here (this matches reality)
+set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.config/tmux/plugins"
+
+# TPM + other plugins
 set -g @plugin 'tmux-plugins/tpm'
 set -g @plugin 'tmux-plugins/tmux-sensible'
 set -g @plugin 'christoomey/vim-tmux-navigator'
 set -g @plugin 'tmux-plugins/tmux-yank'
 set -g @plugin 'tmux-plugins/tmux-resurrect'
 set -g @plugin 'tmux-plugins/tmux-continuum'
-
-set -g @tmux_power_theme 'gold'
+set -g @plugin 'wfxr/tmux-power'
 set -g @plugin 'wfxr/tmux-net-speed'
 
-# 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}"
-
-
+# tmux-power options (must be BEFORE sourcing)
+set -g @tmux_power_theme 'gold'
 set -g @tmux_power_show_upload_speed    true
 set -g @tmux_power_show_download_speed  true
 set -g @tmux_power_show_web_reachable   true
-# set -g @tmux_power_right_arrow_icon     ''
-# set -g @tmux_power_left_arrow_icon      ''
 set -g @tmux_power_upload_speed_icon    '󰕒'
 set -g @tmux_power_download_speed_icon  '󰇚'
 set -g @tmux_power_prefix_highlight_pos 'R'
 
-run '~/.tmux/plugins/tpm/tpm'
+# TPM init
+run '~/.config/tmux/plugins/tpm/tpm'
+

+ 77 - 0
tmux.conf.save

@@ -0,0 +1,77 @@
+# sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
+# set-option -sa terminal-overrides ",xterm*:Tc"
+set -g default-terminal screen-256color
+set -g mouse on
+set -g xterm-keys on
+unbind C-b
+set -g prefix C-Space
+bind C-Space send-prefix
+
+set-option -g detach-on-destroy off
+# 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-H select# Pane resizing (vim-like, Shift+HJKL)
+bind -n M-h resize-pane -L 3
+bind -n M-j resize-pane -D 3
+bind -n M-k resize-pane -U 3
+bind -n M-l resize-pane -R 3
+u-pane -L
+# bind -n M-L select-pane -R
+# bind -n M-J select-pane -U
+# bind -n M-K select-pane -D
+
+# Shift arrow to switch windows
+# bind -n S-Left  previous-window
+# bind -n S-Right next-window
+
+# Shift Alt vim keys to switch windows
+bind -n M-H previous-window
+bind -n M-L next-window
+
+# set -g @catppuccin_flavour 'mocha'
+
+set -g @plugin 'wfxr/tmux-power'
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'christoomey/vim-tmux-navigator'
+# set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
+# 
+set -g @plugin 'tmux-plugins/tmux-yank'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+
+set -g @tmux_power_theme 'gold'
+set -g @plugin 'wfxr/tmux-net-speed'
+
+# 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}"
+
+
+set -g @tmux_power_show_upload_speed    true
+set -g @tmux_power_show_download_speed  true
+set -g @tmux_power_show_web_reachable   true
+# set -g @tmux_power_right_arrow_icon     ''
+# set -g @tmux_power_left_arrow_icon      ''
+set -g @tmux_power_upload_speed_icon    '󰕒'
+set -g @tmux_power_download_speed_icon  '󰇚'
+set -g @tmux_power_prefix_highlight_pos 'R'
+
+run '~/.config/tmux/plugins/tpm/tpm'

+ 78 - 0
tmux_old.conf

@@ -0,0 +1,78 @@
+# sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
+# set-option -sa terminal-overrides ",xterm*:Tc"
+# Dont forget to git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
+set -g default-terminal screen-256color
+set -g mouse on
+set -g xterm-keys on
+unbind C-b
+set -g prefix C-Space
+bind C-Space send-prefix
+
+set-option -g detach-on-destroy off
+# Vim style pane selection
+bind h select-pane -L
+bind j select-pane -D 
+bind k select-pane -U
+bind l select-pane -R
+
+# Pane resizing (vim-like, Shift+HJKL)
+bind -n M-h resize-pane -L 3
+bind -n M-j resize-pane -D 3
+bind -n M-k resize-pane -U 3
+bind -n M-l resize-pane -R 3
+
+# 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-H select-pane -L
+# bind -n M-L select-pane -R
+# bind -n M-J select-pane -U
+# bind -n M-K select-pane -D
+
+# Shift arrow to switch windows
+# bind -n S-Left  previous-window
+# bind -n S-Right next-window
+
+# Shift Alt vim keys to switch windows
+bind -n M-H previous-window
+bind -n M-L next-window
+
+# set -g @catppuccin_flavour 'mocha'
+
+set -g @plugin 'wfxr/tmux-power'
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'christoomey/vim-tmux-navigator'
+set -g @plugin 'tmux-plugins/tmux-yank'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+
+set -g @tmux_power_theme 'gold'
+set -g @plugin 'wfxr/tmux-net-speed'
+
+# 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}"
+
+
+set -g @tmux_power_show_upload_speed    true
+set -g @tmux_power_show_download_speed  true
+set -g @tmux_power_show_web_reachable   true
+# set -g @tmux_power_right_arrow_icon     ''
+# set -g @tmux_power_left_arrow_icon      ''
+set -g @tmux_power_upload_speed_icon    '󰕒'
+set -g @tmux_power_download_speed_icon  '󰇚'
+set -g @tmux_power_prefix_highlight_pos 'R'
+
+run '~/.config/tmux/plugins/tpm/tpm'
+