mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-11 23:50:07 +01:00
refactor: refactor
This commit is contained in:
parent
791aaadd49
commit
50391320ee
6 changed files with 120 additions and 29 deletions
15
tmux-copyrat.tmux
Executable file
15
tmux-copyrat.tmux
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue