diff --git a/tmux-thumbs.sh b/tmux-thumbs.sh index 27a2c79..1cae4d4 100755 --- a/tmux-thumbs.sh +++ b/tmux-thumbs.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +source ~/.bash_profile + CURRENT_PANE_ID=$(tmux list-panes -F "#{pane_id}:#{?pane_active,active,nope}" | grep active | cut -d: -f1) COMMAND="tmux-thumbs -a qwerty -r -u --tmux-pane ${CURRENT_PANE_ID}" NEW_ID=$(tmux new-window -P -d -n "[thumbs]" ${COMMAND}) diff --git a/tmux-thumbs.tmux b/tmux-thumbs.tmux index 7a1e442..7bb89c4 100755 --- a/tmux-thumbs.tmux +++ b/tmux-thumbs.tmux @@ -1,3 +1,5 @@ #!/usr/bin/env bash -tmux bind-key space run-shell "/home/ubuntu/dev/tmux-thumbs/tmux-thumbs.sh" +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +tmux bind-key space run-shell "${CURRENT_DIR}/tmux-thumbs.sh"