commit b46b4cbaea4d9236d944a5de99c65c5258d52ff2
parent 91100008872b7b508b60011f57dc9aedb925e485
Author: Jake Koroman <jakekoroman@gmail.com>
Date: Thu, 6 Jun 2024 13:52:21 -0400
allow monitors to be optionally configured with their description
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/device-specific/laptop/dwl-hardware.h b/device-specific/laptop/dwl-hardware.h
@@ -9,15 +9,15 @@
/* monitors */
static const MonitorRule monrules[] = {
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
- /* name mfact nmaster scale layout rotate/reflect x y resx resy rate mode adaptive */
- { "NULL", 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 0.0f, 0, 0},
+ /* name/desc mfact nmaster scale layout rotate/reflect x y resx resy rate mode adaptive */
{ "eDP-1", 0.50f, 1, 1.5f, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 480, 2560, 1440, 60.0f, -1, 0},
- { "DP-4", 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 1706, 0, 2560, 1440, 60.0f, -1, 0},
+ { "Pavilion32", 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 1706, 0, 2560, 1440, 60.0f, 1, 0},
+ { NULL, 0.50f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 1706, 0, 0, 0, 0.0f, 0, 0},
};
/* Autostart */
static const char *const autostart[] = {
- "sh", "-c", "gentoo-pipewire-launcher", NULL,
+ "gentoo-pipewire-launcher", "restart", NULL,
"swayidle.sh", NULL,
"preserve_dbus.sh", NULL,
"davmail_launch", NULL,
diff --git a/dwl/dwl.c b/dwl/dwl.c
@@ -1050,7 +1050,7 @@ createmon(struct wl_listener *listener, void *data)
m->tagset[0] = m->tagset[1] = 1;
for (r = monrules; r < END(monrules); r++) {
- if (!r->name || strstr(wlr_output->name, r->name)) {
+ if (!r->name || strstr(wlr_output->name, r->name)|| strstr(wlr_output->description, r->name)) {
m->m.x = r->x;
m->m.y = r->y;
m->mfact = r->mfact;