I like to have the bar disabled by default, but want to be able to switch it back on if necessary (i.e. if I use tags). However, if you configure BAR_POS as BAR_OFF in config.h, the togglebar() function (MOD-s by default) doesn't work, because both bar.pos and bar.lastpos are set to BAR_POS in line 249 of dvtm.c, so togglebar() switches form BAR_OFF to BAR_OFF.
To fix this, I have added a default position (BAR_DEF) for the bar in config.h:
#define BAR_DEF BAR_TOP /* BAR_TOP or BAR_BOTTOM for default values, or BAR_OFF to completely disable the bar */
and updated the togglebar() funtion in dvtm.c:
togglebar(const char *args[]) {
if (bar.pos == BAR_OFF) {
if (bar.lastpos == BAR_OFF)
bar.lastpos = BAR_DEF;
showbar();
}
else
hidebar();
bar.autohide = false;
updatebarpos();
redraw(NULL);
}
Hope this helps others.
I like to have the bar disabled by default, but want to be able to switch it back on if necessary (i.e. if I use tags). However, if you configure BAR_POS as BAR_OFF in config.h, the togglebar() function (MOD-s by default) doesn't work, because both bar.pos and bar.lastpos are set to BAR_POS in line 249 of dvtm.c, so togglebar() switches form BAR_OFF to BAR_OFF.
To fix this, I have added a default position (BAR_DEF) for the bar in config.h:
and updated the togglebar() funtion in dvtm.c:
Hope this helps others.