This commit is contained in:
Wateir 2026-04-24 10:58:06 +02:00 committed by GitHub
commit 3570ac99b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -546,6 +546,19 @@ static void usage(void) {
} }
int32_t main(int32_t argc, char *argv[]) { int32_t main(int32_t argc, char *argv[]) {
const char *env_XDG_DEKSTOP = getenv("XDG_CURRENT_DESKTOP");
/*
* https://specifications.freedesktop.org/mime-apps/latest/file.html
* can be more than just 'mango' but 'mango,mangowm,wlroots'
*/
if (!env_XDG_DEKSTOP || !strstr(env_XDG_DEKSTOP, "mango")) {
fprintf(stderr, "wrong dekstop, wanted 'mango' have '%s'\n",
env_XDG_DEKSTOP);
exit(EXIT_FAILURE);
}
ARGBEGIN { ARGBEGIN {
case 'q': case 'q':
qflag = 1; qflag = 1;