commit - 0735e8e760fe8b639dbe4d932d8e79c8f1969f33
commit + e417230f3818c84306ee7bd29772d857f76701d4
blob - 4d00d2f6e139e4a463e1f0c8df1f774ecb8c7c63
blob + 29bdda669de4480333236627ac906b414d964d99
--- st.1
+++ st.1
.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.
blob - b25fe891e2ec1e09fc7a238c261b7a148984e583
blob + bed7e8d007d22f0a0b63fae7ed07533c7c2eaff7
--- st.c
+++ st.c
#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;