mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -04:00
Merge e35f4939de into b9c6a2c196
This commit is contained in:
commit
3570ac99b8
1 changed files with 13 additions and 0 deletions
13
mmsg/mmsg.c
13
mmsg/mmsg.c
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue