Skip to content

Commit 8643e39

Browse files
temporalilly disable synchronize panes to type in fzf only
1 parent bb1bbd2 commit 8643e39

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

scripts/main.sh

+4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ main() {
4848
items="$(op::get_all_items)"
4949
spinner::stop
5050

51+
synchronize_panes_reset_value=$(tmux::disable_synchronize_panes)
52+
5153
selected_item="$(echo "$items" | awk -F ',' '{ print $1 }' | fzf "${fzf_opts[@]}")"
5254

55+
tmux::set_synchronize_panes "${synchronize_panes_reset_value}"
56+
5357
if [[ -n "$selected_item" ]]; then
5458
selected_item_name=${selected_item#*,}
5559
selected_item_uuid="$(echo "$items" | grep "^$selected_item_name," | awk -F ',' '{ print $2 }')"

scripts/utils/tmux.sh

+13
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,16 @@ tmux::get_option() {
1717
tmux::display_message() {
1818
tmux display-message "tmux-1password: $1"
1919
}
20+
21+
tmux::disable_synchronize_panes() {
22+
if [ "$(tmux show-options -wv synchronize-panes)" == "on" ]; then
23+
tmux::set_synchronize_panes "off"
24+
echo "on"
25+
else
26+
echo "off"
27+
fi
28+
}
29+
30+
tmux::set_synchronize_panes() {
31+
tmux set-window-option synchronize-panes "${1}"
32+
}

0 commit comments

Comments
 (0)