aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2017-06-18 07:04:35 -0600
committerCody Hiar <codyfh@gmail.com>2017-06-18 07:04:35 -0600
commitc55e14868abb14b93ef3b38cf507afa23a987ce3 (patch)
treea9935f22e241620492cfed6873879b1c16d63451
parent154a15d5c3afa693463587e8e5083297e40d89a6 (diff)
Put configs back into separate files
-rwxr-xr-xscripts/check_os.sh9
-rw-r--r--tmux-darwin.config4
-rw-r--r--tmux-linux.config3
-rw-r--r--tmux.config2
4 files changed, 10 insertions, 8 deletions
diff --git a/scripts/check_os.sh b/scripts/check_os.sh
index a538023..6b654af 100755
--- a/scripts/check_os.sh
+++ b/scripts/check_os.sh
@@ -18,14 +18,9 @@ set -euo pipefail
# Main loop of program
main() {
if [ "$(uname)" == "Darwin" ]; then
- bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
- unbind -T copy-mode-vi Enter
- bind-key -T copy-mode-vi Enter copy-pipe "reattach-to-user-namespace pbcopy"
- set-option -g default-command "reattach-to-user-namespace -l zsh"
+ tmux source-file "$HOME/.tmux/tmux-darwin.config"
elif [ "$(uname)" == "Linux" ]; then
- bind -T copy-mode-vi y send -X copy-pipe-and-cancel "tmux save-buffer - | xp"
- unbind -T copy-mode-vi Enter
- bind-key -T copy-mode-vi Enter copy-pipe "tmux save-buffer - | xp"
+ tmux source-file "$HOME/.tmux/tmux-linux.config"
fi
}
main
diff --git a/tmux-darwin.config b/tmux-darwin.config
new file mode 100644
index 0000000..5d38bd8
--- /dev/null
+++ b/tmux-darwin.config
@@ -0,0 +1,4 @@
+bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
+unbind -T copy-mode-vi Enter
+bind-key -T copy-mode-vi Enter copy-pipe "reattach-to-user-namespace pbcopy"
+set-option -g default-command "reattach-to-user-namespace -l zsh"
diff --git a/tmux-linux.config b/tmux-linux.config
new file mode 100644
index 0000000..7777d73
--- /dev/null
+++ b/tmux-linux.config
@@ -0,0 +1,3 @@
+bind -Tcopy-mode-vi y send -X copy-pipe-and-cancel "tmux save-buffer - | xp"
+unbind -T copy-mode-vi Enter
+bind -Tcopy-mode-vi Enter send -X copy-pipe-and-cancel "tmux save-buffer - | xp"
diff --git a/tmux.config b/tmux.config
index ff910f0..0b049d5 100644
--- a/tmux.config
+++ b/tmux.config
@@ -79,7 +79,7 @@ set-option -g status-left "#(~/.tmux/scripts/powerline.sh left)"
set-option -g status-right "#(~/.tmux/scripts/powerline.sh right)"
# Load/Ignore Mac specific options
-# run-shell "bash ~/.tmux/sripts/check_os.sh"
+run-shell "bash ~/.tmux/scripts/check_os.sh"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'