commit 77e7723

Hubert Hirtz  ·  2020-08-20 12:20:02 +0000 UTC
parent 4997d36
doc: Update example with sway focus or something
1 files changed,  +6, -2
+6, -2
 1@@ -55,7 +55,7 @@ Some settings are required, the others are optional.
 2 	The number of cell that the column for nicknames occupies in the timeline.
 3 	By default, 16.
 4 
 5-# EXAMPLE
 6+# EXAMPLES
 7 
 8 A minimal configuration file to connect to freenode as "Guest123456":
 9 
10@@ -77,7 +77,11 @@ password: A secure password, I guess?
11 highlights:
12 	- guest
13 	- senpai
14-on-highlight: 'if [ %h -eq 0 ]; then notify-send "[%b] %n" "%m"; fi'
15+on-highlight: |
16+    FOCUS=$(swaymsg -t get_tree | jq '..|objects|select(.focused==true)|.name' | grep senpai | wc -l)
17+    if [ %h -eq 0 ] || [ $FOCUS -eq 0 ]; then
18+        notify-send "[%b] %n" "%m"
19+    fi
20 nick-column-width: 12
21 ```
22