summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-04-06 18:42:53 +0200
committerChristoph Lohmann <20h@r-36.net>2012-04-06 18:42:53 +0200
commit0808cda361ff473e728eecfa0ddda6862a0ecbe1 (patch)
treeb0950250298530aaa377b81aaf079578bd9d2dc7
parentc6b1f05d151e74197ca80c9b6363ebc28ced4951 (diff)
Enable easier tabbed handling with the xid.
-rw-r--r--tabbed.18
-rw-r--r--tabbed.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/tabbed.1 b/tabbed.1
index 09bd57b..1d20f8f 100644
--- a/tabbed.1
+++ b/tabbed.1
@@ -7,13 +7,14 @@ tabbed \- generic tabbed interface
.RB [ \-h ]
.RB [ \-s ]
.RB [ \-v ]
-.IR command ...
+.IR [ command ... ]
.SH DESCRIPTION
.B tabbed
is a simple tabbed container for applications which support XEmbed. Tabbed
will then run the provides command with the xid of tabbed as appended
argument. (See EXAMPLES.) The automatic spawning of the command can be
-disabled by provoding the -s parameter.
+disabled by provoding the -s parameter. If no command is provided
+tabbed will just print its xid and run no command.
.SH OPTIONS
.TP
.B \-d
@@ -52,3 +53,6 @@ $ tabbed surf -e
$ tabbed urxvt -embed
.TP
$ tabbed xterm -into
+.TP
+$ $(tabbed -d >/tmp/tabbed.xid); urxvt -embed $(</tmp/tabbed.xid);
+
diff --git a/tabbed.c b/tabbed.c
index 42b1158..9fde784 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -906,7 +906,7 @@ main(int argc, char *argv[]) {
}
}
if(argc < 1)
- usage();
+ doinitspawn = False;
setcmd(argc, argv);
if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())