Add colmode command to /ctl

This commit is contained in:
Kris Maglione 2008-10-16 15:34:56 -04:00
parent b65eb22290
commit bac71bfccb
2 changed files with 9 additions and 1 deletions

View File

@ -58,9 +58,11 @@ enum EWMHType {
};
enum {
Coldefault, Colstack, Colmax,
Coldefault, Colstack, Colmax, Collast
};
extern char* modes[];
#define TOGGLE(x) \
(x == On ? "On" : \
x == Off ? "Off" : \

View File

@ -453,6 +453,11 @@ message_root(void *p, IxpMsg *m) {
def.border = n;
view_update(screen->sel);
break;
case LCOLMODE:
s = msg_getword(m);
if(!setdef(&def.colmode, s, modes, Collast))
return Ebadvalue;
break;
case LDEBUG:
ret = msg_debug(m);
break;
@ -525,6 +530,7 @@ readctl_root(void) {
bufclear();
bufprint("bar on %s\n", barpostab[screen->barpos]);
bufprint("border %d\n", def.border);
bufprint("colmode %s\n", modes[def.colmode]);
if(debugflag) {
bufprint("debug ");
printdebug(debugflag);