Skip to content
Browse files

Merge branch 'master' of github.com:linkdd/wmfs

  • Loading branch information...
2 parents 6e171ff + 5714d54 commit f031d1560c210353fabb6338c048945f0ad73869 @linkdd linkdd committed May 2, 2012
Showing with 23 additions and 17 deletions.
  1. +3 −3 src/client.c
  2. +3 −1 src/config.c
  3. +4 −4 src/tag.c
  4. +10 −9 src/wmfs.h
  5. +3 −0 wmfsrc
View
6 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;
View
4 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 */
View
8 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);
}
View
19 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;
View
3 wmfsrc
@@ -117,6 +117,9 @@
[client]
+ # Padding betwen clients (default: 0) :
+ # padding = 75
+
theme = "default"
key_modifier = "Super"

0 comments on commit f031d15

Please sign in to comment.
Something went wrong with that request. Please try again.