.SH SYNOPSIS
.B st
.RB [ \-e " <cmd>"]
+.RB [ \-c " <class>"]
.RB [ \-t " <title>"]
.RB [ \-v ]
.SH DESCRIPTION
.B \-t <title>
Overrides the default title (st)
.TP
+.B \-c <class>
+Overrides the default class ($TERM)
+.TP
.BI \-v
Prints version information to standard output, then exits.
#define USAGE \
"st-" VERSION ", (c) 2010 st engineers\n" \
- "usage: st [-t title] [-e cmd] [-v]\n"
+ "usage: st [-t title] [-c class] [-e cmd] [-v]\n"
/* Arbitrary sizes */
#define ESC_TITLE_SIZ 256
static Selection sel;
static char *opt_cmd = NULL;
static char *opt_title = NULL;
+static char *opt_class = NULL;
/* UTF-8 decode */
static int stou(char *s, long *u) {
void
xhints(void)
{
- XClassHint class = {TNAME, TNAME};
+ XClassHint class = {opt_class ? opt_class : TNAME, TNAME};
XWMHints wm = {.flags = InputHint, .input = 1};
XSizeHints size = {
.flags = PSize | PResizeInc | PBaseSize,
case 't':
if(++i < argc) opt_title = argv[i];
break;
+ case 'c':
+ if(++i < argc) opt_class = argv[i];
+ break;
case 'e':
if(++i < argc) opt_cmd = argv[i];
break;