diff --git a/src/client.c b/src/client.c index 7261ca9..54609b2 100644 --- a/src/client.c +++ b/src/client.c @@ -1174,13 +1174,13 @@ client_moveresize(struct client *c, struct geo *g) } XMoveResizeWindow(W->dpy, c->frame, - c->rgeo.x, c->rgeo.y, - c->rgeo.w, c->rgeo.h); + c->rgeo.x + W->padding / 4, c->rgeo.y + W->padding / 4, + c->rgeo.w - W->padding / 2, c->rgeo.h - W->padding / 2); if(!(c->flags & CLIENT_FULLSCREEN)) XMoveResizeWindow(W->dpy, c->win, c->wgeo.x, c->wgeo.y, - c->wgeo.w, c->wgeo.h); + c->wgeo.w - W->padding / 2, c->wgeo.h - W->padding / 2); c->flags &= ~CLIENT_DID_WINSIZE; diff --git a/src/config.c b/src/config.c index ccd056e..4e2619b 100644 --- a/src/config.c +++ b/src/config.c @@ -192,7 +192,8 @@ config_tag(void) ks = fetch_section(sec, "tag"); n = fetch_section_count(ks); - W->tag_circular = fetch_opt_first(sec, "1", "circular").boolean; + if (fetch_opt_first(sec, "1", "circular").boolean) + W->flags |= WMFS_TAGCIRC; /* [mouse] */ if((mb = fetch_section(sec, "mouse"))) @@ -236,6 +237,7 @@ config_client(void) /* [client] */ sec = fetch_section_first(NULL, "client"); + W->padding = fetch_opt_first(sec, "0", "padding").num; W->client_mod = modkey_keysym(fetch_opt_first(sec, "Super", "key_modifier").str); /* Get theme */ diff --git a/src/tag.c b/src/tag.c index 9990d99..0bdbbbd 100644 --- a/src/tag.c +++ b/src/tag.c @@ -170,7 +170,7 @@ uicb_tag_next(Uicb cmd) if((t = TAILQ_NEXT(W->screen->seltag, next))) tag_screen(W->screen, t); - else if(W->tag_circular) + else if(W->flags & WMFS_TAGCIRC) tag_screen(W->screen, TAILQ_FIRST(&W->screen->tags)); } @@ -182,7 +182,7 @@ uicb_tag_prev(Uicb cmd) if((t = TAILQ_PREV(W->screen->seltag, tsub, next))) tag_screen(W->screen, t); - else if(W->tag_circular) + else if(W->flags & WMFS_TAGCIRC) tag_screen(W->screen, TAILQ_LAST(&W->screen->tags, tsub)); } @@ -214,7 +214,7 @@ uicb_tag_move_client_next(Uicb cmd) if((t = TAILQ_NEXT(W->screen->seltag, next))) tag_client(t, W->client); - else if(W->tag_circular) + else if(W->flags & WMFS_TAGCIRC) tag_client(TAILQ_FIRST(&W->screen->tags), W->client); } @@ -229,7 +229,7 @@ uicb_tag_move_client_prev(Uicb cmd) if((t = TAILQ_PREV(W->screen->seltag, tsub, next))) tag_client(t, W->client); - else if(W->tag_circular) + else if(W->flags & WMFS_TAGCIRC) tag_client(TAILQ_LAST(&W->screen->tags, tsub), W->client); } diff --git a/src/wmfs.h b/src/wmfs.h index 7d94f74..d21967d 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -335,14 +335,15 @@ struct wmfs int nscreen; unsigned int client_mod; Flags numlockmask; -#define WMFS_SCAN 0x01 -#define WMFS_RUNNING 0x02 -#define WMFS_RELOAD 0x04 -#define WMFS_SYSTRAY 0x08 -#define WMFS_LOG 0x10 -#define WMFS_LAUNCHER 0x20 -#define WMFS_SIGCHLD 0x40 -#define WMFS_TABNOC 0x80 /* tab next opened client */ +#define WMFS_SCAN 0x001 +#define WMFS_RUNNING 0x002 +#define WMFS_RELOAD 0x004 +#define WMFS_SYSTRAY 0x008 +#define WMFS_LOG 0x010 +#define WMFS_LAUNCHER 0x020 +#define WMFS_SIGCHLD 0x040 +#define WMFS_TABNOC 0x080 /* tab next opened client */ +#define WMFS_TAGCIRC 0x100 /* tab_next on last tag -> go to first tag / tab_prev on first tag -> go to last tag */ Flags flags; GC gc, rgc; Atom *net_atom; @@ -354,7 +355,7 @@ struct wmfs #define CFOCUS_CLICK 0x02 Flags cfocus; /* Focus configuration, can be set to 0, CFOCUS_ENTER or CFOCUS_CLICK*/ - bool tag_circular; + int padding; /* Log file */ FILE *log; diff --git a/wmfsrc b/wmfsrc index 4df24ac..93de57f 100644 --- a/wmfsrc +++ b/wmfsrc @@ -117,6 +117,9 @@ [client] + # Padding betwen clients (default: 0) : + # padding = 75 + theme = "default" key_modifier = "Super"