Skip to content

Commit

Permalink
Add new fullscreen layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Dec 22, 2007
1 parent 060e087 commit 8ed88d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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" },
Expand Down
8 changes: 4 additions & 4 deletions dvtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand All @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down
6 changes: 6 additions & 0 deletions fullscreen.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
void
fullscreen(void) {
Client *c;
for(c = clients; c; c = c->next)
resize(c, wax, way, waw, wah);
}

0 comments on commit 8ed88d9

Please sign in to comment.