mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-24 13:54:57 +00:00
Allow customize key otpions
This commit is contained in:
parent
403be0fd1d
commit
8f95d2b6d2
10
README.md
10
README.md
@ -112,6 +112,16 @@ For example:
|
|||||||
set -g @thumbs-key F
|
set -g @thumbs-key F
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### @thumbs-key-options
|
||||||
|
|
||||||
|
Choose which arguments do you want for your key.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
set -g @thumbs-key-options -n
|
||||||
|
```
|
||||||
|
|
||||||
### @thumbs-alphabet
|
### @thumbs-alphabet
|
||||||
|
|
||||||
`default: qwerty`
|
`default: qwerty`
|
||||||
|
@ -2,12 +2,15 @@
|
|||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
DEFAULT_THUMBS_KEY=space
|
DEFAULT_THUMBS_KEY_OPTIONS=""
|
||||||
|
THUMBS_KEY_OPTIONS="$(tmux show-option -gqv @thumbs-key-options)"
|
||||||
|
THUMBS_KEY_OPTIONS=${THUMBS_KEY_OPTIONS:-$DEFAULT_THUMBS_KEY_OPTIONS}
|
||||||
|
|
||||||
|
DEFAULT_THUMBS_KEY=space
|
||||||
THUMBS_KEY="$(tmux show-option -gqv @thumbs-key)"
|
THUMBS_KEY="$(tmux show-option -gqv @thumbs-key)"
|
||||||
THUMBS_KEY=${THUMBS_KEY:-$DEFAULT_THUMBS_KEY}
|
THUMBS_KEY=${THUMBS_KEY:-$DEFAULT_THUMBS_KEY}
|
||||||
|
|
||||||
tmux bind-key "${THUMBS_KEY}" run-shell -b "${CURRENT_DIR}/tmux-thumbs.sh"
|
tmux bind-key ${THUMBS_KEY_OPTIONS:+"$THUMBS_KEY_OPTIONS"} ${THUMBS_KEY:+"$THUMBS_KEY"} run-shell -b "${CURRENT_DIR}/tmux-thumbs.sh"
|
||||||
|
|
||||||
BINARY="${CURRENT_DIR}/target/release/thumbs"
|
BINARY="${CURRENT_DIR}/target/release/thumbs"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user