diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index fd1516b..08c1d4b 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,62 +1,36 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json -name: Build/Publish XBPS +name: Update void-packages template on: push: - paths: - - "config**" + tags: ["*"] jobs: - build-and-publish: - runs-on: docker - container: git.snaile.de/snailed/xbps-builder:2024.0520.2027@sha256:19295b8f229fffa436956f35c6f0ce266adbe11e5a44edbe24d9e0ed29edabd6 - env: - LICENSE: "GPL-2.0" - SHORT_DESCRIPTION: "Customized st" - DEPENDENCIES: "freetype>=2.12.1,glibc>=2.32,fontconfig>=2.6.0,libX11>=1.2,libXft>=2.3.8,ncurses>=0" - MAINTAINER: "Luca Bilke " - NAME: "st-custom" - ARCH: "x86_64" + update-template: + name: Update xbps-src template + runs-on: ubuntu-latest steps: - - name: Checkout - uses: https://code.forgejo.org/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/checkout@v4 with: - submodules: true + fetch-depth: 0 + token: ${{ secrets.FORGEJO_PUSH_TOKEN }} + repository: "snailed/void-packages" + sparse-checkout: "srcpkgs/st-custom/" + ref: "master" - - name: Generate tag and package name + - name: Modify template + id: checksum run: | - set -xeu - MAJOR=$(date +%Y) - MINOR=$(date +%m%d) - PATCH=$(date +%H%M) - echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV + sed -i '/version=/ c version=${{ github.ref_name }}' srcpkgs/st-custom/template - - name: Build - run: | - set -xeu - make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr" + wget https://git.snaile.de/snailed/st-custom/archive/${{ github.ref_name }}.tar.gz + sha256sum="$(sha256sum ${{ github.ref_name }}.tar.gz | cut -d ' ' -f 1)" + sed -i "/checksum=/ c checksum=${sha256sum}" srcpkgs/st-custom/template - - name: Create package - run: | - set -xeu - export XBPS_TARGET_ARCH=${{ env.ARCH }} - mkdir /target && cd /target || exit 1 - xbps-create -A ${{ env.ARCH }} \ - -H "${{ github.server_url }}/${{ github.repository }}" \ - -l "${{ env.LICENSE }}" \ - -n "${{ env.PACKAGE_NAME }}" \ - -m "${{ env.MAINTAINER }}" \ - -s "${{ env.SHORT_DESCRIPTION }}" \ - -D "${{ env.DEPENDENCIES }}" \ - "${GITHUB_WORKSPACE}/pkg" - - - name: Push Package - run: | - set -xeu - curl -so "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata" - xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps" - echo '${{ secrets.XBPS_SIGNING_KEY }}' >/tmp/privkey.pem - XBPS_PASSPHRASE=${{ secrets.XBPS_SIGNING_PASSPHRASE }} xbps-rindex --privkey /tmp/privkey.pem --sign-pkg --signedby "${{ env.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps" - rm /tmp/privkey.pem - ls -lAH /target - find /target -type f -exec sh -c 'curl -X PUT --digest -u "${{ vars.XBPS_WEBDAV_USER }}:${{ secrets.XBPS_WEBDAV_KEY }}" -T "${1}" "https://xbps.snaile.de/$(basename $1)"' find-shell {} \; + - name: Commit + uses: https://github.com/stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0 + with: + commit_user_name: "Johnny5" + commit_user_email: "bot@snaile.de" + commit_author: "Johnny5 " + commit_message: "st-custom: update to ${{ github.ref_name }}." diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 390b995..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "st-flexipatch"] - path = st-flexipatch - url = https://github.com/bakkeby/st-flexipatch -[submodule "flexipatch-finalizer"] - path = flexipatch-finalizer - url = https://github.com/bakkeby/flexipatch-finalizer diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..b4d0b8a --- /dev/null +++ b/FAQ @@ -0,0 +1,253 @@ +## Why does st not handle utmp entries? + +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 + terminfo. What you see is the current state of the “xterm compliance”. +* 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. + * `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/). + + +## I would like to have utmp and/or scroll functionality by default + +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? + +Taken from the terminfo manpage: + + If the terminal has a keypad that transmits codes when the keys + are pressed, this information can be given. Note that it is not + possible to handle terminals where the keypad only works in + local (this applies, for example, to the unshifted HP 2621 keys). + If the keypad can be set to transmit or not transmit, give these + codes as smkx and rmkx. Otherwise the keypad is assumed to + always transmit. + +In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that +applications which want to test against keypad keys send these +sequences. + +But buggy applications (like bash and irssi, for example) don't do this. A fast +solution for them is to use the following command: + + $ printf '\033[?1h\033=' >/dev/tty + +or + $ tput smkx + +In the case of bash, readline is used. Readline has a different note in its +manpage about this issue: + + enable-keypad (Off) + When set to On, readline will try to enable the + application keypad when it is called. Some systems + need this to enable arrow keys. + +Adding this option to your .inputrc will fix the keypad problem for all +applications using readline. + +If you are using zsh, then read the zsh FAQ +: + + It should be noted that the O / [ confusion can occur with other keys + such as Home and End. Some systems let you query the key sequences + sent by these keys from the system's terminal database, terminfo. + Unfortunately, the key sequences given there typically apply to the + mode that is not the one zsh uses by default (it's the "application" + mode rather than the "raw" mode). Explaining the use of terminfo is + outside of the scope of this FAQ, but if you wish to use the key + sequences given there you can tell the line editor to turn on + "application" mode when it starts and turn it off when it stops: + + function zle-line-init () { echoti smkx } + function zle-line-finish () { echoti rmkx } + zle -N zle-line-init + zle -N zle-line-finish + +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 +. +If you want to compile st for OpenBSD you have to remove -lrt from config.mk, and +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 +backspace. + +This is an issue that was discussed in suckless mailing list +. 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 + of this key. When ASCII was defined in 1968, communication + with computers was done using punched cards, or hardcopy + terminals (basically a typewriter machine connected with the + computer using a serial port). ASCII defines DELETE as 7F, + because, in punched-card terms, it means all the holes of the + card punched; it is thus a kind of 'physical delete'. In the + same way, the BACKSPACE key was a non-destructive backspace, + as on a typewriter. So, if you wanted to delete a character, + you had to BACKSPACE and then DELETE. Another use of BACKSPACE + was to type accented characters, for example 'a BACKSPACE `'. + The VT100 had no BACKSPACE key; it was generated using the + CONTROL key as another control character (CONTROL key sets to + 0 b7 b6 b5, so it converts H (code 0x48) into BACKSPACE (code + 0x08)), but it had a DELETE key in a similar position where + the BACKSPACE key is located today on common PC keyboards. + All the terminal emulators emulated the difference between + these keys correctly: the backspace key generated a BACKSPACE + (^H) and delete key generated a DELETE (^?). + + But a problem arose when Linus Torvalds wrote Linux. Unlike + earlier terminals, the Linux virtual terminal (the terminal + emulator integrated in the kernel) returned a DELETE when + backspace was pressed, due to the VT100 having a DELETE key in + the same position. This created a lot of problems (see [1] + and [2]). Since Linux has become the king, a lot of terminal + emulators today generate a DELETE when the backspace key is + pressed in order to avoid problems with Linux. The result is + that the only way of generating a BACKSPACE on these systems + is by using CONTROL + H. (I also think that emacs had an + important point here because the CONTROL + H prefix is used + in emacs in some commands (help commands).) + + From point of view of the kernel, you can change the key + for deleting a previous character with stty erase. When you + connect a real terminal into a machine you describe the type + of terminal, so getty configures the correct value of stty + erase for this terminal. In the case of terminal emulators, + however, you don't have any getty that can set the correct + value of stty erase, so you always get the default value. + For this reason, it is necessary to add 'stty erase ^H' to your + profile if you have changed the value of the backspace key. + Of course, another solution is for st itself to modify the + value of stty erase. I usually have the inverse problem: + when I connect to non-Unix machines, I have to press CONTROL + + h to get a BACKSPACE. The inverse problem occurs when a user + connects to my Unix machines from a different system with a + correct backspace key. + + [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 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 +@@ -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); + + /* 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); +- 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); + +@@ -1632,8 +1627,6 @@ xdrawline(Line line, int x1, int y1, int x2) + void + xfinishdraw(void) + { +- 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); + + +## 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. + +As of 2022-09-05 this now seems to be finally fixed in libXft 2.3.5: +https://gitlab.freedesktop.org/xorg/lib/libxft/-/blob/libXft-2.3.5/NEWS \ No newline at end of file diff --git a/LEGACY b/LEGACY new file mode 100644 index 0000000..bf28b1e --- /dev/null +++ b/LEGACY @@ -0,0 +1,17 @@ +A STATEMENT ON LEGACY SUPPORT + +In the terminal world there is much cruft that comes from old and unsup‐ +ported terminals that inherit incompatible modes and escape sequences +which noone is able to know, except when he/she comes from that time and +developed a graphical vt100 emulator at that time. + +One goal of st is to only support what is really needed. When you en‐ +counter a sequence which you really need, implement it. But while you +are at it, do not add the other cruft you might encounter while sneek‐ +ing at other terminal emulators. History has bloated them and there is +no real evidence that most of the sequences are used today. + + +Christoph Lohmann <20h@r-36.net> +2012-09-13T07:00:36.081271045+02:00 + diff --git a/Makefile b/Makefile index c516c58..3dc6258 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ # st - simple terminal # See LICENSE file for copyright and license details. -.PHONY: all clean install uninstall - .POSIX: include config.mk @@ -9,63 +7,48 @@ include config.mk SRC = st.c x.c $(LIGATURES_C) $(SIXEL_C) OBJ = $(SRC:.c=.o) -all: st terminfo +all: st + +config.h: + cp config.def.h config.h .c.o: $(CC) $(STCFLAGS) -c $< st.o: config.h st.h win.h x.o: arg.h config.h st.h win.h $(LIGATURES_H) -config.mk: - cp config/config.mk config.mk -config.h: - cp config/config.h config.h - -$(SRC): buildroot $(OBJ): config.h config.mk -st: buildroot $(OBJ) +st: $(OBJ) $(CC) -o $@ $(OBJ) $(STLDFLAGS) -terminfo: buildroot - tic -sx -o terminfo st.info - clean: - find . -maxdepth 1 -type f | grep -Pv "^\./\.|Makefile$$" | xargs -r rm - rm -r tmp patch terminfo 2>/dev/null || true - git -C st-flexipatch reset --hard HEAD - git -C st-flexipatch clean -fdx + rm -f st $(OBJ) st-$(VERSION).tar.gz -buildroot: - cp config/patches.h st-flexipatch/patches.h - flexipatch-finalizer/flexipatch-finalizer.sh -r -d st-flexipatch -o tmp - rm -r tmp/Makefile tmp/config.mk patch 2>/dev/null || true - mv tmp/* ./ - for patch in config/patches/*.diff; do patch <"$$patch"; done +dist: clean + mkdir -p st-$(VERSION) + cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\ + config.def.h st.info st.1 arg.h st.h win.h $(LIGATURES_H) $(SRC)\ + st-$(VERSION) + tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz + rm -rf st-$(VERSION) -install: st terminfo +install: st mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f st $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/st mkdir -p $(DESTDIR)$(MANPREFIX)/man1 sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 - mkdir -p $(DESTDIR)$(PREFIX)/share - cp -a terminfo $(DESTDIR)$(PREFIX)/share/terminfo - chmod 755 $(DESTDIR)$(PREFIX)/share/terminfo/s - chmod 644 $(DESTDIR)$(PREFIX)/share/terminfo/s/st-* - # mkdir -p $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch - # test -f ${DESTDIR}${PREFIX}/share/applications/st.desktop || cp -n st.desktop $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch - + tic -sx st.info + mkdir -p $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch + test -f ${DESTDIR}${PREFIX}/share/applications/st.desktop || cp -n st.desktop $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch + @echo Please see the README file regarding the terminfo entry of st. + uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/st rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop # desktop-entry patch - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-256color - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-bs - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-bs-256color - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-meta - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-meta-256color - rm -f $(DESTDIR)$(PREFIX)/share/terminfo/s/st-mono + +.PHONY: all clean dist install uninstall diff --git a/README b/README new file mode 100644 index 0000000..6a846ed --- /dev/null +++ b/README @@ -0,0 +1,34 @@ +st - simple terminal +-------------------- +st is a simple terminal emulator for X which sucks less. + + +Requirements +------------ +In order to build st you need the Xlib header files. + + +Installation +------------ +Edit config.mk to match your local setup (st is installed into +the /usr/local namespace by default). + +Afterwards enter the following command to build and install st (if +necessary as root): + + make clean install + + +Running st +---------- +If you did not install st with make clean install, you must compile +the st terminfo entry with the following command: + + tic -sx st.info + +See the man page for additional details. + +Credits +------- +Based on Aurélien APTEL bt source code. + diff --git a/TODO b/TODO new file mode 100644 index 0000000..5f74cd5 --- /dev/null +++ b/TODO @@ -0,0 +1,28 @@ +vt emulation +------------ + +* double-height support + +code & interface +---------------- + +* add a simple way to do multiplexing + +drawing +------- +* add diacritics support to xdraws() + * switch to a suckless font drawing library +* make the font cache simpler +* add better support for brightening of the upper colors + +bugs +---- + +* fix shift up/down (shift selection in emacs) +* remove DEC test sequence when appropriate + +misc +---- + + $ grep -nE 'XXX|TODO' st.c + diff --git a/config/config.h b/config/config.h deleted file mode 100644 index 7dd598e..0000000 --- a/config/config.h +++ /dev/null @@ -1,332 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* - * appearance - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ -static char *font = "FiraCode Nerd Font:pixelsize=14"; -/* Spare fonts */ -static char *font2[] = { - "Noto Color Emoji:pixelsize=14", -}; - -static int borderpx = 2; - -/* modkey options: ControlMask, ShiftMask or XK_ANY_MOD */ -static uint url_opener_modkey = XK_ANY_MOD; -static char *url_opener = "xdg-open"; - -/* - * What program is execed by st depends of these precedence rules: - * 1: program passed with -e - * 2: scroll and/or utmp - * 3: SHELL environment variable - * 4: value of shell in /etc/passwd - * 5: value of shell in config.h - */ -static char *shell = "/bin/sh"; -char *utmp = NULL; -/* scroll program: to enable use a string like "scroll" */ -char *scroll = NULL; -char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; - -/* identification sequence returned in DA and DECID */ -char *vtiden = "\033[?62;4c"; /* VT200 family (62) with sixel (4) */ - -/* sixel rgb byte order: LSBFirst or MSBFirst */ -int const sixelbyteorder = LSBFirst; - -/* Kerning / character bounding-box multipliers */ -static float cwscale = 1.0; -static float chscale = 1.0; - -/* - * word delimiter string - * - * More advanced example: L" `'\"()[]{}" - */ -wchar_t *worddelimiters = L" `'\"()[]{}=,"; - -/* Word delimiters for short and long jumps in the keyboard select patch */ -wchar_t *kbds_sdelim = L"!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~ "; -wchar_t *kbds_ldelim = L" "; - -/* selection timeouts (in milliseconds) */ -static unsigned int doubleclicktimeout = 300; -static unsigned int tripleclicktimeout = 600; - -/* alt screens */ -int allowaltscreen = 1; - -/* allow certain non-interactive (insecure) window operations such as: - setting the clipboard text */ -int allowwindowops = 0; - -/* - * draw latency range in ms - from new content/keypress/etc until drawing. - * within this range, st draws when content stops arriving (idle). mostly it's - * near minlatency, but it waits longer for slow updates to avoid partial draw. - * low minlatency will tear/flicker more, as it can "detect" idle too early. - */ -static double minlatency = 2; -static double maxlatency = 33; - -/* - * Synchronized-Update timeout in ms - * https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec - */ -static uint su_timeout = 200; - -/* - * blinking timeout (set to 0 to disable blinking) for the terminal blinking - * attribute. - */ -static unsigned int blinktimeout = 800; - -/* - * thickness of underline and bar cursors - */ -static unsigned int cursorthickness = 2; - -/* Hide the X cursor whenever a key is pressed. 0: off, 1: on */ -int hidecursor = 1; - -/* - * 1: render most of the lines/blocks characters without using the font for - * perfect alignment between cells (U2500 - U259F except dashes/diagonals). - * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored. - * 0: disable (render all U25XX glyphs normally from the font). - */ -const int boxdraw = 1; -const int boxdraw_bold = 0; - -/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ -const int boxdraw_braille = 1; - -/* - * bell volume. It must be a value between -100 and 100. Use 0 for disabling - * it - */ -static int bellvolume = 0; - -/* default TERM value */ -char *termname = "st-256color"; - -/* - * spaces per tab - * - * When you are changing this value, don't forget to adapt the »it« value in - * the st.info and appropriately install the st.info in the environment where - * you use this st version. - * - * it#$tabspaces, - * - * Secondly make sure your kernel is not expanding tabs. When running `stty - * -a` »tab0« should appear. You can tell the terminal to not expand tabs by - * running following command: - * - * stty tabs - */ -unsigned int tabspaces = 8; - -#define BLACK "#15161E" -#define RED "#f7768e" -#define GREEN "#9ece6a" -#define ORANGE "#e0af68" -#define BLUE "#7aa2f7" -#define MAGENTA "#bb9af7" -#define CYAN "#7dcfff" -#define LIGHT_GRAY "#a9b1d6" -#define GRAY "#414868" -#define WHITE "#c0caf5" -#define UNDEFINED "#ff0000" - -/* Terminal colors (16 first used in escape sequence) */ -static const char *colorname[] = { - /* 8 normal colors */ - BLACK, RED, GREEN, ORANGE, BLUE, MAGENTA, CYAN, LIGHT_GRAY, - - /* 8 bright colors */ - GRAY, RED, GREEN, ORANGE, BLUE, MAGENTA, CYAN, WHITE, - - [255] = 0, - - /* more colors can be added after 255 to use with DefaultXX */ - "#1a1b26", /* 256 -> darker black */ - "#283457", /* 257 -> selection background colour */ -}; - -/* - * Default colors (colorname index) - * foreground, background, cursor, reverse cursor - */ -unsigned int defaultfg = 15; -unsigned int defaultbg = 256; -unsigned int defaultcs = 15; -unsigned int defaultrcs = 256; -unsigned int selectionfg = 15; -unsigned int selectionbg = 257; -/* If 0 use selectionfg as foreground in order to have a uniform - * foreground-color */ -/* Else if 1 keep original foreground-color of each cell => more colors :) */ -static int ignoreselfg = 1; -/* Foreground and background color of search results */ -unsigned int highlightfg = 256; -unsigned int highlightbg = 3; - -/* - * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 - * Default style of cursor - * 0: Blinking block - * 1: Blinking block (default) - * 2: Steady block ("â–ˆ") - * 3: Blinking underline - * 4: Steady underline ("_") - * 5: Blinking bar - * 6: Steady bar ("|") - * 7: Blinking st cursor - * 8: Steady st cursor - */ -static unsigned int cursorstyle = 1; -static Rune stcursor = 0x2603; /* snowman (U+2603) */ - -/* - * Default columns and rows numbers - */ - -static unsigned int cols = 80; -static unsigned int rows = 24; - -/* - * Default colour and shape of the mouse cursor - */ -static unsigned int mouseshape = XC_xterm; -static unsigned int mousefg = 7; -static unsigned int mousebg = 0; - -/* - * Color used to display font attributes when fontconfig selected a font which - * doesn't match the ones requested. - */ -static unsigned int defaultattr = 11; - -/* - * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forcemousemod = ShiftMask; - -/* - * Internal mouse shortcuts. - * Beware that overloading Button1 will disable the selection. - */ -static MouseShortcut mshortcuts[] = { - /* mask button function argument release - screen */ - {ShiftMask, Button4, kscrollup, {.i = 1}, 0, S_PRI}, - {ShiftMask, Button5, kscrolldown, {.i = 1}, 0, S_PRI}, -}; - -/* Internal keyboard shortcuts. */ -#define MODKEY Mod1Mask -#define TERMMOD (ControlMask | ShiftMask) - -static char *openurlcmd[] = {"/bin/sh", "-c", - "xurls | dmenu -l 10 -w $WINDOWID | xargs -r open", - "externalpipe", NULL}; - -static char *setbgcolorcmd[] = {"/bin/sh", "-c", "printf '\033]11;#008000\007'", - "externalpipein", NULL}; - -static Shortcut shortcuts[] = { - {XK_ANY_MOD, XK_Break, sendbreak, {.i = 0}}, - {ControlMask, XK_Print, toggleprinter, {.i = 0}}, - {TERMMOD, XK_Print, printscreen, {.i = 0}}, - {XK_ANY_MOD, XK_Print, printsel, {.i = 0}}, - {TERMMOD, XK_Prior, zoom, {.f = +3}}, - {TERMMOD, XK_Next, zoom, {.f = -3}}, - {TERMMOD, XK_Home, zoomreset, {.f = 0}}, - {TERMMOD, XK_C, clipcopy, {.i = 0}}, - {TERMMOD, XK_V, clippaste, {.i = 0}}, - {TERMMOD, XK_Y, selpaste, {.i = 0}}, - {TERMMOD, XK_K, kscrollup, {.i = 1}, S_PRI}, - {TERMMOD, XK_J, kscrolldown, {.i = 1}, S_PRI}, - {TERMMOD, XK_U, kscrollup, {.i = 20}, S_PRI}, - {TERMMOD, XK_D, kscrolldown, {.i = 20}, S_PRI}, - {TERMMOD, XK_Num_Lock, numlock, {.i = 0}}, - {TERMMOD, XK_Escape, keyboard_select, {0}}, - {TERMMOD, XK_F, searchforward, {0}}, - {TERMMOD, XK_B, searchbackward, {0}}, -}; - -/* - * Special keys (change & recompile st.info accordingly) - * - * Mask value: - * * Use XK_ANY_MOD to match the key no matter modifiers state - * * Use XK_NO_MOD to match the key alone (no modifiers) - * appkey value: - * * 0: no value - * * > 0: keypad application mode enabled - * * = 2: term.numlock = 1 - * * < 0: keypad application mode disabled - * appcursor value: - * * 0: no value - * * > 0: cursor application mode enabled - * * < 0: cursor application mode disabled - * - * Be careful with the order of the definitions because st searches in - * this table sequentially, so any XK_ANY_MOD must be in the last - * position for a key. - */ - -/* - * State bits to ignore when matching key or button events. By default, - * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. - */ -static uint ignoremod = Mod2Mask | XK_SWITCH_MOD; - -/* - * Selection types' masks. - * Use the same masks as usual. - * Button1Mask is always unset, to make masks match between ButtonPress. - * ButtonRelease and MotionNotify. - * If no match is found, regular selection is used. - */ -static uint selmasks[] = { - [SEL_RECTANGULAR] = Mod1Mask, -}; - -/* - * Printable characters in ASCII, used to estimate the advance width - * of single wide characters. - */ -static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" - "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" - "`abcdefghijklmnopqrstuvwxyz{|}~"; - -/** - * Undercurl style. Set UNDERCURL_STYLE to one of the available styles. - * - * Curly: Dunno how to draw it *shrug* - * _ _ _ _ - * ( ) ( ) ( ) ( ) - * (_) (_) (_) (_) - * - * Spiky: - * /\ /\ /\ /\ - * \/ \/ \/ - * - * Capped: - * _ _ _ - * / \ / \ / \ - * \_/ \_/ - */ -// Available styles -#define UNDERCURL_CURLY 0 -#define UNDERCURL_SPIKY 1 -#define UNDERCURL_CAPPED 2 -// Active style -#define UNDERCURL_STYLE UNDERCURL_CURLY diff --git a/config/config.mk b/config/config.mk deleted file mode 100644 index ea3a8b2..0000000 --- a/config/config.mk +++ /dev/null @@ -1,60 +0,0 @@ -# st version -VERSION = 0.9.1 - -# Customize below to fit your system - -# paths -PREFIX = /usr/local -MANPREFIX = $(PREFIX)/share/man -ICONPREFIX = $(PREFIX)/share/pixmaps -ICONNAME = st.png - -X11INC = /usr/include/X11 -X11LIB = /usr/lib - -PKG_CONFIG = pkg-config - -# Uncomment this for the alpha patch / ALPHA_PATCH -#XRENDER = `$(PKG_CONFIG) --libs xrender` - -# Uncomment this for the themed cursor patch / THEMED_CURSOR_PATCH -#XCURSOR = `$(PKG_CONFIG) --libs xcursor` - -# 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 -SIXEL_LIBS = `$(PKG_CONFIG) --libs imlib2` - -# Uncomment for the netwmicon patch / NETWMICON_PATCH -#NETWMICON_LIBS = `$(PKG_CONFIG) --libs gdlib` - -# 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 ${SIXEL_LIBS} ${XRENDER} ${XCURSOR}\ - `$(PKG_CONFIG) --libs fontconfig` \ - `$(PKG_CONFIG) --libs freetype2` \ - $(LIGATURES_LIBS) \ - $(NETWMICON_LIBS) - -# flags -STCPPFLAGS = -DVERSION=\"$(VERSION)\" -DICON=\"$(ICONPREFIX)/$(ICONNAME)\" -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` -#MANPREFIX = ${PREFIX}/man - -# compiler and linker -# CC = c99 diff --git a/config/patches.h b/config/patches.h deleted file mode 100644 index b0b82dd..0000000 --- a/config/patches.h +++ /dev/null @@ -1,488 +0,0 @@ -/* - * This file contains patch control flags. - * - * In principle you should be able to mix and match any patches - * you may want. In cases where patches are logically incompatible - * one patch may take precedence over the other as noted in the - * relevant descriptions. - */ - -/* Patches */ - -/* The alpha patch adds transparency for the terminal. - * You need to uncomment the corresponding line in config.mk to use the -lXrender library - * when including this patch. - * https://st.suckless.org/patches/alpha/ - */ -#define ALPHA_PATCH 0 - -/* The alpha focus highlight patch allows the user to specify two distinct opacity values or - * background colors in order to easily differentiate between focused and unfocused terminal - * windows. This depends on the alpha patch. - * https://github.com/juliusHuelsmann/st-focus/ - * https://st.suckless.org/patches/alpha_focus_highlight/ - */ -#define ALPHA_FOCUS_HIGHLIGHT_PATCH 0 - -/* Adds gradient transparency to st, depends on the alpha patch. - * https://st.suckless.org/patches/gradient/ - */ -#define ALPHA_GRADIENT_PATCH 0 - -/* This patch allows st to resize to any pixel size rather than snapping to character width/height. - * https://st.suckless.org/patches/anysize/ - */ -#define ANYSIZE_PATCH 1 - -/* A simple variant of the anysize patch that only changes the resize hints to allow the window to - * be resized to any size. - */ -#define ANYSIZE_SIMPLE_PATCH 0 - -/* Draws a background image in farbfeld format in place of the defaultbg color allowing for pseudo - * transparency. - * https://st.suckless.org/patches/background_image/ - */ -#define BACKGROUND_IMAGE_PATCH 0 - -/* This patch adds the ability to reload the background image config when a SIGUSR1 signal is - * received, e.g.: killall -USR1 st - * Depends on the BACKGROUND_IMAGE_PATCH. - */ -#define BACKGROUND_IMAGE_RELOAD_PATCH 0 - -/* This patch allows the use of a blinking cursor. - * Only cursor styles 0, 1, 3, 5, and 7 blink. Set cursorstyle accordingly. - * Cursor styles are defined here: - * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 - * https://st.suckless.org/patches/blinking_cursor/ - */ -#define BLINKING_CURSOR_PATCH 1 - -/* By default bold text is rendered with a bold font in the bright variant of the current color. - * This patch makes bold text rendered simply as bold, leaving the color unaffected. - * https://st.suckless.org/patches/bold-is-not-bright/ - */ -#define BOLD_IS_NOT_BRIGHT_PATCH 1 - -/* This patch adds custom rendering of lines/blocks/braille characters for gapless alignment. - * https://st.suckless.org/patches/boxdraw/ - */ -#define BOXDRAW_PATCH 1 - -/* By default st only sets PRIMARY on selection. - * This patch makes st set CLIPBOARD on selection. - * https://st.suckless.org/patches/clipboard/ - */ -#define CLIPBOARD_PATCH 0 - -/* This patch allows st to be resized without cutting off text when the terminal window is - * made larger again. Text does not wrap when the terminal window is made smaller, you may - * also want to have a look at the reflow patch. - * - * https://github.com/bakkeby/st-flexipatch/issues/34 - */ -#define COLUMNS_PATCH 0 - -/* Select and copy the last URL displayed with Mod+l. Multiple invocations cycle through the - * available URLs. - * https://st.suckless.org/patches/copyurl/ - */ -#define COPYURL_PATCH 0 - -/* Select and copy the last URL displayed with Mod+l. Multiple invocations cycle through the - * available URLs. This variant also highlights the selected URLs. - * https://st.suckless.org/patches/copyurl/ - */ -#define COPYURL_HIGHLIGHT_SELECTED_URLS_PATCH 0 - -/* This patch adds support for CSI escape sequences 22 and 23, which save and - * restores the window title (for instance nvim does this when opening and closing). - * https://st.suckless.org/patches/csi_22_23/ - */ -#define CSI_22_23_PATCH 1 - -/* According to the specification (see link in BLINKING_CURSOR_PATCH) the "Set cursor style - * (DECSCUSR), VT520." escape sequences define both values of 0 and 1 as a blinking block, - * with 1 being the default. - * - * This patch allows the default cursor to be set when value 0 is used, as opposed to - * setting the cursor to a blinking block. - * - * This allows a command like this to restore the cursor to what st is configured with: - * $ echo -ne "\e[ q" - * - * While many terminal emulators do this it is not adhering to specification. xterm is an - * example terminal that sets a blinking block instead of the configured one, same as st. - */ -#define DEFAULT_CURSOR_PATCH 1 - -/* Return BS on pressing backspace and DEL on pressing the delete key. - * https://st.suckless.org/patches/delkey/ - */ -#define DELKEY_PATCH 1 - -/* This patch adds the option of disabling bold fonts globally. - * https://st.suckless.org/patches/disable_bold_italic_fonts/ - */ -#define DISABLE_BOLD_FONTS_PATCH 0 - -/* This patch adds the option of disabling italic fonts globally. - * https://st.suckless.org/patches/disable_bold_italic_fonts/ - */ -#define DISABLE_ITALIC_FONTS_PATCH 0 - -/* This patch adds the option of disabling roman fonts globally. - * https://st.suckless.org/patches/disable_bold_italic_fonts/ - */ -#define DISABLE_ROMAN_FONTS_PATCH 0 - -/* This patch makes the cursor color the inverse of the current cell color. - * https://st.suckless.org/patches/dynamic-cursor-color/ - */ -#define DYNAMIC_CURSOR_COLOR_PATCH 1 - -/* Reading and writing st's screen through a pipe, e.g. pass info to dmenu. - * https://st.suckless.org/patches/externalpipe/ - */ -#define EXTERNALPIPE_PATCH 0 - -/* This patch improves and extends the externalpipe patch in two ways: - * - it prevents the reset of the signal handler set on SIGCHILD, when - * the forked process that executes the external process exits and - * - it adds the externalpipein function to redirect the standard output - * of the external command to the slave size of the pty, that is, as if - * the external program had been manually executed on the terminal - * - * It can be used to send desired escape sequences to the terminal with a - * keyboard shortcut. The patch was created to make use of the dynamic-colors - * tool that uses the OSC escape sequences to change the colors of the terminal. - * - * This patch depends on EXTERNALPIPE_PATCH being enabled. - * - * https://github.com/sos4nt/dynamic-colors - * https://lists.suckless.org/hackers/2004/17218.html - */ -#define EXTERNALPIPEIN_PATCH 0 - -/* This patch allows command line applications to use all the fancy key combinations - * that are available to GUI applications. - * https://st.suckless.org/patches/fix_keyboard_input/ - */ -#define FIXKEYBOARDINPUT_PATCH 1 - -/* This patch allows you to add spare font besides the default. Some glyphs can be not present in - * the default font. For this glyphs st uses font-config and try to find them in font cache first. - * This patch append fonts defined in font2 variable to the beginning of the font cache. - * So they will be used first for glyphs that are absent in the default font. - * https://st.suckless.org/patches/font2/ - */ -#define FONT2_PATCH 1 - -/* This patch adds the ability to toggle st into fullscreen mode. - * Two key bindings are defined: F11 which is typical with other applications and Alt+Enter - * which matches the default xterm behavior. - * https://st.suckless.org/patches/fullscreen/ - */ -#define FULLSCREEN_PATCH 0 - -/* Hide the X cursor whenever a key is pressed and show it back when the mouse is moved in - * the terminal window. - * https://st.suckless.org/patches/hidecursor/ - */ -#define HIDECURSOR_PATCH 1 - -/* This patch hides the terminal cursor when the window loses focus (as opposed to showing a hollow - * cursor). - * https://www.reddit.com/r/suckless/comments/nvee8h/how_to_hide_cursor_in_st_is_there_a_patch_for_it/ - */ -#define HIDE_TERMINAL_CURSOR_PATCH 0 - -/* This patch adds a keybinding that lets you invert the current colorscheme of st. - * This provides a simple way to temporarily switch to a light colorscheme if you use a dark - * colorscheme or visa-versa. - * https://st.suckless.org/patches/invert/ - */ -#define INVERT_PATCH 0 - -/* Pressing the default binding Ctrl+Shift-i will popup dmenu, asking you to enter a unicode - * codepoint that will be converted to a glyph and then pushed to st. - * https://st.suckless.org/patches/iso14755/ - */ -#define ISO14755_PATCH 0 - -/* This patch allows you to select text on the terminal using keyboard shortcuts. - * NB: An improved variant of this patch is enabled if combined with the reflow patch. - * - * https://st.suckless.org/patches/keyboard_select/ - */ -#define KEYBOARDSELECT_PATCH 1 - -/* This patch adds support for drawing ligatures using the Harfbuzz library to transform - * original text of a single line to a list of glyphs with ligatures included. - * This patch depends on the Harfbuzz library and headers to compile. - * You need to uncomment the corresponding lines in config.mk to use the harfbuzz library - * when including this patch. - * https://github.com/cog1to/st-ligatures - * https://st.suckless.org/patches/ligatures/ - */ -#define LIGATURES_PATCH 1 - -/* This patch makes st ignore terminal color attributes by forcing display of the default - * foreground and background colors only - making for a monochrome look. Idea ref. - * https://www.reddit.com/r/suckless/comments/ixbx6z/how_to_use_black_and_white_only_for_st/ - */ -#define MONOCHROME_PATCH 0 - -/* This patch sets the _NET_WM_ICON X property with an icon that is read from a .png file. - * This patch depends on the GD Graphics Library and headers to compile. - * You need to uncomment the corresponding lines in config.mk to use the gd library. - * - * The default location for the .png file is: - * - /usr/local/share/pixmaps/st.png - * - * https://st.suckless.org/patches/netwmicon/ - */ -#define NETWMICON_PATCH 0 - -/* This patch sets the _NET_WM_ICON X property with an icon that is read from a farbfeld image. - * The benefit of this patch is that you do not need an additional dependency on an external - * library to read and convert the farbfeld image. - * - * The default location for the farbfeld image is: - * - /usr/local/share/pixmaps/st.ff - * - * Remember to change the ICONNAME in config.mk from st.png to st.ff when using this patch. - * - * Example command to convert a .png to farbfeld: - * $ png2ff < st.png > st.ff - * - * https://tools.suckless.org/farbfeld/ - * https://github.com/bakkeby/patches/wiki/netwmicon/ - */ -#define NETWMICON_FF_PATCH 0 - -/* This patch sets the _NET_WM_ICON X property with a hardcoded icon for st. This is the - * original version that predates the version that reads the image from a .png file. - * https://st.suckless.org/patches/netwmicon/ - */ -#define NETWMICON_LEGACY_PATCH 0 - -/* This patch allows you to spawn a new st terminal using Ctrl-Shift-Return. It will have the - * same CWD (current working directory) as the original st instance. - * https://st.suckless.org/patches/newterm/ - */ -#define NEWTERM_PATCH 1 - -/* This patch will set the _MOTIF_WM_HINTS property for the st window which, if the window manager - * respects it, will show the st window without window decorations. - * - * In dwm, if the decoration hints patch is applied, then the st window will start out without a - * border. In GNOME and KDE the window should start without a window title. - */ -#define NO_WINDOW_DECORATIONS_PATCH 0 - -/* Open contents of the clipboard in a user-defined browser. - * https://st.suckless.org/patches/open_copied_url/ - */ -#define OPENCOPIED_PATCH 0 - -/* This patch allows for URLs to be opened directly when you click on them. This may not work with - * all terminal applications. - * - * https://www.reddit.com/r/suckless/comments/cc83om/st_open_url/ - */ -#define OPENURLONCLICK_PATCH 1 - -/* Reflow. - * Allows st to be resized without cutting off text when the terminal window is made larger again. - * Text wraps when the terminal window is made smaller. - * Comes with scrollback. - */ -#define REFLOW_PATCH 1 - -/* This patch allows you to specify a border that is relative in size to the width of a cell - * in the terminal. - * https://st.suckless.org/patches/relativeborder/ - */ -#define RELATIVEBORDER_PATCH 0 - -/* This patch allows you to right-click on some selected text to send it to the plumbing - * program of choice, e.g. open a file, view an image, open a URL. - * https://st.suckless.org/patches/right_click_to_plumb/ - */ -#define RIGHTCLICKTOPLUMB_PATCH 0 - -/* Scroll back through terminal output using Shift+{PageUp, PageDown}. - * https://st.suckless.org/patches/scrollback/ - */ -#define SCROLLBACK_PATCH 1 - -/* Scroll back through terminal output using Shift+MouseWheel. - * This variant depends on SCROLLBACK_PATCH being enabled. - * https://st.suckless.org/patches/scrollback/ - */ -#define SCROLLBACK_MOUSE_PATCH 1 - -/* Scroll back through terminal output using mouse wheel (when not in MODE_ALTSCREEN). - * This variant depends on SCROLLBACK_PATCH being enabled. - * https://st.suckless.org/patches/scrollback/ - */ -#define SCROLLBACK_MOUSE_ALTSCREEN_PATCH 0 - -/* This patch adds the two color-settings selectionfg and selectionbg to config.def.h. - * Those define the fore- and background colors which are used when text on the screen is selected - * with the mouse. This removes the default behaviour which would simply reverse the colors. - * https://st.suckless.org/patches/selectioncolors/ - */ -#define SELECTION_COLORS_PATCH 1 - -/* This is the single drawable buffer patch as outlined in the FAQ to get images - * in w3m to display. While this patch does not break the alpha patch it images - * are not shown in w3m if the alpha patch is applied. - */ -#define SINGLE_DRAWABLE_BUFFER_PATCH 0 - -/* This patch adds SIXEL graphics support for st. - * Note that patch/sixel.c/sixel_hls.c come from mintty, licensed under GPL. - * Known issues: - * - Rendering sixel graphics may cause unusual cursor placement, this is - * not specific to this variant of st - the same issue is present in - * the xterm implementation. This is likely an issue of sixel height - * not being detected correctly. - * - * Note that you need to uncomment the corresponding lines in config.mk when including this patch. - * This patch is incompatible with the W3M patch. - * - * https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809 - */ -#define SIXEL_PATCH 1 - -/* This patch allows clients to embed into the st window and is useful if you tend to - * start X applications from the terminal. For example: - * - * $ surf -e $WINDOWID - * - * The behavior is similar to Plan 9 where applications can take over windows. - * URL TBC - */ -#define ST_EMBEDDER_PATCH 0 - -/* Use inverted defaultbg/fg for selection when bg/fg are the same. - * https://st.suckless.org/patches/spoiler/ - */ -#define SPOILER_PATCH 1 - -/* This patch changes the mouse shape to the global default when the running program subscribes - * for mouse events, for instance, in programs like ranger and fzf. It emulates the behaviour - * shown by vte terminals like termite. - * https://st.suckless.org/patches/swapmouse/ - */ -#define SWAPMOUSE_PATCH 1 - -/* This patch adds synchronized-updates/application-sync support in st. - * This will have no effect except when an application uses the synchronized-update escape - * sequences. With this patch nearly all cursor flicker is eliminated in tmux, and tmux detects - * it automatically via terminfo. - * - * Note: this patch alters st.info to promote support for extra escape sequences, which can - * potentially cause application misbehaviour if you do not use this patch. Try removing or - * commenting out the corresponding line in st.info if this is causing issues. - * - * https://st.suckless.org/patches/sync/ - */ -#define SYNC_PATCH 1 - -/* Instead of a default X cursor, use the xterm cursor from your cursor theme. - * You need to uncomment the corresponding line in config.mk to use the -lXcursor library - * when including this patch. - * https://st.suckless.org/patches/themed_cursor/ - */ -#define THEMED_CURSOR_PATCH 0 - -/* Adds support for special underlines. - * - * Example test command: - * $ echo -e "\e[4:3m\e[58:5:10munderline\e[0m" - * ^ ^ ^ ^ ^- sets terminal color 10 - * | | | \- indicates that terminal colors should be used - * | | \- indicates that underline color is being set - * | \- sets underline style to curvy - * \- set underline - * - * Note: this patch alters st.info to promote support for extra escape sequences, which can - * potentially cause application misbehaviour if you do not use this patch. Try removing or - * commenting out the corresponding line in st.info if this is causing issues. - * - * https://st.suckless.org/patches/undercurl/ - */ -#define UNDERCURL_PATCH 1 - -/* Allows mouse scroll without modifier keys for regardless of alt screen using the external - * scroll program. - * https://st.suckless.org/patches/universcroll/ - */ -#define UNIVERSCROLL_PATCH 0 - -/* Use XftFontMatch in place of FcFontMatch. - * - * XftFontMatch calls XftDefaultSubstitute which configures various match properties according - * to the user's configured Xft defaults (xrdb) as well as according to the current display and - * screen. Most importantly, the screen DPI is computed [1]. Without this, st uses a "default" - * DPI of 75 [2]. - * - * [1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535 - * [2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255 - * - * https://git.suckless.org/st/commit/528241aa3835e2f1f052abeeaf891737712955a0.html - */ -#define USE_XFTFONTMATCH_PATCH 1 - -/* Vertically center lines in the space available if you have set a larger chscale in config.h - * https://st.suckless.org/patches/vertcenter/ - */ -#define VERTCENTER_PATCH 0 - -/* Briefly inverts window content on terminal bell event. - * https://st.suckless.org/patches/visualbell/ - */ -#define VISUALBELL_1_PATCH 0 - -/* Adds support for w3m images. - * https://st.suckless.org/patches/w3m/ - */ -#define W3M_PATCH 0 - -/* Adds proper glyphs rendering in st allowing wide glyphs to be drawn as-is as opposed to - * smaller or cut glyphs being rendered. - * https://github.com/Dreomite/st/commit/e3b821dcb3511d60341dec35ee05a4a0abfef7f2 - * https://www.reddit.com/r/suckless/comments/jt90ai/update_support_for_proper_glyph_rendering_in_st/ - */ -#define WIDE_GLYPHS_PATCH 1 - -/* There is a known issue that Google's Variable Fonts (VF) can end up with letter spacing - * that is too wide in programs that use Xft, for example Inconsolata v3.000. - * - * This is intended as a temporary patch / hack until (if) this is fixed in the Xft library - * itself. - * - * https://github.com/googlefonts/Inconsolata/issues/42#issuecomment-737508890 - */ -#define WIDE_GLYPH_SPACING_PATCH 0 - -/* This patch allows user to specify the initial path st should use as the working directory. - * https://st.suckless.org/patches/workingdir/ - */ -#define WORKINGDIR_PATCH 1 - -/* This patch adds the ability to configure st via Xresources. At startup, st will read and - * apply the resources named in the resources[] array in config.h. - * https://st.suckless.org/patches/xresources/ - */ -#define XRESOURCES_PATCH 0 - -/* This patch adds the ability to reload the Xresources config when a SIGUSR1 signal is received - * e.g.: killall -USR1 st - * Depends on the XRESOURCES_PATCH. - */ -#define XRESOURCES_RELOAD_PATCH 0 diff --git a/config/patches/default-class-name.diff b/config/patches/default-class-name.diff deleted file mode 100644 index b0b6d3c..0000000 --- a/config/patches/default-class-name.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- a/x.c -+++ b/x.c -@@ -173,13 +173,13 @@ static char *usedfont = NULL; - static double usedfontsize = 0; - static double defaultfontsize = 0; - --static char *opt_class = NULL; -+static char *opt_class = "St"; - static char **opt_cmd = NULL; - static char *opt_embed = NULL; - static char *opt_font = NULL; - static char *opt_io = NULL; - static char *opt_line = NULL; --static char *opt_name = NULL; -+static char *opt_name = "st"; - static char *opt_title = NULL; - static char *opt_dir = NULL; - diff --git a/config/patches/font-features.diff b/config/patches/font-features.diff deleted file mode 100644 index 8607b29..0000000 --- a/config/patches/font-features.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- a/hb.c -+++ b/hb.c -@@ -27,7 +27,15 @@ static HbFontMatch *hbfontcache = NULL; - * e. g. - * FEATURE('c', 'a', 'l', 't'), FEATURE('d', 'l', 'i', 'g') - */ --hb_feature_t features[] = { }; -+hb_feature_t features[] = { -+ FEATURE('c','v','0','2'), -+ FEATURE('c','v','1','6'), -+ FEATURE('s','s','0','2'), -+ FEATURE('s','s','0','3'), -+ FEATURE('s','s','0','7'), -+ FEATURE('s','s','0','8'), -+ FEATURE('s','s','0','9'), -+}; - - void - hbunloadfonts() diff --git a/config/patches/histsize.diff b/config/patches/histsize.diff deleted file mode 100644 index 1a2d4c4..0000000 --- a/config/patches/histsize.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/st.h -+++ b/st.h -@@ -27,7 +27,7 @@ - - #define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) - #define IS_TRUECOL(x) (1 << 24 & (x)) --#define HISTSIZE 2000 -+#define HISTSIZE 7500 - - enum glyph_attribute { - ATTR_NULL = 0, diff --git a/flexipatch-finalizer b/flexipatch-finalizer deleted file mode 160000 index 37e8cb6..0000000 --- a/flexipatch-finalizer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 37e8cb6145f189b805aa58c7d560b1adf51377a7 diff --git a/st-flexipatch b/st-flexipatch deleted file mode 160000 index aa59574..0000000 --- a/st-flexipatch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aa5957495d315a2aca2a846a48ba9f7557353ec5