a thing that monitors when kitty windows are focussed and sets the background opacity accordingly
pass i3 or sway compositor event monitor output on stdin thusly:
$ swaymsg --type SUBSCRIBE --monitor '["window"]' | <this tool> 0.95 0.4
...to set opacity to 95% when active and 40% when inactive.