diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-10-05 22:13:56 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-10-09 11:04:03 -0600 |
commit | 72a7d78a1a7926a207539eb50f44b2e1eb089d49 (patch) | |
tree | a9e55a9731f66b1dde55f984a5877fb7e5b1e370 | |
parent | d63f4078c51c484a47b1c463912dc6038e787426 (diff) |
make the borders red borders for urgent clients
iirc this is the same behavior of dwm
-rw-r--r-- | config.def.h | 1 | ||||
-rw-r--r-- | dwl.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h index f4c3cae..895284f 100644 --- a/config.def.h +++ b/config.def.h @@ -9,6 +9,7 @@ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will static const unsigned int borderpx = 1; /* border pixel of windows */ static const float bordercolor[] = COLOR(0x444444ff); static const float focuscolor[] = COLOR(0x005577ff); +static const float urgentcolor[] = COLOR(0xff0000ff); /* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */ @@ -2589,10 +2589,14 @@ urgent(struct wl_listener *listener, void *data) { struct wlr_xdg_activation_v1_request_activate_event *event = data; Client *c = NULL; + int i; toplevel_from_wlr_surface(event->surface, &c, NULL); if (!c || c == focustop(selmon)) return; + for (i = 0; i < 4; i++) + wlr_scene_rect_set_color(c->border[i], urgentcolor); + c->isurgent = 1; printstatus(); } @@ -2752,9 +2756,13 @@ void sethints(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_hints); + int i; if (c == focustop(selmon)) return; + for (i = 0; i < 4; i++) + wlr_scene_rect_set_color(c->border[i], urgentcolor); + c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints); printstatus(); } |