aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.def.h2
-rw-r--r--dwl.c18
2 files changed, 18 insertions, 2 deletions
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 */
diff --git a/dwl.c b/dwl.c
index 8983457..f87b05a 100644
--- a/dwl.c
+++ b/dwl.c
@@ -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