diff options
| -rw-r--r-- | .tmux-osx.conf | 4 | ||||
| -rw-r--r-- | .tmux.conf | 54 | ||||
| -rw-r--r-- | Brewfile | 1 | ||||
| -rw-r--r-- | README.md | 8 |
4 files changed, 26 insertions, 41 deletions
diff --git a/.tmux-osx.conf b/.tmux-osx.conf new file mode 100644 index 0000000..27a3bde --- /dev/null +++ b/.tmux-osx.conf @@ -0,0 +1,4 @@ +# Fix OSX tmux copy issues +# Ref: https://blog.subash.com.au/vim-style-copy-paste-in-tmux/ +set -g default-command "reattach-to-user-namespace -l ${SHELL}" +bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' @@ -1,34 +1,20 @@ -# set -g default-terminal "xterm-256color" - -# vi is good -setw -g mode-keys vi - -# mouse behavior -set-option -g mouse on - -# start indexing from 1 not 0 -set -g base-index 1 -set -g pane-base-index 1 - -# Scroll History -set -g history-limit 10000 - -# Don't allow pane automatic renaming -set-option -g allow-rename off - -# Set ability to capture on start and restore on exit window data when running an application -setw -g alternate-screen on - -# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access. -set -s escape-time 50 - -# Allow the arrow key to be used immediately after changing windows -set-option -g repeat-time 0 - - -# Tmux plugins -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-logging' - -# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run '~/.tmux/plugins/tpm/tpm' +set -g default-terminal "xterm-256color" + +set -g allow-rename off # Don't allow pane automatic renaming +set -g mouse on # mouse behavior +set -g base-index 1 # start indexing from 1 not 0 +set -g pane-base-index 1 # start indexing from 1 not 0 +set -g history-limit 10000 # Scroll History limit +set -g display-time 4000 # messages are displayed for 4 seconds +set -g focus-events on # focus events enabled for terminals that support them +set -g status-keys emacs # emacs binding status commands: https://unix.stackexchange.com/questions/383420/ + +set -s escape-time 50 # lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access. + +setw -g alternate-screen on # allow running alternate screen (term feature) on tmux +setw -g mode-keys vi # Vi mode and copy paste +bind-key -T copy-mode-vi 'v' send-keys -X begin-selection +bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel + +# Load OSX specific configurations to add (fix copy) +if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf' @@ -23,6 +23,7 @@ brew "openssl" brew "tmux" brew "youtube-dl" brew "tree" +brew "reattach-to-user-namespace" # brew "nvm" # brew "yarn" # brew "postgresql" @@ -35,6 +35,7 @@ ln -sf ~/.rc/.netrc ~/.netrc ln -sf ~/.rc/.screenrc ~/.screenrc ln -sf ~/.rc/.terraformrc ~/.terraformrc ln -sf ~/.rc/.tmux.conf ~/.tmux.conf +ln -sf ~/.rc/.tmux-osx.conf ~/.tmux-osx.conf chmod 600 ~/.netrc chmod 600 ~/.terraformrc @@ -170,13 +171,6 @@ source ~/.bash_profile git-crypt unlock ``` -- Setup tmux plugins -```bash -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -brew install ansifilter - -``` - - Setup password store ```bash git clone [email protected]:a14m/.pass ~/.password-store |
