ST Patches * ST Patches Open Work ** TODO [#C] .desktop entry st-desktopentry-0.8.5.diff ** TODO [#C] netwmicon st-netwmicon-0.8.5-v2.diff * ST Patches Aborted ** CANCELLED [#C] colorschemes *** 2023-07-23 @ 17:34:43 -0500 Unnecessary Not needed now that I can configure st attributes via Xresources *** Description and URLs This patch adds multiple color schemes and lets you change them without having to restart st. Predefined color schemes: the default (dark) st color scheme the default (dark) alacritty color scheme One Half (dark & light) Solarized (dark & light) Gruvbox (dark & light) It's similar to the palettes patch but it has additional features: Support for the colors 17 to 256 (palettes returns random colors here). Allow different background and foreground color indices for different color schemes. Add a key binding for switching through color schemes. Key bindings Select the first..eighth color scheme with Alt+1..8. Select the next color scheme with Alt+0. Select the previous one with Ctrl+Alt+0. https://st.suckless.org/patches/colorschemes/ https://st.suckless.org/patches/colorschemes/st-colorschemes-0.8.5.diff ** CANCELLED [#B] right-click sends paste *** 2023-07-23 @ 17:12:15 -0500 patching failed, manual intervention failed I can't locate where in x.c this patch should apply. It's a pretty straightforward one line change, but the constant doesn't exist any longer. Normally, I'd try this in an unpatched ST repo, but I'm not that attached to this patch. *** Description and URLs Pressing right-click pastes from the primary-selection. If combined with the clipboard-patch right-click pastes from the clipboard. Middle-click does nothing. https://st.suckless.org/patches/rightclickpaste/ https://st.suckless.org/patches/rightclickpaste/st-rightclickpaste-0.8.2.diff ** CANCELLED [#B] externalpipe *** 2023-07-23 @ 16:32:10 -0500 skipping this patch. *** 2023-07-23 @ 16:32:06 -0500 failed verification using the example in description zsh: segmentation fault (core dumped) ./st X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 3 (X_GetWindowAttributes) Resource id in failed request: 0x2200006 Serial number of failed request: 24 Current serial number in output stream: 25 *** 2023-07-23 @ 15:56:30 -0500 Patch applied w/ intervention, but make produces warnings. Couldn't find proper match in st.h, but was about 4 lines off. The lines below the insert changed from another patch. However, make is producing warnings. In file included from st.c:20: st.c: In function ‘externalpipe’: st.c:2271:40: warning: passing argument 1 of ‘tlinelen’ makes pointer from integer without a cast [-Wint-conversion] 2271 | lastpos = MIN(tlinelen(n) + 1, term.col) - 1; | ^ | | | int st.h:7:35: note: in definition of macro ‘MIN’ 7 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) | ^ st.c:450:15: note: expected ‘Line’ {aka ‘Glyph_ *’} but argument is of type ‘int’ 450 | tlinelen(Line line) | ~~~~~^~~~ st.c:2271:40: warning: passing argument 1 of ‘tlinelen’ makes pointer from integer without a cast [-Wint-conversion] 2271 | lastpos = MIN(tlinelen(n) + 1, term.col) - 1; | ^ | | | int st.h:7:47: note: in definition of macro ‘MIN’ 7 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) | ^ st.c:450:15: note: expected ‘Line’ {aka ‘Glyph_ *’} but argument is of type ‘int’ 450 | tlinelen(Line line) | ~~~~~^~~~ *** Description and URLs Reading and writing st's screen through a pipe. Example config.h example, binding TERMMOD + U to extract all visible URLs and present dmenu to select and open one: static char *openurlcmd[] = { "/bin/sh", "-c", "xurls | dmenu -l 10 -w $WINDOWID | xargs -r open", "externalpipe", NULL }; Shortcut shortcuts[] = { ... { TERMMOD, XK_U, externalpipe, { .v = openurlcmd } }, }; (xurls and open are external scripts) xurls: https://raw.github.com/bobrippling/perlbin/master/xurls open: https://github.com/bobrippling/open which leads here: https://raw.githubusercontent.com/bobrippling/open/master/open Example Shell Scripts link grabber - similar to the function above, but without xurls dependency https://st.suckless.org/patches/externalpipe/linkgrabber.sh edit screen - open screen in $EDITOR for copying text https://st.suckless.org/patches/externalpipe/editscreen.sh https://st.suckless.org/patches/externalpipe/ https://st.suckless.org/patches/externalpipe/st-externalpipe-0.8.4.diff When using the scrollback patch, you can apply this patch ontop in order to use externalpipe onto the entire terminal history: https://st.suckless.org/patches/externalpipe/st-externalpipe-eternal-0.8.3.diff * ST Patches Completed ** DONE [#B] dynamic cursor color *** 2023-07-23 @ 17:47:28 -0500 simple test succeeded Changed foreground color in ~/.Xresources to red, typed changes, then backed over them. It worked fine. *** 2023-07-23 @ 17:45:31 -0500 patch applied successfully without issue *** Description and URLs Swaps the colors of your cursor and the character you're currently on (much like alacritty). Some say the effect is very appealing:) Notes Might be incomplete - I'm new and improvements are very welcome! Might have some edge cases where it doesn't work properly Performance degradation considerations? More testing & feedback needed https://st.suckless.org/patches/dynamic-cursor-color/ https://st.suckless.org/patches/dynamic-cursor-color/st-dynamic-cursor-color-0.9.diff ** DONE [#B] xresources with signal reloading *** 2023-07-23 @ 17:33:40 -0500 Verification Steps Succeeded Added configuration options to .Xresources and launched ST to verify them ! ST (suckless terminal) settings st.font: FiraCode Nerd Font Mono:size=12 st.background: gruvbox_bg st.foreground: gruvbox_fg st.color0: gruvbox_bg st.color1: gruvbox_red st.color2: gruvbox_green st.color3: gruvbox_yellow st.color4: gruvbox_blue st.color5: gruvbox_purple st.color6: gruvbox_aqua st.color7: gruvbox_fg st.color8: gruvbox_gray st.color9: gruvbox_red st.color10: gruvbox_green st.color11: gruvbox_yellow st.color12: gruvbox_blue st.color13: gruvbox_purple st.color14: gruvbox_aqua st.color15: gruvbox_fg *** 2023-07-23 @ 17:24:00 -0500 patch successful without issues *** Description and URLs This patch adds the ability to configure st via Xresources and signal reloading. This patch is not based on xresources patch and is extended from xst's commit on github. You can basically pass a USR1 signal to all st processes after updating your Xresources to reload the settings: ` pidof st | xargs kill -s USR1 ` https://st.suckless.org/patches/xresources-with-reload-signal/ https://st.suckless.org/patches/xresources-with-reload-signal/st-xresources-signal-reloading-20220407-ef05519.diff ** DONE [#A] font2 (fallback font for glyphs + emojis) *** 2023-07-23 @ 17:08:03 -0500 Patch applied successfully w/o issues *** Description and URLs This patch allows to add spare font besides default. Some glyphs can be not present in 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 font cache. So they will be used first for glyphs that absent in default font. Example static char *font = "Bitstream Vera Sans Mono:pixelsize=11:antialias=true:autohint=true"; without patch. static char *font2[] = { "Inconsolata for Powerline:pixelsize=12:antialias=true:autohint=true" }; https://st.suckless.org/patches/font2/ https://st.suckless.org/patches/font2/st-font2-0.8.5.diff ** DONE [#A] ligatures (apply after alpha and scrollback) *** 2023-07-23 @ 15:31:37 -0500 Tested and working fine <= and || showed up instantly when switching font to FiraCode Nerd Font Mono *** 2023-07-23 @ 15:07:50 -0500 Patch applied w/ manual intervention Minimal changes. Surprised there was any issues here. I couldn't find why the patterns couldn't match. I'd forgotten how touchy Makefiles are. Hard to tell what whitespace was missing in config.mk. *** Description and URL This patch adds proper drawing of ligatures. The code uses Harfbuzz library to transform original text of a single line to a list of glyphs with ligatures included. Note The patch adds additional dependency on Harfbuzz library and headers. Original patch was made for vanilla version of ST from latest master commit. It is not 100% compatible with Scrollback and Alpha patches, so I made modified versions that you can apply on top of a Scrollback and/or Alpha patch. Due to some limitations in drawing engine, ligatures will break when crossing colors, font styles or selection. They will still render properly as separate symbols, just not as ligatures. Since 0.8.4 patch, there's now a way to enable additional font rendering features. Look into features array in hb.c for details. Boxdraw The original patch does not work very well with the boxdraw patch. Since it requires some additional changes in the code to make ligatures compatible with boxdraw, a special version of the patch was added, that you can apply on top of the boxdraw patch. It does not include Alpha or Scrollback patches. https://st.suckless.org/patches/ligatures/ https://st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-20230105-0.9.diff ** DONE [#A] alpha *** 2023-07-23 @ 15:00:52 -0500 Patch applied successfully without issue *** Patch Description and URL This patch allows users to change the opacity of the background. Note that you need an X composite manager (e.g. compton, xcompmgr) to make this patch effective. Notes The alpha value affects the default background only. The color designated by 'defaultbg' should not be used elsewhere. Embedding might fail after applying this patch. Changes in 0.8.2 The internal method for querying X visual is changed. St will respect the visual of its parent window, allowing it to be embedded easily. Opacity value is now typed in float. -A option is added to allow changing the opacity value without compiling. https://st.suckless.org/patches/alpha/ https://st.suckless.org/patches/alpha/st-alpha-osc11-20220222-0.8.5.diff *** A Note on OSC 11 '\e]11;?\007' can be used to query the background color of a terminal (OSC 11). OSC 11 is used by Neovim to automatically set its background setting to "dark" or "light". ** DONE [#A] clipboard Prefer the system (browser) clipboard instead of the terminal clipboard *** 2023-07-23 @ 13:56:02 -0500 patch applied successfully w/o issue *** Description and URL The Freedesktop standard requires you to remember which clipboard you are keeping selections in. If you switch between a terminal and browser, you may find this UX jarring. Description This trivial patch sets CLIPBOARD on selection, the same as your browser. You may want to replace selpaste with clippaste in your config.h bindings to complete the effect. https://st.suckless.org/patches/clipboard/ https://st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff st-clipboard-0.8.3.diff ** DONE [#A] delkey Backspace key sends BS; delete key send DEL *** 2023-07-23 @ 13:52:50 -0500 patch applied successfully w/o issue *** Description and URL Return BS on pressing backspace and DEL on pressing the delete key. https://st.suckless.org/patches/delkey/ https://st.suckless.org/patches/delkey/st-delkey-20201112-4ef0cbd.diff ** DONE [#A] scrollback and reflow *** 2023-07-23 @ 13:48:51 -0500 All patches applied successfully w/o issue *** Patch Links and Descriptions https://st.suckless.org/patches/scrollback/ Scroll back through terminal output using Shift+{PageUp, PageDown}. https://st.suckless.org/patches/scrollback/st-scrollback-0.8.5.diff Apply the following patch on top of the previous to allow column and row reflow. https://st.suckless.org/patches/scrollback/st-scrollback-reflow-20230607-211964d.diff Apply the following patch on top of the previous to allow scrolling using Shift+MouseWheel. https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20220127-2c5edf2.diff Apply the following patch on top of the previous two to allow scrollback using mouse wheel only when not in MODE_ALTSCREEN. https://st.suckless.org/patches/scrollback/st-scrollback-mouse-altscreen-20220127-2c5edf2.diff * Reference ** ST Release Chronology Some patches reference the date, others the st release number. This links both, so it should help me pick up which is the latest patch. 2022-10-04 17:40 bump version to 0.9 2022-01-07 11:39 bump version to 0.8.5 2020-06-19 09:27 bump version to 0.8.4 2020-04-27 11:56 bump version to 0.8.3 2019-02-09 11:48 bump version to 0.8.2