st-flexipatch
st-flexipatch copied to clipboard
glitches after opening new windows?
no idea what causes this
the patches i have enabled are:
alpha
anysize
anysize_nobar
boxdraw
clipboard
columns
font2
ligatures
newterm
openurlonclick
scrollback
scrollback_mouse
sixel
sync
w3m
xresources
xresources_reload
This looks to be caused by the anysize patch.
I can replicate this by making the st terminal floating and resizing it vertically. It's a bit silly that it tries to center the content of the terminal, other terminals don't do this as far as I can see.
so is there a fix for this?
Try this, enabled via ANYSIZE_SIMPLE_PATCH
. I don't understand why the anysize patch is so convoluted. I don't think you need the ANYSIZE_NOBAR_PATCH
, but you can enable it if you observe any graphical issues.
it works fine with anysize_simple_patch
also i just noticed another thing
whenever i exit neovim ;420;720t gets printed on the terminal
You are right, I see it as well.
It comes from the sixel patch, I am not entirely sure why it is needed:
#if SIXEL_PATCH
case 't':
/* TODO should probably not be hard-coded */
ttywrite(";420;720t", 10, 1);
break;
#endif // SIXEL_PATCH
what is that case for?
I don't know, I checked https://github.com/charlesdaniels/st and it's the same behaviour there.
Thankfully the commit comment has an explanation: https://github.com/charlesdaniels/st/commit/b50be8225dd2cd6de35a9b6219c556bac355255c
i also just realized sixel doesn't work in my terminal. lsix doesn't display any images
I removed the case, couldn't replicate the scenario about the scrollback buffer.
As for sixel, you may want to try img2sixel as well. If it doesn't show anything then maybe double check that you indeed still have the SIXEL_PATCH
enabled.
img2sixel is in libsixel package right? is there a binary for it? i dont know why but the aur package doesn't compile properly
I'm not aware of a binary for it, I use the aur/libsixel installed using paru.
i tried and img2sixel isn't working i do have sixel_patch enabled
I don't know then, maybe double check if sixel graphics is working in other terminals.
There's mlterm where this works out of the box (although the placement of the image is always at the top of the terminal window and is subject to cropping).
In xterm you can enable sixel support by adding this to your ~/.Xresources file:
xterm*decTerminalID : vt340
I must say I like how smooth the scrolling of images is in xterm.
yeah they work in xterm
eh it's fine, i don't need sixel that much anyway thanks for resolving everything else!
@godspeedfw Yeah the current hint in the patches.def.h about removing lines to get SIXEL to work is a bit misleading.
I dunno why it was removed removed from the Makefile, but it will work if you add SIXEL_C = sixel.c sixel_hls.c
like here (but to line 6):
https://github.com/bakkeby/st-flexipatch/blob/245c409863f97e637902837be4482dd398b38d3a/Makefile#L11-L12
I cloned the repo again, added that, run make
and sudo make install
and lsix
just worked.
nope, still doesn't work for me
and I think it was removed because SIXEL_C is defined in config.mk which is included in the Makefile
So what is in your config.mk?
# st version
VERSION = 0.8.4
# Customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
PKG_CONFIG = pkg-config
# Uncomment this for the alpha patch / ALPHA_PATCH
XRENDER = -lXrender
# Uncomment this for the themed cursor patch / THEMED_CURSOR_PATCH
#XCURSOR = -lXcursor
# Uncomment the lines below for the ligatures patch / LIGATURES_PATCH
LIGATURES_C = hb.c
LIGATURES_H = hb.h
LIGATURES_INC = `$(PKG_CONFIG) --cflags harfbuzz`
LIGATURES_LIBS = `$(PKG_CONFIG) --libs harfbuzz`
# Uncomment this for the SIXEL patch / SIXEL_PATCH
SIXEL_C = sixel.c sixel_hls.c
# includes and libs, uncomment harfbuzz for the ligatures patch
INCS = -I$(X11INC) \
`$(PKG_CONFIG) --cflags fontconfig` \
`$(PKG_CONFIG) --cflags freetype2` \
$(LIGATURES_INC)
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft ${XRENDER} ${XCURSOR}\
`$(PKG_CONFIG) --libs fontconfig` \
`$(PKG_CONFIG) --libs freetype2` \
$(LIGATURES_LIBS)
# flags
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
STLDFLAGS = $(LIBS) $(LDFLAGS)
# OpenBSD:
#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \
# `pkg-config --libs fontconfig` \
# `pkg-config --libs freetype2`
# compiler and linker
# CC = c99
Do you still have SIXEL_PATCH
enabled in your patches.h
file?
#define SIXEL_PATCH 1
yes
I went through the patches again from your first post. Looks like there is a conflict between the w3m patch and the sixel patch that causes this.
You're right, sixel works after I disable w3m. There is no need to make changes in the Makefile either.
I dunno why it was removed removed from the Makefile
@schrmh I moved all of the ligatures and sixel stuff out of the Makefile into config.mk to make it easier and more consistent for people, i.e. you only need to uncomment things in config.mk now instead of having to fiddle in both that and the Makefile.
I'll update the misleading comment in patches.def.h.
so, can the conflict between w3m and sixel be fixed?
So to get w3m images to show you need to have both W3M_PATCH
and SINGLE_DRAWABLE_BUFFER_PATCH
enabled, in which case the SIXEL_PATCH
will work as well.
But as far as I can tell you can't combine the above with the ALPHA_PATCH
as w3m images do not show then.
do w3m images not show even when transparency is 0 with ALPHA_PATCH
enabled?
nvm i checked and they don't