diff options
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | #define USAGE \ | 32 | #define USAGE \ |
33 | "st-" VERSION ", (c) 2010 st engineers\n" \ | 33 | "st-" VERSION ", (c) 2010 st engineers\n" \ |
34 | "usage: st [-t title] [-e cmd] [-v]\n" | 34 | "usage: st [-t title] [-c class] [-e cmd] [-v]\n" |
35 | 35 | ||
36 | /* Arbitrary sizes */ | 36 | /* Arbitrary sizes */ |
37 | #define ESC_TITLE_SIZ 256 | 37 | #define ESC_TITLE_SIZ 256 |
@@ -252,6 +252,7 @@ static pid_t pid; | |||
252 | static Selection sel; | 252 | static Selection sel; |
253 | static char *opt_cmd = NULL; | 253 | static char *opt_cmd = NULL; |
254 | static char *opt_title = NULL; | 254 | static char *opt_title = NULL; |
255 | static char *opt_class = NULL; | ||
255 | 256 | ||
256 | /* UTF-8 decode */ | 257 | /* UTF-8 decode */ |
257 | static int stou(char *s, long *u) { | 258 | static int stou(char *s, long *u) { |
@@ -1443,7 +1444,7 @@ xclear(int x1, int y1, int x2, int y2) { | |||
1443 | void | 1444 | void |
1444 | xhints(void) | 1445 | xhints(void) |
1445 | { | 1446 | { |
1446 | XClassHint class = {TNAME, TNAME}; | 1447 | XClassHint class = {opt_class ? opt_class : TNAME, TNAME}; |
1447 | XWMHints wm = {.flags = InputHint, .input = 1}; | 1448 | XWMHints wm = {.flags = InputHint, .input = 1}; |
1448 | XSizeHints size = { | 1449 | XSizeHints size = { |
1449 | .flags = PSize | PResizeInc | PBaseSize, | 1450 | .flags = PSize | PResizeInc | PBaseSize, |
@@ -1838,6 +1839,9 @@ main(int argc, char *argv[]) { | |||
1838 | case 't': | 1839 | case 't': |
1839 | if(++i < argc) opt_title = argv[i]; | 1840 | if(++i < argc) opt_title = argv[i]; |
1840 | break; | 1841 | break; |
1842 | case 'c': | ||
1843 | if(++i < argc) opt_class = argv[i]; | ||
1844 | break; | ||
1841 | case 'e': | 1845 | case 'e': |
1842 | if(++i < argc) opt_cmd = argv[i]; | 1846 | if(++i < argc) opt_cmd = argv[i]; |
1843 | break; | 1847 | break; |