diff --git a/docs/example.Xresources b/docs/example.Xresources index 7d10f79..f149c2b 100644 --- a/docs/example.Xresources +++ b/docs/example.Xresources @@ -354,6 +354,10 @@ !! - speedwm.hidetitle: 0 !! +!! Hide unselected title/taskbar. If set to 0, all tasks will be shown. Otherwise only the selected task will be shown. (1/0) +!! + - speedwm.hideunselectedtitle: 0 +!! !! Hide status bar. If set to 0, the status bar will be shown. Otherwise the status bar will not be shown. (1/0) !! - speedwm.hidestatus: 0 diff --git a/options.h b/options.h index df96698..a445414 100644 --- a/options.h +++ b/options.h @@ -212,7 +212,8 @@ static int underlinevoffset = 0; /* How far above the bottom o /* Bar item options */ static int hidebar = 0; /* Hide the bar (1) or show (0) */ static int hidelayout = 0; /* Hide layout indicator (1) or show (0) */ -static int hidetitle = 0; /* Hide title (1) or show (0) */ +static int hidetitle = 0; /* Hide the title part of the bar (1) or show (0) */ +static int hideunselectedtitle = 0; /* Hide unselected title (1) or show (0) */ static int hidestatus = 0; /* Hide status bar (1) or show (0) */ static int hideicon = 0; /* Hide icon (1) or show (0) */ static int hidetags = 0; /* Hide status bar (1) or show (0) */ diff --git a/speedwm.c b/speedwm.c index 77d23f9..67eb6d1 100644 --- a/speedwm.c +++ b/speedwm.c @@ -2346,6 +2346,10 @@ resizebarwin(m); /* if it's not a window, stop */ if (!ISVISIBLE(c)) continue; + /* hide unselected title */ + else if (m->sel != c && hideunselectedtitle) + continue; + /* selected clients */ if (m->sel == c && colorselectedtitle) scm = SchemeTitleSel; diff --git a/xresources.h b/xresources.h index 32a3f0b..a8fc466 100644 --- a/xresources.h +++ b/xresources.h @@ -129,6 +129,7 @@ ResourcePref resources[] = { { "layoutposition", INTEGER, &layoutposition }, { "hidelayout", INTEGER, &hidelayout }, { "hidetitle", INTEGER, &hidetitle }, + { "hideunselectedtitle", INTEGER, &hideunselectedtitle }, { "hideicon", INTEGER, &hideicon }, { "hidetags", INTEGER, &hidetags }, { "hideemptytags", INTEGER, &hideemptytags },