From c55e14868abb14b93ef3b38cf507afa23a987ce3 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Sun, 18 Jun 2017 07:04:35 -0600 Subject: Put configs back into separate files --- scripts/check_os.sh | 9 ++------- tmux-darwin.config | 4 ++++ tmux-linux.config | 3 +++ tmux.config | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 tmux-darwin.config create mode 100644 tmux-linux.config 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' -- cgit v1.2.3