diff --git a/config.h b/config.h index a2b8b27..508858d 100644 --- a/config.h +++ b/config.h @@ -16,11 +16,13 @@ #include "tile.c" #include "grid.c" #include "bstack.c" +#include "fullscreen.c" Layout layouts[] = { { "[]=", tile }, { "+++", grid }, { "TTT", bstack }, + { "[ ]", fullscreen }, }; #define MOD CTRL('g') @@ -35,6 +37,7 @@ Key keys[] = { { MOD, 't', setlayout , "[]=" }, { MOD, 'g', setlayout , "+++" }, { MOD, 'b', setlayout , "TTT" }, + { MOD, 'f', setlayout , "[ ]" }, { MOD, ' ', setlayout , NULL }, { MOD, 'h', setmwfact , "-0.05" }, { MOD, 'l', setmwfact , "+0.05" }, diff --git a/dvtm.c b/dvtm.c index de53f03..048c804 100644 --- a/dvtm.c +++ b/dvtm.c @@ -105,12 +105,12 @@ Client* get_client_by_pid(pid_t pid); unsigned int waw,wah,wax = 0,way = 0; Client *clients = NULL; extern double mwfact; +Client *sel = NULL; #include "config.h" double mwfact = MWFACT; int redraw_timeout = REDRAW_TIMEOUT; -Client *sel = NULL; /* should probably be a linked list? */ Client *client_killed = NULL; @@ -388,7 +388,7 @@ draw_border(Client *c){ wattron(c->window,ATTR_SELECTED); else wattrset(c->window,ATTR_NORMAL); - if(c->minimized) + if(c->minimized && !isarrange(fullscreen)) mvwhline(c->window,0,0,ACS_HLINE,c->w); else box(c->window,0,0); @@ -404,7 +404,7 @@ draw_border(Client *c){ void draw_content(Client *c){ - if(!c->minimized) + if(!c->minimized || isarrange(fullscreen)) rote_vt_draw(c->term,c->window,1,1,NULL); } @@ -655,7 +655,7 @@ main(int argc, char *argv[]) { Key* key = keybinding(mod,code); if(key) key->action(key->arg); - } else if(sel && !sel->minimized) + } else if(sel && (!sel->minimized || isarrange(fullscreen))) rote_vt_keypress(sel->term, code); } diff --git a/fullscreen.c b/fullscreen.c new file mode 100644 index 0000000..4a1cb69 --- /dev/null +++ b/fullscreen.c @@ -0,0 +1,6 @@ +void +fullscreen(void) { + Client *c; + for(c = clients; c; c = c->next) + resize(c, wax, way, waw, wah); +}