diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | config.def.h | 6 | ||||
-rw-r--r-- | src/wterm.c (renamed from src/st.c) | 32 | ||||
-rw-r--r-- | wterm.1 | 47 |
4 files changed, 30 insertions, 57 deletions
@@ -1,7 +1,7 @@ # wterm - xterm for wayland -wterm is an xterm replacement based on an st fork using wld. +wterm is a native Wayland terminal emulator based on an st fork using wld. st is a simple terminal emulator for X originally made by suckless. diff --git a/config.def.h b/config.def.h index 99913be..f0dd482 100644 --- a/config.def.h +++ b/config.def.h @@ -14,7 +14,7 @@ static int borderpx = 2; static uint8_t term_alpha = 0xaa; /* - * What program is execed by st depends of these precedence rules: + * What program is execed by wterm depends of these precedence rules: * 1: program passed with -e * 2: utmp option * 3: SHELL environment variable @@ -153,7 +153,7 @@ static Shortcut shortcuts[] = { }; /* - * Special keys (change & recompile st.info accordingly) + * Special keys (change & recompile wterm.info accordingly) * * Mask value: * * Use MOD_MASK_ANY to match the key no matter modifiers state @@ -172,7 +172,7 @@ static Shortcut shortcuts[] = { * * > 0: crlf mode is enabled * * < 0: crlf mode is disabled * - * Be careful with the order of the definitions because st searches in + * Be careful with the order of the definitions because wterm searches in * this table sequentially, so any MOD_MASK_ANY must be in the last * position for a key. */ @@ -588,7 +588,6 @@ static int iofd = 1; static char **opt_cmd = NULL; static char *opt_io = NULL; static char *opt_title = NULL; -static char *opt_embed = NULL; static char *opt_class = NULL; static char *opt_font = NULL; static char *opt_line = NULL; @@ -997,9 +996,9 @@ char *getsel(void) { * Copy and pasting of line endings is inconsistent * in the inconsistent terminal and GUI world. * The best solution seems like to produce '\n' when - * something is copied from st and convert '\n' to + * something is copied from wterm and convert '\n' to * '\r', when something to be pasted is received by - * st. + * wterm. * FIXME: Fix the computer world. */ if ((y < sel.ne.y || lastx >= linelen) && !(last->mode & ATTR_WRAP)) @@ -2551,7 +2550,7 @@ void tputc(Rune u) { } else { /* * Here is a bug in terminals. If the user never sends - * some code to stop the str or esc command, then st + * some code to stop the str or esc command, then wterm * will stop responding. But this is better than * silently failing with unknown characters. At least * then users will report back. @@ -2850,7 +2849,7 @@ void wlloadfonts(char *fontstr, double fontsize) { } if (!pattern) - die("st: can't open font %s\n", fontstr); + die("%s: can't open font %s\n", argv0, fontstr); if (fontsize > 1) { FcPatternDel(pattern, FC_PIXEL_SIZE); @@ -2879,7 +2878,7 @@ void wlloadfonts(char *fontstr, double fontsize) { FcDefaultSubstitute(pattern); if (wlloadfont(&dc.font, pattern)) - die("st: can't open font %s\n", fontstr); + die("%s: can't open font %s\n", argv0, fontstr); if (usedfontsize < 0) { FcPatternGetDouble(dc.font.pattern, FC_PIXEL_SIZE, 0, &fontval); @@ -2895,17 +2894,17 @@ void wlloadfonts(char *fontstr, double fontsize) { FcPatternDel(pattern, FC_SLANT); FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); if (wlloadfont(&dc.ifont, pattern)) - die("st: can't open font %s\n", fontstr); + die("%s: can't open font %s\n", argv0, fontstr); FcPatternDel(pattern, FC_WEIGHT); FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); if (wlloadfont(&dc.ibfont, pattern)) - die("st: can't open font %s\n", fontstr); + die("%s: can't open font %s\n", argv0, fontstr); FcPatternDel(pattern, FC_SLANT); FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN); if (wlloadfont(&dc.bfont, pattern)) - die("st: can't open font %s\n", fontstr); + die("%s: can't open font %s\n", argv0, fontstr); FcPatternDestroy(pattern); } @@ -3344,7 +3343,7 @@ void wlsettitle(char *title) { wl_shell_surface_set_title(wl.shellsurf, title); } -void wlresettitle(void) { wlsettitle(opt_title ? opt_title : "st"); } +void wlresettitle(void) { wlsettitle(opt_title ? opt_title : "wterm"); } void redraw(void) { tfulldirt(); } @@ -4006,12 +4005,12 @@ void run(void) { } void usage(void) { - die("%s " VERSION " (c) 2010-2015 st engineers\n" - "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n" - " [-i] [-t title] [-T title] [-w windowid] [-e command ...]" + die("%1$s " VERSION " (c) 2010-2015 st engineers, 2015-2019 wterm engineers\n" + "usage: %1$s [-a] [-v] [-c class] [-f font] [-o file]\n" + " [-t title] [-T title] [-e command ...]" " [command ...]\n" - " st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n" - " [-i] [-t title] [-T title] [-w windowid] [-l line]" + " %1$s [-a] [-v] [-c class] [-f font] [-o file]\n" + " [-t title] [-T title] [-l line]" " [stty_args ...]\n", argv0); } @@ -4041,9 +4040,6 @@ int main(int argc, char *argv[]) { case 'T': opt_title = EARGF(usage()); break; - case 'w': - opt_embed = EARGF(usage()); - break; case 'v': default: usage(); @@ -1,16 +1,13 @@ -.TH ST 1 st\-VERSION +.TH ST 1 wterm\-VERSION .SH NAME -st \- simple terminal +wterm \- simple terminal .SH SYNOPSIS -.B st +.B wterm .RB [ \-a ] .RB [ \-c .IR class ] .RB [ \-f .IR font ] -.RB [ \-g -.IR geometry ] -.RB [ \-i ] .RB [ \-o .IR file ] .RB [ \-t @@ -19,22 +16,17 @@ st \- simple terminal .IR title ] .RB [ \-l .IR line ] -.RB [ \-w -.IR windowid ] .RB [ \-v ] .RB [ \-e .IR command ...] .RI [ commands ...] .PP -.B st +.B wterm .RB [ \-a ] .RB [ \-c .IR class ] .RB [ \-f .IR font ] -.RB [ \-g -.IR geometry ] -.RB [ \-i ] .RB [ \-o .IR file ] .RB [ \-t @@ -43,14 +35,12 @@ st \- simple terminal .IR title ] .RB [ \-l .IR line ] -.RB [ \-w -.IR windowid ] .RB [ \-v ] .RB [ \-l .IR line ] .RI [ stty_args ...] .SH DESCRIPTION -.B st +.B wterm is a simple terminal emulator. .SH OPTIONS .TP @@ -63,32 +53,19 @@ defines the window class (default $TERM). .BI \-f " font" defines the .I font -to use when st is run. -.TP -.BI \-g " geometry" -defines the X11 geometry string. -The form is [=][<cols>{xX}<rows>][{+-}<xoffset>{+-}<yoffset>]. See -.BR XParseGeometry (3) -for further details. -.TP -.B \-i -will fixate the position given with the -g option. +to use when wterm is run. .TP .BI \-o " iofile" writes all the I/O to .I iofile. -This feature is useful when recording st sessions. A value of "-" means +This feature is useful when recording wterm sessions. A value of "-" means standard output. .TP .BI \-t " title" -defines the window title (default 'st'). +defines the window title (default 'wterm'). .TP .BI \-T " title" -defines the window title (default 'st'). -.TP -.BI \-w " windowid" -embeds st within the window identified by -.I windowid +defines the window title (default 'wterm'). .TP .BI \-l " line" use a tty line instead of a pseudo terminal. @@ -99,7 +76,7 @@ remaining arguments are used as flags for stty. prints version information to stderr, then exits. .TP .BI \-e " program " [ " arguments " "... ]" -st executes +wterm executes .I program instead of the shell. If this is used it .B must be the last option @@ -110,7 +87,7 @@ even without it. .SH SHORTCUTS .TP .B Ctrl-Print Screen -Toggle if st should print to the +Toggle if wterm should print to the .I iofile. .TP .B Shift-Print Screen @@ -142,7 +119,7 @@ Copy the selected text to the clipboard selection. .B Alt-Shift-v Paste from the clipboard selection. .SH CUSTOMIZATION -.B st +.B wterm can be customized by creating a custom config.h and (re)compiling the source code. This keeps it fast, secure and simple. .SH AUTHORS |