summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.tmux-osx.conf4
-rw-r--r--.tmux.conf54
-rw-r--r--Brewfile1
-rw-r--r--README.md8
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'
diff --git a/.tmux.conf b/.tmux.conf
index bb0ca49..02b28e8 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -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'
diff --git a/Brewfile b/Brewfile
index f0c7610..8c54c43 100644
--- a/Brewfile
+++ b/Brewfile
@@ -23,6 +23,7 @@ brew "openssl"
brew "tmux"
brew "youtube-dl"
brew "tree"
+brew "reattach-to-user-namespace"
# brew "nvm"
# brew "yarn"
# brew "postgresql"
diff --git a/README.md b/README.md
index dd87493..31cd099 100644
--- a/README.md
+++ b/README.md
@@ -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