From 417b17d89f65baadf257ee1b30f537e138e8eec8 Mon Sep 17 00:00:00 2001 From: Ferran Basora Date: Wed, 6 Mar 2019 17:04:05 +0000 Subject: [PATCH] Fix paths --- tmux-thumbs.sh | 2 ++ tmux-thumbs.tmux | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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"