From 27b1c7201747ab2dbbed8b07d4986a9049936baa Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 10 Dec 2023 01:13:09 +0100 Subject: activity_bar.pl: Add documentation about terminal focus handling --- activity_bar.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/activity_bar.pl b/activity_bar.pl index 8f576c3..1b5e5b0 100644 --- a/activity_bar.pl +++ b/activity_bar.pl @@ -32,8 +32,18 @@ weechat::hook_command( 'activity_bar', 'Activity Bar commands', '[clear] | [enable|disable]', - 'clear: change AnyBar icon to hollow -enable: enable activity notification + 'To disable activity notifications when WeeChat is focused, turn on terminal focus events: + + /set weechat.startup.command_after_plugins "/print -stdout \033[?1004h\n" + /trigger add reset_focus signal "quit" "" "" "/print -stdout \033[?1004l\n" + +Then disable activity_bar on focus, and enable it on unfocus: + + /key bind meta2-I /activity_bar disable + /key bind meta2-O /activity_bar enable + + clear: change AnyBar icon to hollow + enable: enable activity notification disable: clear the AnyBar icon and disable activity notification', 'clear || enable -- cgit v1.2.3