Fix kanshi compatibility by using output names instead of descriptions

Kanshi fails to match profiles when output descriptions contain parentheses
like 'Iiyama North America PL2294H2 1207823601758 (DP-3)'. According to
kanshi(5) manual, valid output criteria are:
- Output names (e.g. 'DP-1')
- Manufacturer/Model/Serial without parentheses

This changes store.c to use head->name (e.g. 'DP-3') instead of
head->description, making kanshi profiles work correctly.

Fixes 'no profile matched' error when kanshi tries to apply configurations.
This commit is contained in:
Stefan Zipproth
2025-06-27 16:34:55 +02:00
parent 1fd8447fbb
commit 2e7f3834e0
+3 -3
View File
@@ -204,10 +204,10 @@ int wd_store_config(struct wl_list *outputs) {
};
if (description_index < HEADS_MAX) {
descriptions[description_index] = strdup(head->description);
descriptions[description_index] = strdup(head->name);
// write output config in given format
sprintf(outputConfigs[description_index], "output \"%s\" position %d,%d mode %dx%d@%.4f scale %.2f transform %s",
head->description, output->x, output->y, output->width, output->height, output->refresh / 1.0e3, output->scale,
sprintf(outputConfigs[description_index], "output %s position %d,%d mode %dx%d@%.4f scale %.2f transform %s",
head->name, output->x, output->y, output->width, output->height, output->refresh / 1.0e3, output->scale,
trans_str);
description_index++;
} else {