forked from tmux-plugins/tmux-logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging.tmux
executable file
·34 lines (27 loc) · 1.12 KB
/
logging.tmux
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
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_DIR/scripts/variables.sh"
source "$CURRENT_DIR/scripts/shared.sh"
setup_logging_key_binding() {
local key="$(get_tmux_option "$logging_key_option" "$default_logging_key")"
tmux bind-key "$key" run-shell "$CURRENT_DIR/scripts/toggle_logging.sh"
}
setup_screen_capture_key_binding() {
local key="$(get_tmux_option "$pane_screen_capture_key_option" "$default_pane_screen_capture_key")"
tmux bind-key "$key" run-shell "$CURRENT_DIR/scripts/screen_capture.sh"
}
setup_save_complete_history_key_binding() {
local key="$(get_tmux_option "$save_complete_history_key_option" "$default_save_complete_history_key")"
tmux bind-key "$key" run-shell "$CURRENT_DIR/scripts/save_complete_history.sh"
}
setup_clear_history_key_binding() {
local key="$(get_tmux_option "$clear_history_key_option" "$default_clear_history_key")"
tmux bind-key "$key" run-shell "$CURRENT_DIR/scripts/clear_history.sh"
}
main() {
setup_logging_key_binding
setup_screen_capture_key_binding
setup_save_complete_history_key_binding
setup_clear_history_key_binding
}
main