From c1d23afa9c44cc29818c538126790ae90a64a3c5 Mon Sep 17 00:00:00 2001 From: George Ornbo Date: Wed, 20 Dec 2017 09:05:32 +0000 Subject: Fix FAQ typo --- FAQ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'FAQ') diff --git a/FAQ b/FAQ index 4defff9..921c493 100644 --- a/FAQ +++ b/FAQ @@ -6,7 +6,7 @@ Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task. It means that st doesn’t have any terminfo entry on your system. Chances are you did not `make install`. If you just want to test it without installing it, -you can manualy run `tic -sx st.info`. +you can manually run `tic -sx st.info`. ## Nothing works, and nothing is said about an unknown terminal! -- cgit v1.2.3 From caa1d8fbea2b92bca24652af0fee874bdbbbb3e5 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 17 May 2019 13:00:10 +0200 Subject: FAQ: add entry about color emoji Xft bug This has been asked many times on IRC and the mailinglist. Make it easier to find information about this particular Xft issue by adding it to the FAQ. --- FAQ | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'FAQ') diff --git a/FAQ b/FAQ index 921c493..ecf7af8 100644 --- a/FAQ +++ b/FAQ @@ -165,3 +165,30 @@ Apply [1]. [1] http://st.suckless.org/patches/delkey +## BadLength X error in Xft when trying to render emoji + +Xft makes st crash when rendering color emojis with the following error: + +"X Error of failed request: BadLength (poly request too large or internal Xlib length error)" + Major opcode of failed request: 139 (RENDER) + Minor opcode of failed request: 20 (RenderAddGlyphs) + Serial number of failed request: 1595 + Current serial number in output stream: 1818" + +This is a known bug in Xft (not st) which happens on some platforms and +combination of particular fonts and fontconfig settings. + +See also: +https://gitlab.freedesktop.org/xorg/lib/libxft/issues/6 +https://bugs.freedesktop.org/show_bug.cgi?id=107534 +https://bugzilla.redhat.com/show_bug.cgi?id=1498269 + +The solution is to remove color emoji fonts or disable this in the fontconfig +XML configuration. As an ugly workaround (which may work only on newer +fontconfig versions (FC_COLOR)), the following code can be used to mask color +fonts: + + FcPatternAddBool(fcpattern, FC_COLOR, FcFalse); + +Please don't bother reporting this bug to st, but notify the upstream Xft +developers about fixing this bug. -- cgit v1.2.3 From 384830110bddcebed00b6530a5336f07ad7c405f Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 17 Nov 2019 20:04:52 +0100 Subject: update FAQ - add common question about the w3m image drawing hack. - remove some bad advise about $TERM. - change some links to https. --- FAQ | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'FAQ') diff --git a/FAQ b/FAQ index ecf7af8..78c769a 100644 --- a/FAQ +++ b/FAQ @@ -1,6 +1,6 @@ ## Why does st not handle utmp entries? -Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task. +Use the excellent tool of [utmp](https://git.suckless.org/utmp/) for this task. ## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever! @@ -15,13 +15,6 @@ you can manually run `tic -sx st.info`. * Some programs don’t complain about the lacking st description and default to another terminal. In that case see the question about terminfo. -## I get some weird glitches/visual bug on _random program_! - -Try launching it with a different TERM: $ TERM=xterm myapp. toe(1) will give -you a list of available terminals, but you’ll most likely switch between xterm, -st or st-256color. The default value for TERM can be changed in config.h -(TNAME). - ## How do I scroll back up? Using a terminal multiplexer. @@ -104,7 +97,7 @@ St is emulating the Linux way of handling backspace being delete and delete bein backspace. This is an issue that was discussed in suckless mailing list -. Here is why some old grumpy +. Here is why some old grumpy terminal users wants its backspace to be how he feels it: Well, I am going to comment why I want to change the behaviour @@ -163,7 +156,15 @@ terminal users wants its backspace to be how he feels it: Apply [1]. -[1] http://st.suckless.org/patches/delkey +[1] https://st.suckless.org/patches/delkey + +## Why do images not work in st (in programs such as w3m)? + +This is a terrible hack that overdraws an image on top of the terminal emulator +window. It also relies on a very specific way the terminal draws it's contents. + +A more proper (but limited way) would be using sixels. Which st doesn't +support. ## BadLength X error in Xft when trying to render emoji -- cgit v1.2.3 From 0b73612c0dc51dbec1717e5da94bc94559c37246 Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Sat, 11 Apr 2020 11:52:58 +0200 Subject: Update FAQ with the last modifications --- FAQ | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'FAQ') diff --git a/FAQ b/FAQ index 78c769a..85534a4 100644 --- a/FAQ +++ b/FAQ @@ -17,10 +17,16 @@ you can manually run `tic -sx st.info`. ## How do I scroll back up? -Using a terminal multiplexer. +* Using a terminal multiplexer. + * `st -e tmux` using C-b [ + * `st -e screen` using C-a ESC +* Using the excellent tool of [scroll](https://git.suckless.org/scroll/). +* Using the scrollback [patch](https://st.suckless.org/patches/scrollback/). -* `st -e tmux` using C-b [ -* `st -e screen` using C-a ESC +## I would like to have utmp and/or scroll functionality by default + +You can add the absolute patch of both programs in your config.h +file. You only have to modify the value of utmp and scroll variables. ## Why doesn't the Del key work in some programs? -- cgit v1.2.3 From 0f8b40652bca0670f1f0bda069bbc55f8b5e364d Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 30 May 2020 21:50:54 +0200 Subject: FAQ: add some details about the w3m img hack ... and an example patch to switch from double-buffering to a single buffer. --- FAQ | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) (limited to 'FAQ') diff --git a/FAQ b/FAQ index 85534a4..fb40264 100644 --- a/FAQ +++ b/FAQ @@ -2,12 +2,14 @@ Use the excellent tool of [utmp](https://git.suckless.org/utmp/) for this task. + ## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever! It means that st doesn’t have any terminfo entry on your system. Chances are you did not `make install`. If you just want to test it without installing it, you can manually run `tic -sx st.info`. + ## Nothing works, and nothing is said about an unknown terminal! * Some programs just assume they’re running in xterm i.e. they don’t rely on @@ -15,6 +17,7 @@ you can manually run `tic -sx st.info`. * Some programs don’t complain about the lacking st description and default to another terminal. In that case see the question about terminfo. + ## How do I scroll back up? * Using a terminal multiplexer. @@ -23,11 +26,13 @@ you can manually run `tic -sx st.info`. * Using the excellent tool of [scroll](https://git.suckless.org/scroll/). * Using the scrollback [patch](https://st.suckless.org/patches/scrollback/). + ## I would like to have utmp and/or scroll functionality by default You can add the absolute patch of both programs in your config.h file. You only have to modify the value of utmp and scroll variables. + ## Why doesn't the Del key work in some programs? Taken from the terminfo manpage: @@ -83,12 +88,14 @@ If you are using zsh, then read the zsh FAQ Putting these lines into your .zshrc will fix the problems. + ## How can I use meta in 8bit mode? St supports meta in 8bit mode, but the default terminfo entry doesn't use this capability. If you want it, you have to use the 'st-meta' value in TERM. + ## I cannot compile st in OpenBSD OpenBSD lacks librt, despite it being mandatory in POSIX @@ -97,6 +104,7 @@ If you want to compile st for OpenBSD you have to remove -lrt from config.mk, an st will compile without any loss of functionality, because all the functions are included in libc on this platform. + ## The Backspace Case St is emulating the Linux way of handling backspace being delete and delete being @@ -158,19 +166,60 @@ terminal users wants its backspace to be how he feels it: [1] http://www.ibb.net/~anne/keyboard.html [2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html + ## But I really want the old grumpy behaviour of my terminal Apply [1]. [1] https://st.suckless.org/patches/delkey -## Why do images not work in st (in programs such as w3m)? -This is a terrible hack that overdraws an image on top of the terminal emulator -window. It also relies on a very specific way the terminal draws it's contents. +## Why do images not work in st using the w3m image hack? + +w3mimg uses a hack that draws an image on top of the terminal emulator Drawable +window. The hack relies on the terminal to use a single buffer to draw its +contents directly. + +st uses double-buffered drawing so the image is quickly replaced and may show a +short flicker effect. + +Below is a patch example to change st double-buffering to a single Drawable +buffer. + +diff --git a/x.c b/x.c +--- a/x.c ++++ b/x.c +@@ -561,10 +561,6 @@ xresize(int col, int row) + win.tw = MAX(1, col * win.cw); + win.th = MAX(1, row * win.ch); + +- XFreePixmap(xw.dpy, xw.buf); +- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); +- XftDrawChange(xw.draw, xw.buf); + xclear(0, 0, win.w, win.h); + } + +@@ -921,8 +917,7 @@ xinit(void) + gcvalues.graphics_exposures = False; + dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, + &gcvalues); +- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); ++ xw.buf = xw.win; + XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); + XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); + +@@ -1386,8 +1381,6 @@ void + draw(void) + { + drawregion(0, 0, term.col, term.row); +- XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, +- win.h, 0, 0); + XSetForeground(xw.dpy, dc.gc, + dc.col[IS_SET(MODE_REVERSE)? + defaultfg : defaultbg].pixel); -A more proper (but limited way) would be using sixels. Which st doesn't -support. ## BadLength X error in Xft when trying to render emoji -- cgit v1.2.3 From 9ba7ecf7b15ec2986c6142036706aa353b249ef9 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Mon, 1 Jun 2020 14:09:46 +0200 Subject: FAQ: fix single-buffer patch rebase against master --- FAQ | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'FAQ') diff --git a/FAQ b/FAQ index fb40264..0f9609d 100644 --- a/FAQ +++ b/FAQ @@ -189,18 +189,18 @@ buffer. diff --git a/x.c b/x.c --- a/x.c +++ b/x.c -@@ -561,10 +561,6 @@ xresize(int col, int row) - win.tw = MAX(1, col * win.cw); - win.th = MAX(1, row * win.ch); +@@ -732,10 +732,6 @@ xresize(int col, int row) + win.tw = col * win.cw; + win.th = row * win.ch; - XFreePixmap(xw.dpy, xw.buf); - xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, - DefaultDepth(xw.dpy, xw.scr)); - XftDrawChange(xw.draw, xw.buf); xclear(0, 0, win.w, win.h); - } -@@ -921,8 +917,7 @@ xinit(void) + /* resize to new width */ +@@ -1148,8 +1144,7 @@ xinit(int cols, int rows) gcvalues.graphics_exposures = False; dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, &gcvalues); @@ -210,10 +210,10 @@ diff --git a/x.c b/x.c XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); -@@ -1386,8 +1381,6 @@ void - draw(void) +@@ -1632,8 +1627,6 @@ xdrawline(Line line, int x1, int y1, int x2) + void + xfinishdraw(void) { - drawregion(0, 0, term.col, term.row); - XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, - win.h, 0, 0); XSetForeground(xw.dpy, dc.gc, -- cgit v1.2.3 From 7e1c68f25d9f08687a94eeef8d7f8ffd0d14b911 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 2 Jan 2022 12:15:45 +0100 Subject: FAQ: fix a typo, patch -> path --- FAQ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FAQ') diff --git a/FAQ b/FAQ index 0f9609d..969b195 100644 --- a/FAQ +++ b/FAQ @@ -29,8 +29,8 @@ you can manually run `tic -sx st.info`. ## I would like to have utmp and/or scroll functionality by default -You can add the absolute patch of both programs in your config.h -file. You only have to modify the value of utmp and scroll variables. +You can add the absolute path of both programs in your config.h file. You only +have to modify the value of utmp and scroll variables. ## Why doesn't the Del key work in some programs? -- cgit v1.2.3