-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.sh
41 lines (35 loc) · 838 Bytes
/
utils.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#
# Copyright (c) 2024-2025: [email protected]
# License: MIT
#
# Part of https://github.com/jaclu/tmux-keybtest
#
# Common utils
#
[[ -z "$d_tkbtst_location" ]] && {
echo "ERROR: d_tkbtst_location undefined in: $0"
exit 1
}
if [[ -f "$d_tkbtst_location"/.tool-versions ]]; then
# local asdf version defined, ignore potential previous definition of TMUX_CONF
TMUX_BIN="tmux"
else
# Honour it if defined
[[ -z "$TMUX_BIN" ]] && TMUX_BIN="tmux"
fi
#
# provides tmux_vers_ok
#
# shellcheck source=/dev/null
source "$d_tkbtst_location"/tmux-plugin-tools.sh
#
# tmux conf that will be used
#
# shellcheck disable=SC2034
tmux_conf="$d_tkbtst_location"/keybtest.conf
#
# Mouse event helper
#
# shellcheck disable=SC2034
f_mouse_event="$d_tkbtst_location"/tools/mouse_event.sh