@@ -4,30 +4,18 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4
4
5
5
source " $CURRENT_DIR /scripts/helpers.sh"
6
6
source " $CURRENT_DIR /scripts/variables.sh"
7
-
8
- custom_tree_command=" $CURRENT_DIR /scripts/custom_tree.sh"
9
-
10
- command_exists () {
11
- local command=" $1 "
12
- type " $command " > /dev/null 2>&1
13
- }
14
-
15
- tree_command () {
16
- if command_exists " tree" ; then
17
- echo " tree"
18
- else
19
- echo " $custom_tree_command "
20
- fi
21
- }
7
+ source " $CURRENT_DIR /scripts/tree_helpers.sh"
22
8
23
9
set_default_key_binding_options () {
24
10
local tree_command=" $( tree_command) "
25
- if key_not_defined " Tab" ; then
26
- set_tmux_option " ${VAR_KEY_PREFIX} -Tab" " $tree_command | less -S,left,40"
27
- fi
28
- if key_not_defined " Bspace" ; then
29
- set_tmux_option " ${VAR_KEY_PREFIX} -Bspace" " $tree_command | less -S,left,40,focus"
30
- fi
11
+ local tree_key=" $( tree_key) "
12
+ local tree_focus_key=" $( tree_focus_key) "
13
+ local tree_pager=" $( tree_pager) "
14
+ local tree_position=" $( tree_position) "
15
+ local tree_width=" $( tree_width) "
16
+
17
+ set_tmux_option " ${VAR_KEY_PREFIX} -${tree_key} " " $tree_command | ${tree_pager} ,${tree_position} ,${tree_width} "
18
+ set_tmux_option " ${VAR_KEY_PREFIX} -${tree_focus_key} " " $tree_command | ${tree_pager} ,${tree_position} ,${tree_width} ,focus"
31
19
}
32
20
33
21
set_key_bindings () {
0 commit comments