use hide options
This commit is contained in:
parent
2bc08520d9
commit
d65c4d6a55
|
@ -1,17 +1,26 @@
|
|||
int
|
||||
width_ltsymbol(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
return TEXTW(bar->mon->ltsymbol);
|
||||
if (selmon->hidelayout)
|
||||
return 0;
|
||||
else
|
||||
return TEXTW(bar->mon->ltsymbol);
|
||||
}
|
||||
|
||||
int
|
||||
draw_ltsymbol(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, bar->mon->ltsymbol, 0, False);
|
||||
if (selmon->hidelayout)
|
||||
return 0;
|
||||
else
|
||||
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, bar->mon->ltsymbol, 0, False);
|
||||
}
|
||||
|
||||
int
|
||||
click_ltsymbol(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
return ClkLtSymbol;
|
||||
if (selmon->hidelayout)
|
||||
return 0;
|
||||
else
|
||||
return ClkLtSymbol;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,28 @@
|
|||
int
|
||||
width_status_basic(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
return TEXTW(stext);
|
||||
if (selmon->hidestatus)
|
||||
return 0;
|
||||
else
|
||||
return TEXTW(stext);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
draw_status_basic(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, stext, 0, True);
|
||||
if (selmon->hidestatus)
|
||||
return 0;
|
||||
else
|
||||
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, stext, 0, True);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
click_status_basic(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
return ClkStatusText;
|
||||
if (selmon->hidestatus)
|
||||
return 0;
|
||||
else
|
||||
return ClkStatusText;
|
||||
}
|
||||
|
|
|
@ -4,13 +4,19 @@ static char lastbutton[] = "-";
|
|||
int
|
||||
width_status(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
return textlength(rawstext) + lrpad;
|
||||
if (selmon->hidestatus)
|
||||
return 0;
|
||||
else
|
||||
return textlength(rawstext) + lrpad;
|
||||
}
|
||||
|
||||
int
|
||||
draw_status(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
return drawstatustext(a->x, rawstext);
|
||||
if (selmon->hidestatus)
|
||||
return 0;
|
||||
else
|
||||
return drawstatustext(a->x, rawstext);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -158,7 +164,10 @@ textlength(char* stext)
|
|||
int
|
||||
click_status(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
return click_status_text(arg, a->rel_x, rawstext);
|
||||
if (selmon->hidestatus)
|
||||
return 0;
|
||||
else
|
||||
return click_status_text(arg, a->rel_x, rawstext);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
int
|
||||
width_tags_basic(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
if (selmon->hidetags)
|
||||
return 0;
|
||||
|
||||
int w, i;
|
||||
|
||||
for (w = 0, i = 0; i < LENGTH(tags); i++) {
|
||||
|
@ -12,6 +15,9 @@ width_tags_basic(Bar *bar, BarWidthArg *a)
|
|||
int
|
||||
draw_tags_basic(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
if (selmon->hidetags)
|
||||
return 0;
|
||||
|
||||
int invert;
|
||||
int w, x = a->x;
|
||||
int boxs = drw->font->h / 9;
|
||||
|
@ -43,6 +49,9 @@ draw_tags_basic(Bar *bar, BarDrawArg *a)
|
|||
int
|
||||
click_tags_basic(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
if (selmon->hidetags)
|
||||
return 0;
|
||||
|
||||
int i = 0, x = lrpad / 2;
|
||||
|
||||
do {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
int
|
||||
width_tags(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
if (selmon->hidetags)
|
||||
return 0;
|
||||
|
||||
int w, i;
|
||||
unsigned int occ = 0;
|
||||
int plw = drw->font->h / 2 + 1;
|
||||
|
@ -22,6 +25,9 @@ width_tags(Bar *bar, BarWidthArg *a)
|
|||
int
|
||||
draw_tags(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
if (selmon->hidetags)
|
||||
return 0;
|
||||
|
||||
int x, w;
|
||||
int invert;
|
||||
int plw = drw->font->h / 2 + 1;
|
||||
|
@ -83,6 +89,9 @@ draw_tags(Bar *bar, BarDrawArg *a)
|
|||
int
|
||||
click_tags(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
if (selmon->hidetags)
|
||||
return 0;
|
||||
|
||||
int i = 0, x = lrpad / 2;
|
||||
int plw = drw->font->h / 2 + 1;
|
||||
unsigned int occ = 0;
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
int
|
||||
width_title_basic(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
if (selmon->hidetitle)
|
||||
return 0;
|
||||
|
||||
return a->max_width;
|
||||
}
|
||||
|
||||
int
|
||||
draw_title_basic(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
if (selmon->hidetitle)
|
||||
return 0;
|
||||
|
||||
int boxs = drw->font->h / 9;
|
||||
int boxw = drw->font->h / 6 + 2;
|
||||
int x = a->x, w = a->w;
|
||||
|
@ -31,5 +37,8 @@ draw_title_basic(Bar *bar, BarDrawArg *a)
|
|||
int
|
||||
click_title_basic(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
if (selmon->hidetitle)
|
||||
return 0;
|
||||
|
||||
return ClkWinTitle;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
int
|
||||
width_title(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
if (selmon->hidetitle)
|
||||
return 0;
|
||||
|
||||
return a->max_width;
|
||||
}
|
||||
|
||||
int
|
||||
draw_title(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
if (selmon->hidetitle)
|
||||
return 0;
|
||||
|
||||
int n = 0, scm, remainder = 0, tabw, padding;
|
||||
unsigned int i;
|
||||
int x = a->x, w = a->w;
|
||||
|
@ -52,6 +58,9 @@ draw_title(Bar *bar, BarDrawArg *a)
|
|||
int
|
||||
click_title(Bar *bar, Arg *arg, BarClickArg *a)
|
||||
{
|
||||
if (selmon->hidetitle)
|
||||
return 0;
|
||||
|
||||
int x = 0, n = 0;
|
||||
Client *c;
|
||||
|
||||
|
|
20
colors.h
20
colors.h
|
@ -45,19 +45,19 @@ static char *colstatus[] = {
|
|||
/* Alpha to use for opacity */
|
||||
static unsigned int alphas[][3] = {
|
||||
/* fg bg border/unused */
|
||||
[SchemeBar] = { OPAQUE, baropacity, baropacity },
|
||||
[SchemeTitleNorm] = { OPAQUE, normtitleopacity, normtitleopacity },
|
||||
[SchemeTitleSel] = { OPAQUE, seltitleopacity, seltitleopacity },
|
||||
[SchemeTitleHidden] = { OPAQUE, hiddenopacity, hiddenopacity },
|
||||
[SchemeLayout] = { OPAQUE, layoutopacity, layoutopacity },
|
||||
[SchemeStatus] = { OPAQUE, statusopacity, statusopacity },
|
||||
[SchemeBorderNorm] = { OPAQUE, normborderopacity, selborderopacity },
|
||||
[SchemeBorderSel] = { OPAQUE, normborderopacity, selborderopacity },
|
||||
[SchemeBorderUrg] = { OPAQUE, normborderopacity, selborderopacity },
|
||||
[SchemeBar] = { opaque, baropacity, baropacity },
|
||||
[SchemeTitleNorm] = { opaque, normtitleopacity, normtitleopacity },
|
||||
[SchemeTitleSel] = { opaque, seltitleopacity, seltitleopacity },
|
||||
[SchemeTitleHidden] = { opaque, hiddenopacity, hiddenopacity },
|
||||
[SchemeLayout] = { opaque, layoutopacity, layoutopacity },
|
||||
[SchemeStatus] = { opaque, statusopacity, statusopacity },
|
||||
[SchemeBorderNorm] = { opaque, normborderopacity, selborderopacity },
|
||||
[SchemeBorderSel] = { opaque, normborderopacity, selborderopacity },
|
||||
[SchemeBorderUrg] = { opaque, normborderopacity, selborderopacity },
|
||||
[SchemeTagsNorm] = { tagselopacity, tagselopacity, tagnormopacity },
|
||||
[SchemeTagsSel] = { tagselopacity, tagselopacity, tagnormopacity },
|
||||
[SchemeTagsUrg] = { tagselopacity, tagselopacity, tagnormopacity },
|
||||
[SchemeSystray] = { OPAQUE, systrayopacity, systrayopacity },
|
||||
[SchemeSystray] = { opaque, systrayopacity, systrayopacity },
|
||||
};
|
||||
|
||||
/* Colors to use for tags */
|
||||
|
|
10
options.h
10
options.h
|
@ -280,18 +280,18 @@ static char text_layout15[] = "(L15)"; /* Text for layout 15 *
|
|||
* These options set the opacity of the status bar modules.
|
||||
* They can be anything from 0 (fully transparent) to 255 (fully opaque).
|
||||
*
|
||||
* You can also set OPAQUE and TRANSPARENT which are the same as 0 and 255 respectively.
|
||||
* You can also set opaque and transparent which are the same as 0 and 255 respectively.
|
||||
* To completely disable alpha, disable it in toggle.h.
|
||||
*/
|
||||
#define baropacity 160 /* Opacity for the overall bar */
|
||||
#define layoutopacity 160 /* Opacity for the layout indicator */
|
||||
#define tagnormopacity OPAQUE /* Opacity for other tags */
|
||||
#define tagnormopacity opaque /* Opacity for other tags */
|
||||
#define tagselopacity 160 /* Opacity for the selected tag */
|
||||
#define normtitleopacity 160 /* Opacity for all other windows in the speedwm bar */
|
||||
#define seltitleopacity 160 /* Opacity for the focused window in the speedwm bar */
|
||||
#define normborderopacity OPAQUE /* Opacity for the all window borders except selected */
|
||||
#define selborderopacity OPAQUE /* Opacity for the selected window border */
|
||||
#define hiddenopacity 0 /* Opacity for hidden/minimized windows */
|
||||
#define normborderopacity opaque /* Opacity for the all window borders except selected */
|
||||
#define selborderopacity opaque /* Opacity for the selected window border */
|
||||
#define hiddenopacity transparent /* Opacity for hidden/minimized windows */
|
||||
#define statusopacity 160 /* Opacity for speedwm status bar */
|
||||
#define systrayopacity 160 /* Opacity for the speedwm built in systray */
|
||||
|
||||
|
|
21
signal.h
21
signal.h
|
@ -73,27 +73,6 @@ static Signal signals[] = {
|
|||
#endif
|
||||
{ 66, viewtoleft_vacant, {0} },
|
||||
{ 67, viewtoright_vacant, {0} },
|
||||
/*
|
||||
{ 68, togglebartags, {0} },
|
||||
{ 69, togglebaremptytags, {0} },
|
||||
{ 70, toggletagpowerline, {0} },
|
||||
{ 71, toggletitlepowerline, {0} },
|
||||
{ 72, togglepowerline, {0} },
|
||||
{ 73, toggletagplshape, {0} },
|
||||
{ 74, toggletitleplshape, {0} },
|
||||
{ 75, toggleplshape, {0} },
|
||||
{ 76, resetpowerline, {0} },
|
||||
{ 77, togglebartitle, {0} },
|
||||
{ 78, togglebarunseltitle, {0} },
|
||||
{ 79, togglebarlt, {0} },
|
||||
{ 80, togglebarstatus, {0} },
|
||||
{ 81, togglebarfloat, {0} },
|
||||
{ 82, togglebarsticky, {0} },
|
||||
{ 83, togglebaricon, {0} },
|
||||
{ 84, togglebarpos, {0} },
|
||||
{ 85, togglelayoutpos, {0} },
|
||||
{ 86, resetbar, {0} },
|
||||
*/
|
||||
{ 87, setbarheight, {.i = +1 } },
|
||||
{ 88, setbarheight, {.i = -1 } },
|
||||
{ 89, resetbarheight, {0} },
|
||||
|
|
Loading…
Reference in a new issue