aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-05-22 13:28:54 -0400
committerDeterminant <tederminant@gmail.com>2020-05-22 13:28:54 -0400
commite729aa4e0a63bbda2dedf3b12df402395e8b73e8 (patch)
tree760dfd92fa0f06decaec71b1c5e6e24e35c99e14
parentb231f4b49785e93eda0341c24c626be9f2e082e3 (diff)
add bootstrap script for lazy people
-rw-r--r--README.rst7
-rwxr-xr-xbootstrap.sh15
2 files changed, 17 insertions, 5 deletions
diff --git a/README.rst b/README.rst
index f123485..4064bf8 100644
--- a/README.rst
+++ b/README.rst
@@ -32,13 +32,10 @@ Features
TLDR; I just want it
====================
-- Paste the following to your new ``~/.tmux.conf``:
+- Execute the following line in your shell:
::
- set -g @plugin 'tmux-plugins/tpm'
- set -g @plugin 'tmux-plugins/tmux-sensible'
- set -g @plugin 'tmux-plugins/tmux-colortag'
- run -b '~/.tmux/plugins/tpm/tpm'
+ curl -sS https://raw.githubusercontent.com/Determinant/tmux-colortag/master/bootstrap.sh | bash
- Run ``tmux``, and then hit ``prefix`` + ``I`` so everything should be ready.
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..15f5d0e
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+if [[ ! -d ~/.tmux ]]; then
+ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
+fi
+if [[ -f ~/.tmux.conf ]]; then
+ echo "Old tmux configuration detected, remove it before running."
+ exit 1
+fi
+cat > ~/.tmux.conf << EOF
+set-option -g status-position top
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-sensible'
+set -g @plugin 'tmux-plugins/tmux-colortag'
+run -b '~/.tmux/plugins/tpm/tpm'
+EOF