From a6f6f71e99f0738efc682bc3e2517dce28b4b4e0 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Fri, 25 Jan 2019 18:32:18 -0700 Subject: Use stow instead of Makefile --- Makefile | 8 ---- stow/install.sh | 1 + stow/tmux/.tmux.conf | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ tmux.config | 101 --------------------------------------------------- 4 files changed, 102 insertions(+), 109 deletions(-) delete mode 100644 Makefile create mode 100755 stow/install.sh create mode 100644 stow/tmux/.tmux.conf delete mode 100644 tmux.config diff --git a/Makefile b/Makefile deleted file mode 100644 index f6144df..0000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -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 -sf $(CURDIR)/tmux.config ~/.tmux.conf - -uninstall: ## Remove the symlink - [[ -L ~/.muttrc ]] && rm ~/.tmux.conf diff --git a/stow/install.sh b/stow/install.sh new file mode 100755 index 0000000..473bdad --- /dev/null +++ b/stow/install.sh @@ -0,0 +1 @@ +stow tmux -t "$HOME" diff --git a/stow/tmux/.tmux.conf b/stow/tmux/.tmux.conf new file mode 100644 index 0000000..4a524fc --- /dev/null +++ b/stow/tmux/.tmux.conf @@ -0,0 +1,101 @@ +##################################### +# Bindings +##################################### + + +# Splits always start in the current pane's working directory +unbind '"' +unbind % +bind '"' split-window -v -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" +# Vim movements +bind C-h select-pane -L +bind C-j select-pane -D +bind C-k select-pane -U +bind C-l select-pane -R +# Kill without prompting +bind x kill-pane +bind & kill-window +# Easy resizing of the pane +bind C-u resize-pane -D 3 +bind C-i resize-pane -U 3 +bind C-y resize-pane -L 3 +bind C-o resize-pane -R 3 +bind j resize-pane -D 3 +bind k resize-pane -U 3 +bind h resize-pane -L 3 +bind l resize-pane -R 3 +# Bind the last window/pane command +bind C-b last-window +bind C-g last-pane +# Bind the last session command +bind C-f switch-client -l +# Faster window switching +bind C-n next-window +bind C-p previous-window +# Synchronize mode, how the fuck did I not know about this +bind a set-window-option synchronize-panes +# Remap zoom, sleeping tmux way too much +bind C-v resize-pane -Z +# Swapping panes shorcut +bind C-e command-prompt -p destination 'swap-pane -s 1.2 -t 2.%1' +# I constantly mix up copy/paste. Very annoying with scripts +unbind [ +bind C-c copy-mode + +##################################### +# Settings +##################################### + +# Setup 'v' to begin selection as in Vim +bind -Tcopy-mode-vi v send -X begin-selection +# Help with the color problems +set -g default-terminal "screen-256color" +# Mouse Scrolling +set-option -g mouse on +# Use vim keybindings in copy mode and help menus +setw -g mode-keys vi +# Set the display panes timeout +set-option -g display-panes-time 4000 +# Make the escape faster, faster command sequences +set -s escape-time 0 +# Deal with screens having different +set-window-option -g aggressive-resize +# Use base 1 numbering, 0 base is a big stretch +set -g base-index 1 +setw -g pane-base-index 1 +# Increase the history +set -g history-limit 20000 + +##################################### +# Colors +##################################### + +# default statusbar colors +set-option -g status-bg default #base02 +set-option -g status-fg colour223 #yellow +# pane border +set-option -g pane-border-fg colour236 #base02 +set-option -g pane-active-border-fg colour239 #base01 +## message text +set-option -g message-bg default #base02 +set-option -g message-fg colour196 #orange +set-option -g status on +set-option -g status-interval 2 +set-option -g status-justify "centre" +set-option -g status-left-length 110 +set-option -g status-right-length 80 +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/scripts/check_os.sh" + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'thornycrackers/tmux-sessionist' +set -g @plugin 'thornycrackers/tmux-drawer' +set -g @plugin 'thornycrackers/tmux-open' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' diff --git a/tmux.config b/tmux.config deleted file mode 100644 index 4a524fc..0000000 --- a/tmux.config +++ /dev/null @@ -1,101 +0,0 @@ -##################################### -# Bindings -##################################### - - -# Splits always start in the current pane's working directory -unbind '"' -unbind % -bind '"' split-window -v -c "#{pane_current_path}" -bind % split-window -h -c "#{pane_current_path}" -# Vim movements -bind C-h select-pane -L -bind C-j select-pane -D -bind C-k select-pane -U -bind C-l select-pane -R -# Kill without prompting -bind x kill-pane -bind & kill-window -# Easy resizing of the pane -bind C-u resize-pane -D 3 -bind C-i resize-pane -U 3 -bind C-y resize-pane -L 3 -bind C-o resize-pane -R 3 -bind j resize-pane -D 3 -bind k resize-pane -U 3 -bind h resize-pane -L 3 -bind l resize-pane -R 3 -# Bind the last window/pane command -bind C-b last-window -bind C-g last-pane -# Bind the last session command -bind C-f switch-client -l -# Faster window switching -bind C-n next-window -bind C-p previous-window -# Synchronize mode, how the fuck did I not know about this -bind a set-window-option synchronize-panes -# Remap zoom, sleeping tmux way too much -bind C-v resize-pane -Z -# Swapping panes shorcut -bind C-e command-prompt -p destination 'swap-pane -s 1.2 -t 2.%1' -# I constantly mix up copy/paste. Very annoying with scripts -unbind [ -bind C-c copy-mode - -##################################### -# Settings -##################################### - -# Setup 'v' to begin selection as in Vim -bind -Tcopy-mode-vi v send -X begin-selection -# Help with the color problems -set -g default-terminal "screen-256color" -# Mouse Scrolling -set-option -g mouse on -# Use vim keybindings in copy mode and help menus -setw -g mode-keys vi -# Set the display panes timeout -set-option -g display-panes-time 4000 -# Make the escape faster, faster command sequences -set -s escape-time 0 -# Deal with screens having different -set-window-option -g aggressive-resize -# Use base 1 numbering, 0 base is a big stretch -set -g base-index 1 -setw -g pane-base-index 1 -# Increase the history -set -g history-limit 20000 - -##################################### -# Colors -##################################### - -# default statusbar colors -set-option -g status-bg default #base02 -set-option -g status-fg colour223 #yellow -# pane border -set-option -g pane-border-fg colour236 #base02 -set-option -g pane-active-border-fg colour239 #base01 -## message text -set-option -g message-bg default #base02 -set-option -g message-fg colour196 #orange -set-option -g status on -set-option -g status-interval 2 -set-option -g status-justify "centre" -set-option -g status-left-length 110 -set-option -g status-right-length 80 -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/scripts/check_os.sh" - -# List of plugins -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'thornycrackers/tmux-sessionist' -set -g @plugin 'thornycrackers/tmux-drawer' -set -g @plugin 'thornycrackers/tmux-open' - -# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run '~/.tmux/plugins/tpm/tpm' -- cgit v1.2.3