rename err to bash-bear
[distro-setup] / prof-notify
1 #!/bin/bash
2 set -e; . /usr/local/lib/bash-bear; set +e
3
4 while read -r line; do
5 # check that the profanity window is not focused
6 if ! i3-msg -t get_tree | jq -e '.nodes[].nodes[].nodes[].nodes[] | select(.focused==true and .name=="profanity — Konsole") |.name' &>/dev/null; then
7 # the profanity tag makes it so new notification replaces old.
8 dunstify -h string:x-dunst-stack-tag:profanity $line
9 fi
10 done