1
0
mirror of https://github.com/emersion/kanshi synced 2024-09-18 09:51:36 +02:00

Make match_profile_output more strict

If "DP-1" is specified in the config, it could match a connected "eDP-1" head.
This commit is contained in:
Simon Ser 2019-06-06 08:29:28 +03:00
parent a348c8e875
commit 46d1b9feb8
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

3
main.c
View File

@ -17,7 +17,8 @@ static bool match_profile_output(struct kanshi_profile_output *output,
// TODO: improve vendor/model/serial matching
return strcmp(output->name, "*") == 0 ||
strcmp(output->name, head->name) == 0 ||
strstr(head->description, output->name) != NULL;
(strchr(output->name, ' ') != NULL &&
strstr(head->description, output->name) != NULL);
}
static bool match_profile(struct kanshi_state *state,