refactor: refactor

This commit is contained in:
graelo 2020-05-28 07:07:51 +02:00
parent 791aaadd49
commit 50391320ee
6 changed files with 120 additions and 29 deletions

15
tmux-copyrat.tmux Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEFAULT_COPYRAT_KEY="space"
COPYRAT_KEY=$(tmux show-option -gqv @copyrat-key)
COPYRAT_KEY=${COPYRAT_KEY:-$DEFAULT_COPYRAT_KEY}
BINARY="${CURRENT_DIR}/target/release/tmux-copyrat"
tmux bind-key $COPYRAT_KEY run-shell -b "${BINARY} -T"
if [ ! -f "$BINARY" ]; then
cd "${CURRENT_DIR}" && cargo build --release
fi