aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2017-04-27 21:07:27 -0600
committerCody Hiar <codyfh@gmail.com>2017-04-27 21:07:27 -0600
commit309766d94c9ef91c2d331f71c995c07c4a521c48 (patch)
treedc6f230604e72e00bd64805b8b2477b563e65bc0
parent5e4f8117bec145f76b8193181338a80451114154 (diff)
Moved drawer to tmux plugin
-rwxr-xr-xscripts/bottom_window_drawer.sh29
-rw-r--r--tmux.config3
2 files changed, 1 insertions, 31 deletions
diff --git a/scripts/bottom_window_drawer.sh b/scripts/bottom_window_drawer.sh
deleted file mode 100755
index 7c3dcaf..0000000
--- a/scripts/bottom_window_drawer.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-# vim: set filetype=sh :
-#
-# Author: Cody Hiar
-# Date: 2017-04-25
-#
-# Purpose: To either close or open a bottom drawer window
-#
-# Set options:
-# e: Stop script if command fails
-# u: Stop script if unset variable is referenced
-# x: Debug, print commands as they are executed
-set -eu
-
-# Immutable globals
-readonly ARGS=( "$@" )
-readonly PROGNAME=$(basename "$0")
-
-# Main loop of program
-main() {
- NUM_PANES=$(tmux list-panes | wc -l)
- if [[ "$NUM_PANES" == 1 ]]; then
- tmux split-window -c '#{pane_current_path}'
- tmux resize-pane -t 2 -y 20
- else
- tmux kill-pane -t 2
- fi
-}
-main
diff --git a/tmux.config b/tmux.config
index 6fcc4b3..90e7590 100644
--- a/tmux.config
+++ b/tmux.config
@@ -26,8 +26,6 @@ bind C-p previous-window
bind a set-window-option synchronize-panes
# Remap zoom, sleeping tmux way too much
bind C-v resize-pane -Z
-# Binding for bottom drawer script
-bind C-m run-shell "$HOME/.tmux/scripts/bottom_window_drawer.sh"
#####################################
# Settings
@@ -78,6 +76,7 @@ run-shell "bash ~/.tmux/check_os.sh"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sessionist'
+set -g @plugin 'thornycrackers/tmux-drawer'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'