diff options
| author | Alexander Leonhardt <equinox.salexander@gmail.com> | |
|---|---|---|
| 2026-09-12 15:37:49 +0200 | ||
| committer | Alexander Leonhardt <equinox.salexander@gmail.com> | |
| 2026-09-12 15:37:49 +0200 | ||
| commit | 8274317473737359070d0873aad4e3415a39ebd5 (patch) | |
| tree | 1ae8818b8a9b748d3a19cb41462d9f49da4ce9b5 | |
| parent | 090ce35749142dfeb86c0f43098dcd3b2b6de6a5 (diff) | |
| download | dwl-8274317473737359070d0873aad4e3415a39ebd5.tar.gz dwl-8274317473737359070d0873aad4e3415a39ebd5.tar.bz2 dwl-8274317473737359070d0873aad4e3415a39ebd5.zip | |
Added specific highlighting for tmux window
diff --git a/config.def.h b/config.def.h index 44608ad..f005aac 100644 --- a/config.def.h +++ b/config.def.h @@ -25,6 +25,8 @@ static uint32_t colors[][3] = { [SchemeTitle] = { 0x00CCEEff, 0x222222ff, 0x770000ff }, }; +static const float tmux_color[] = COLOR(0x880088FF); + #define SCRATCHPAD_COUNT 1 /* tagging - TAGCOUNT must be no greater than 31 */ /* tagging */ @@ -1824,7 +1824,13 @@ focusclient(Client *c, int lift) * handling a drag operation */ if (!exclusive_focus && !seat->drag) { - client_set_border_color(c, (float[])COLOR(colors[SchemeSel][ColBorder])); + const char *title = client_get_title(c); + if (title && strstr(title,"[tmux]")) { + client_set_border_color(c, tmux_color); + } + else { + client_set_border_color(c, (float[])COLOR(colors[SchemeSel][ColBorder])); + } client_set_dimmer_state(c, 0); } } @@ -3591,8 +3597,16 @@ void updatetitle(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_title); - if (c == focustop(c->mon)) + if (c == focustop(c->mon)) { drawbars(); + const char *title = client_get_title(c); + if (title && strstr(title,"[tmux]")) { + client_set_border_color(c, tmux_color); + } + else { + client_set_border_color(c, (float[])COLOR(colors[SchemeSel][ColBorder])); + } + } } void |