Signed-off-by: Thorsten Glaser <t.gla...@tarent.de>
---
 LICENSE  | 1 +
 tabbed.1 | 5 +++++
 tabbed.c | 8 ++++++++
 3 files changed, 14 insertions(+)

diff --git a/LICENSE b/LICENSE
index add8a53..b8dc9ea 100644
--- a/LICENSE
+++ b/LICENSE
@@ -3,6 +3,7 @@ MIT/X Consortium License
 © 2009-2011 Enno Boland <g s01 de>
 © 2011 Connor Lane Smith <c...@lubutu.com>
 © 2012 Christoph Lohmann <2...@r-36.net> 
+© 2013 Thorsten “mirabilos” Glaser <t.gla...@tarent.de>
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
diff --git a/tabbed.1 b/tabbed.1
index d3ef06a..a315136 100644
--- a/tabbed.1
+++ b/tabbed.1
@@ -8,6 +8,8 @@ tabbed \- generic tabbed interface
 .RB [ \-h ]
 .RB [ \-s ]
 .RB [ \-v ]
+.RB [ \-g
+.IR geometry ]
 .RB [ \-n
 .IR name ]
 .RB [ \-p
@@ -34,6 +36,9 @@ detaches tabbed from the terminal and prints its XID to 
stdout.
 fill up tabbed again by spawning the provided command, when the last tab is
 closed. Mutually exclusive with -c.
 .TP
+.BI \-g " geometry"
+specifies the preferred size and position of the parent window.
+.TP
 .B \-h
 will print the usage of tabbed.
 .TP
diff --git a/tabbed.c b/tabbed.c
index ba1df21..64dcd2a 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -160,6 +160,7 @@ static int (*xerrorxlib)(Display *, XErrorEvent *);
 static char winid[64];
 static char **cmd = NULL;
 static char *wmname = "tabbed";
+static const char *geometry = NULL;
 
 char *argv0;
 
@@ -890,6 +891,10 @@ setup(void) {
        ww = 800;
        wh = 600;
 
+       if (geometry)
+               XParseGeometry(geometry, &wx, &wy,
+                   (unsigned *)&ww, (unsigned *)&wh);
+
        dc.norm[ColBG] = getcolor(normbgcolor);
        dc.norm[ColFG] = getcolor(normfgcolor);
        dc.sel[ColBG] = getcolor(selbgcolor);
@@ -1125,6 +1130,9 @@ main(int argc, char *argv[]) {
        case 'f':
                fillagain = True;
                break;
+       case 'g':
+               geometry = EARGF(usage());
+               break;
        case 'n':
                wmname = EARGF(usage());
                break;
-- 
1.8.4.rc3


Reply via email to