Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
b5fbc92
Port to wayland using wld
michaelforney Oct 31, 2016
b27f17d
Merge remote-tracking branch 'suckless/master' into wayland
michaelforney Dec 22, 2016
e2ee5ee
Split X-specific code into x.c
michaelforney Jan 20, 2017
20f7135
Change default keybindings
k0gaMSX Jan 25, 2017
e7ed326
Support xterm Ms feature to set clipboard
osandov Mar 18, 2017
f2bfd51
keep some glyph modes for the cursor
nreusse Mar 29, 2017
149c0d3
Fix commented out code
Mar 25, 2017
745c40f
Simplify how we keep ATTRs under cursor
Apr 4, 2017
5a10aca
st.1: modify man page to accurately reflect default keybindings
Apr 10, 2017
6cb6d61
Add bold off SGR
May 28, 2017
b331da5
Add color change terminfo capabilities
martanne May 15, 2017
fabd460
Do not obfuscate what make is doing.
Jul 11, 2017
d4928ed
Let the user specify C and LD FLAGS
Jul 11, 2017
c0882f2
Add dim/smxx/rmxx to terminfo, remove duplicate kich1
Jul 11, 2017
8dacdfb
Revert "Add bold off SGR"
Jul 11, 2017
7f99032
fixed STLDFLAG order in broken st Makefile
garbeam Jul 23, 2017
77c51c5
make clipboard patch obsolete
garbeam Sep 1, 2017
9c61f29
Revert "make clipboard patch obsolete"
hiltjo Sep 2, 2017
274d46a
Revert "fixed STLDFLAG order in broken st Makefile"
hiltjo Sep 13, 2017
ee5cc8e
base64dec: skip non-printable characters like \r\n
sunaku Aug 18, 2017
b2ac917
Revert "Revert "fixed STLDFLAG order in broken st Makefile""
hiltjo Sep 15, 2017
b1338e9
Add an error for XftFontOpenPattern failure.
Sep 14, 2017
0ac685f
Fix manpage typo
Oct 10, 2017
c1d23af
Fix FAQ typo
shapeshed Dec 20, 2017
e829e13
Apply ATTR_REVERSE after ATTR_FAINT
bennofs Dec 26, 2017
1f24bde
Fix color with FAINT attribute
bennofs Dec 26, 2017
65976c1
Move config.h include from st.c to x.c
djpohly Oct 17, 2017
428f019
Inline clipboard functions
djpohly Oct 17, 2017
75c9a0e
Remove unneeded array-length variables
djpohly Oct 17, 2017
3e44ee5
Call xsetenv() in main process instead of child
djpohly Oct 10, 2017
416dd25
Move X-related config.h types into x.c
djpohly Oct 17, 2017
3518dba
Move usage() to be with run() in x.c
djpohly Oct 10, 2017
323d38d
Make win variable internal to x.c
djpohly Nov 6, 2017
d527501
Move zoom functions into x.c
djpohly Oct 10, 2017
3bb900c
Remove Time argument from xsetsel
djpohly Nov 7, 2017
626b0ae
Move window urgency handling entirely into x.c
djpohly Oct 10, 2017
8b564c1
Remove X and fontconfig from st.c
djpohly Nov 7, 2017
a09138a
Move font/fontspec variables into x.c and XWindow
djpohly Oct 10, 2017
d84f3f4
Rely on ttyresize to set tty size
djpohly Feb 22, 2018
a831464
Move window-manipulating functions into x.c
djpohly Oct 10, 2017
138caf2
Have selected() check whether selection exists
djpohly Feb 22, 2018
dbe8676
Pass new dimensions into ttyresize
djpohly Oct 10, 2017
5683b1f
Move X-specific selection info into XSelection
djpohly Feb 22, 2018
ed132e1
Move key-matching functions into x.c
djpohly Oct 11, 2017
bcb5d3a
Move terminal-related selection logic into st.c
djpohly Feb 22, 2018
69e32a6
Move opt_* into same file as main()/run()
djpohly Oct 13, 2017
cfc7acd
Move remaining selection mode logic into selextend
djpohly Feb 22, 2018
33201ac
Move CRLF input processing into ttywrite
djpohly Feb 22, 2018
32d3b1d
Factor out equivalent code from ttyread/ttysend
djpohly Oct 16, 2017
52d6fb1
Move terminal echo logic into st.c
djpohly Feb 22, 2018
a5dc1b4
Pull term references out of xdrawcursor
djpohly Feb 24, 2018
a3beb62
Remove x.c dependency on term
djpohly Feb 24, 2018
30683c7
Limit usage of extern to config.h globals
djpohly Feb 24, 2018
e0215d5
Reduce visibility wherever possible
djpohly Feb 24, 2018
05c66cb
Split mode bits between Term and TermWindow
djpohly Feb 23, 2018
403c57e
Clean up #includes
djpohly Feb 24, 2018
88d8293
Move win-agnostic parts of draw/drawregion to st.c
djpohly Feb 24, 2018
20e0da7
General cleanup
djpohly Feb 24, 2018
8b8255a
regression: include termios.h for tcsendbreak etc
hiltjo Mar 9, 2018
b81888e
xhints: no need to initialize sizeh
hiltjo Mar 9, 2018
c5ba9c0
use math.h for ceilf
hiltjo Mar 9, 2018
49a4f91
bump version to 0.8
hiltjo Mar 14, 2018
0f245df
Makefile: add all files to make dist
hiltjo Mar 14, 2018
a712c2d
update LICENSE: major contributors
hiltjo Mar 14, 2018
8ab6290
LICENSE: fix a few years
hiltjo Mar 14, 2018
e7ef3c4
Fix regression from 69e32a6 when setting title.
Mar 16, 2018
0b507bb
Fix title initialization
Mar 16, 2018
7648697
minor code-style: whitespace fixes
hiltjo Mar 16, 2018
5345db3
clipcopy: no need to check for free(NULL), set to NULL after free
hiltjo Mar 17, 2018
6ac8c8a
selextend: clarify: !sel.mode == SEL_IDLE
hiltjo Mar 17, 2018
a5a928b
don't modify argv, use a counter
hiltjo Mar 20, 2018
f4020b2
fix regression by selecting clipboard text
hiltjo Mar 20, 2018
6f0f2b7
bump version to 0.8.1
hiltjo Mar 20, 2018
74cff67
set sel.alt in selstart instead of selextend
daniel-tameling Mar 28, 2018
bd3f7fd
st -v: remove years and copyright text
hiltjo Mar 29, 2018
041912a
error message style and use strerror in a few places
hiltjo Mar 29, 2018
30ce2cc
Pledge on OpenBSD
hiltjo May 25, 2018
235a783
code-style for pledge(2)
hiltjo May 25, 2018
dc3b5ba
config.mk: remove extra newline before EOF
hiltjo Jun 2, 2018
29f341d
Fix crash on resize
Jun 27, 2018
1911c92
Simplify cursor color handling
Jul 14, 2018
b51bcd5
Make cursor follow text color
Jul 14, 2018
5535c1f
Fix crash when cursor color is truecolor
Jul 15, 2018
732be22
Revert "Fix crash when cursor color is truecolor"
hiltjo Jul 17, 2018
8ed7a4b
Revert "Make cursor follow text color"
hiltjo Jul 17, 2018
4f4bccd
Revert "Simplify cursor color handling"
hiltjo Jul 17, 2018
67d0cb6
Remove the ISO 14755 feature
Sep 11, 2018
30ec9a3
small code-style fix
hiltjo Sep 11, 2018
b4d68d4
st: small typofix in comment
hiltjo Nov 4, 2018
d7bf023
fix memory leak in xloadcols()
hiltjo Nov 4, 2018
096b125
output child WEXITSTATUS/WTERMSIG on abnormal termination
lotheac Dec 11, 2018
7e19e11
Makefile: fix dependencies on config.h
hiltjo Jan 4, 2019
e23acb9
Set the path of pkg-config in a variable instead of hardcoding it
Jan 4, 2019
16d9873
Let the user specify CPPFLAGS
Jan 10, 2019
3be4cf1
config: add Shift+Insert as selpaste() again
hiltjo Jan 10, 2019
75f92eb
bump version to 0.8.2
hiltjo Feb 9, 2019
e85b6b6
better Input Method Editor (IME) support
pickfire Feb 12, 2019
a8cb8e9
fix use after free in font caching algorithm
Feb 28, 2019
4e0135a
style: remove double empty newlines
hiltjo Mar 3, 2019
ed68fe7
simplify (greedy) font caching allocating a bit
hiltjo Mar 3, 2019
75b4ba4
be silent about explicitly unhandled mouse modes
lotheac Mar 13, 2019
d5efd25
replace utf8strchr with wcschr
lotheac Mar 13, 2019
add0211
use iswspace()/iswpunct() to find word delimiters
lotheac Mar 13, 2019
927621f
config.def.h: tweak extra worddelimiters
hiltjo Mar 15, 2019
9acec46
minor code-style, initialize var at the top of function
hiltjo Mar 15, 2019
b650256
dont print color warning on color reset OSC 104 without parameter
hiltjo Mar 15, 2019
21367a0
revert part of commit add0211522737b79dad990ccd65c8af63b5cc1dd
hiltjo Mar 15, 2019
f1546cf
selection: fix view to match actual selection on first cell
avih Apr 9, 2019
caa1d8f
FAQ: add entry about color emoji Xft bug
hiltjo May 17, 2019
2b23448
Change from using xdg shell v5 to v6.
etherealvisage Jan 25, 2017
680909c
Add wl_surface_commit() call, as Shugyousha pointed out.
etherealvisage Jul 23, 2018
38c3b45
Change xdg shell from unstable_v6 to stable
ianbeyst Jun 11, 2019
0270454
make clean now removes autogenerated wayland protocol files
ianbeyst Jun 11, 2019
eb57fe7
Replaced all references to "st" by "st-wl"
ianbeyst Jun 11, 2019
24b6ab8
Removed toplevel configure state check that caused strange resize
ianbeyst Jun 12, 2019
7eaafe4
Whitespace, variable names and gitignore
ianbeyst Jun 12, 2019
5ca2e61
Initial work on split implementation similar to upstream st
ianbeyst Jun 12, 2019
96ebe10
cleaned up st-wl.c
ianbeyst Jun 13, 2019
a905bde
cleaned up st-wl.h, added win.h, some other boilerplate work
ianbeyst Jun 13, 2019
fcb79e6
Cleaned up wl.c
ianbeyst Jun 13, 2019
972be5f
Final boilerplate changes to facilitate merging with upstream st
ianbeyst Jun 13, 2019
c282abf
moved needdraw into wl.c. Start using upstream st makefile
ianbeyst Jun 14, 2019
0b2b624
pre-merge changes up until upstream st commit 32d3b1d
ianbeyst Jun 14, 2019
cdeac36
Merged with upstream st until commit 32d3b1d
ianbeyst Jun 14, 2019
e0cb46f
pre-merge changes up until st upstream commit 52d6fb1
ianbeyst Jun 14, 2019
274ccfd
merged with upstream st up until commit 52d6fb1
ianbeyst Jun 14, 2019
9b95f42
pre-merge changes up until st upstream commit 88d8293
ianbeyst Jun 14, 2019
eb15932
merged with upstream st up until commmit 88d8293, harmonized names
ianbeyst Jun 14, 2019
4fdd325
pre-merge changes up until st upstream commit 20e0da7
ianbeyst Jun 14, 2019
ba5c78d
merged with upstream st up until commit 20e0da7
ianbeyst Jun 14, 2019
c6c40a4
pre-merge changes up until upstream st commit caa1d8f
ianbeyst Jun 15, 2019
cad5d5f
merged with upstream st up until commit caa1d8f
ianbeyst Jun 15, 2019
f43d695
Fixed window visibility handling, fixed makefile install bug, other b…
ianbeyst Jun 15, 2019
cfde55e
removed x.c
ianbeyst Jun 15, 2019
a062974
cleanup, reordered some code
ianbeyst Jun 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config.h
29 changes: 28 additions & 1 deletion FAQ
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down Expand Up @@ -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.
9 changes: 6 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
MIT/X Consortium License

© 2014-2018 Hiltjo Posthuma <hiltjo at codemadness dot org>
© 2018 Devin J. Pohly <djpohly at gmail dot com>
© 2014-2017 Quentin Rameau <quinq at fifth dot space>
© 2009-2012 Aurélien APTEL <aurelien dot aptel at gmail dot com>
© 2009 Anselm R Garbe <garbeam at gmail dot com>
© 2012-2016 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
© 2008-2017 Anselm R Garbe <garbeam at gmail dot com>
© 2012-2017 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
© 2012-2016 Christoph Lohmann <20h at r-36 dot net>
© 2013 Eon S. Jeon <esjeon at hyunmu dot am>
© 2013 Alexander Sedov <alex0player at gmail dot com>
© 2013 Mark Edgar <medgar123 at gmail dot com>
© 2013 Eric Pruitt <eric.pruitt at gmail dot com>
© 2013-2014 Eric Pruitt <eric.pruitt at gmail dot com>
© 2013 Michael Forney <mforney at mforney dot org>
© 2013-2014 Markus Teich <markus dot teich at stusta dot mhn dot de>
© 2014-2015 Laslo Hunhold <dev at frign dot de>
Expand Down
79 changes: 42 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,60 +1,65 @@
# st - simple terminal
# See LICENSE file for copyright and license details.
.POSIX:

include config.mk

SRC = st.c
OBJ = ${SRC:.c=.o}
SRC = st.c wl.c xdg-shell-protocol.c
OBJ = $(SRC:.c=.o)

all: options st
all: options st-wl

options:
@echo st build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
@echo st-wl build options:
@echo "CFLAGS = $(STCFLAGS)"
@echo "LDFLAGS = $(STLDFLAGS)"
@echo "CC = $(CC)"

config.h:
cp config.def.h config.h

xdg-shell-protocol.c:
@echo GEN $@
@wayland-scanner private-code $(XDG_SHELL_PROTO) $@

xdg-shell-client-protocol.h:
@echo GEN $@
@wayland-scanner client-header $(XDG_SHELL_PROTO) $@

.c.o:
@echo CC $<
@${CC} -c ${CFLAGS} $<
$(CC) $(STCFLAGS) -c $<

${OBJ}: config.h config.mk
st.o: st.h win.h
wl.o: arg.h st.h win.h config.h xdg-shell-client-protocol.h

st: ${OBJ}
@echo CC -o $@
@${CC} -o $@ ${OBJ} ${LDFLAGS}
$(OBJ): config.h config.mk

st-wl: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS)

clean:
@echo cleaning
@rm -f st ${OBJ} st-${VERSION}.tar.gz
rm -f st-wl $(OBJ) st-wl-$(VERSION).tar.gz xdg-shell-*

dist: clean
@echo creating dist tarball
@mkdir -p st-${VERSION}
@cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 arg.h ${SRC} st-${VERSION}
@tar -cf st-${VERSION}.tar st-${VERSION}
@gzip st-${VERSION}.tar
@rm -rf st-${VERSION}

install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f st ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/st
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
@echo Please see the README file regarding the terminfo entry of st.
@tic -sx st.info
mkdir -p st-wl-$(VERSION)
cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
config.def.h st-wl.info st-wl.1 arg.h st-wl.h win.h $(SRC)\
st-wl-$(VERSION)
tar -cf - st-wl-$(VERSION) | gzip > st-wl-$(VERSION).tar.gz
rm -rf st-wl-$(VERSION)

install: st-wl
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f st-wl $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/st-wl
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < st-wl.1 > $(DESTDIR)$(MANPREFIX)/man1/st-wl.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st-wl.1
tic -sx st-wl.info
@echo Please see the README file regarding the terminfo entry of st-wl.

uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/st
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/st.1
rm -f $(DESTDIR)$(PREFIX)/bin/st-wl
rm -f $(DESTDIR)$(MANPREFIX)/man1/st-wl.1

.PHONY: all options clean dist install uninstall
22 changes: 12 additions & 10 deletions arg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,30 @@ extern char *argv0;
argc--;\
break;\
}\
for (brk_ = 0, argv[0]++, argv_ = argv;\
argv[0][0] && !brk_;\
argv[0]++) {\
int i_;\
for (i_ = 1, brk_ = 0, argv_ = argv;\
argv[0][i_] && !brk_;\
i_++) {\
if (argv_ != argv)\
break;\
argc_ = argv[0][0];\
argc_ = argv[0][i_];\
switch (argc_)

#define ARGEND }\
}

#define ARGC() argc_

#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\
#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
((x), abort(), (char *)0) :\
(brk_ = 1, (argv[0][1] != '\0')?\
(&argv[0][1]) :\
(brk_ = 1, (argv[0][i_+1] != '\0')?\
(&argv[0][i_+1]) :\
(argc--, argv++, argv[0])))

#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\
#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
(char *)0 :\
(brk_ = 1, (argv[0][1] != '\0')?\
(&argv[0][1]) :\
(brk_ = 1, (argv[0][i_+1] != '\0')?\
(&argv[0][i_+1]) :\
(argc--, argv++, argv[0])))

#endif
Loading