The $DISPLAY variable won't be defined on Wayland, so the GUI check
will always fail. Now we try $WAYLAND_DISPLAY too.
# emails. We ignore errors in "tidy" because we expect a bunch of HTML
# warnings to remain. The weird subshell construct is there because I
# don't know how to escape a semicolon.
-text/html; (tidy -quiet -modify %s || true) && /usr/bin/epiphany %s; description=HTML Text; test=test -n "$DISPLAY"; needsterminal;
+text/html; (tidy -quiet -modify %s || true) && /usr/bin/epiphany %s; description=HTML Text; test=test -n "${DISPLAY}${WAYLAND_DISPLAY}"; needsterminal;