diff options
author | Cody Hiar <codyfh@gmail.com> | 2017-01-01 22:49:01 +0000 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2017-01-01 22:49:01 +0000 |
commit | eb52f06b57807131310325c59348f31133977be8 (patch) | |
tree | 04a7bea8bdab14ce38394ac2b009dbaa1ed48e3e | |
parent | a0a1c68b3a532766d378df0f8d4e85610c70c7f1 (diff) |
Fixing linux vs mac config
-rw-r--r-- | Makefile | 8 | ||||
-rwxr-xr-x | check_os.sh | 5 | ||||
-rw-r--r-- | mac.tmux.config | 10 | ||||
-rw-r--r-- | template.yml | 2 | ||||
-rw-r--r-- | tmux.config | 10 |
5 files changed, 26 insertions, 9 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4a52e48 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +install: ## Install the symlink + ln -s $(CURDIR)/tmux.config ~/.tmux.conf + +uninstall: ## Remove the sumlink + [[ -L ~/.muttrc ]] && rm ~/.tmux.conf diff --git a/check_os.sh b/check_os.sh new file mode 100755 index 0000000..6995478 --- /dev/null +++ b/check_os.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +if [ "$(uname)" == "Darwin" ]; then + tmux source-file "~/.tmux/mac.tmux.config" +fi diff --git a/mac.tmux.config b/mac.tmux.config new file mode 100644 index 0000000..6dc1089 --- /dev/null +++ b/mac.tmux.config @@ -0,0 +1,10 @@ +# vim: syntax=conf + +# Setup 'v' to begin selection as in Vim +bind -t vi-copy v begin-selection +bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" +# Update default binding of `Enter` to also use copy-pipe +unbind -t vi-copy Enter +bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" +# Allow pbcopy inside of session +set-option -g default-command "reattach-to-user-namespace -l zsh" diff --git a/template.yml b/template.yml index 405b268..47c5c1b 100644 --- a/template.yml +++ b/template.yml @@ -1,5 +1,5 @@ session_name: "${PROJECT}" -start_directory: "/Users/codyhiar/Work/lift/projects/${PROJECT}/code" +start_directory: "~/Work/lift/projects/${PROJECT}/code" shell_command_before: make up windows: - window_name: code diff --git a/tmux.config b/tmux.config index bb8aa15..5c9f87f 100644 --- a/tmux.config +++ b/tmux.config @@ -15,12 +15,6 @@ bind C-j resize-pane -D 3 bind C-k resize-pane -U 3 bind C-h resize-pane -L 3 bind C-l resize-pane -R 3 -# Setup 'v' to begin selection as in Vim -bind -t vi-copy v begin-selection -bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" -# Update default binding of `Enter` to also use copy-pipe -unbind -t vi-copy Enter -bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" # Bind the last window command bind C-b last-window # Bind the last session command @@ -40,8 +34,6 @@ set-option -g mouse on setw -g mode-keys vi # Set the display panes timeout set-option -g display-panes-time 4000 -# Allow pbcopy inside of session -set-option -g default-command "reattach-to-user-namespace -l zsh" # Make the escape faster, faster command sequences set -s escape-time 0 # Deal with screens having different @@ -71,3 +63,5 @@ set-option -g status-right-length 90 set-option -g status-left "#(~/.tmux/powerline.sh left)" set-option -g status-right "#(~/.tmux/powerline.sh right)" +# Load/Ignore Mac specific options +run-shell "bash ~/.tmux/check_os.sh" |