patches.h (20163B)
1 /* 2 * This file contains patch control flags. 3 * 4 * In principle you should be able to mix and match any patches 5 * you may want. In cases where patches are logically incompatible 6 * one patch may take precedence over the other as noted in the 7 * relevant descriptions. 8 */ 9 10 /* Patches */ 11 12 /* The alpha patch adds transparency for the terminal. 13 * You need to uncomment the corresponding line in config.mk to use the -lXrender library 14 * when including this patch. 15 * https://st.suckless.org/patches/alpha/ 16 */ 17 #define ALPHA_PATCH 1 18 19 /* The alpha focus highlight patch allows the user to specify two distinct opacity values or 20 * background colors in order to easily differentiate between focused and unfocused terminal 21 * windows. This depends on the alpha patch. 22 * https://github.com/juliusHuelsmann/st-focus/ 23 * https://st.suckless.org/patches/alpha_focus_highlight/ 24 */ 25 #define ALPHA_FOCUS_HIGHLIGHT_PATCH 0 26 27 /* Adds gradient transparency to st, depends on the alpha patch. 28 * https://st.suckless.org/patches/gradient/ 29 */ 30 #define ALPHA_GRADIENT_PATCH 0 31 32 /* Allows for the initial size of the terminal to be specified as pixel width and height 33 * using the -G command line option. Can be combined with the anysize patch to also allow 34 * the window to be resized to any pixel size. 35 * https://st.suckless.org/patches/anygeometry/ 36 */ 37 #define ANYGEOMETRY_PATCH 0 38 39 /* This patch allows st to resize to any pixel size rather than snapping to character width/height. 40 * https://st.suckless.org/patches/anysize/ 41 */ 42 #define ANYSIZE_PATCH 1 43 44 /* A simple variant of the anysize patch that only changes the resize hints to allow the window to 45 * be resized to any size. 46 */ 47 #define ANYSIZE_SIMPLE_PATCH 0 48 49 /* Draws a background image in farbfeld format in place of the defaultbg color allowing for pseudo 50 * transparency. 51 * https://st.suckless.org/patches/background_image/ 52 */ 53 #define BACKGROUND_IMAGE_PATCH 0 54 55 /* This patch adds the ability to reload the background image config when a SIGUSR1 signal is 56 * received, e.g.: killall -USR1 st 57 * Depends on the BACKGROUND_IMAGE_PATCH. 58 */ 59 #define BACKGROUND_IMAGE_RELOAD_PATCH 0 60 61 /* This patch allows the use of a blinking cursor. 62 * Only cursor styles 0, 1, 3, 5, and 7 blink. Set cursorstyle accordingly. 63 * Cursor styles are defined here: 64 * 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 65 * https://st.suckless.org/patches/blinking_cursor/ 66 */ 67 #define BLINKING_CURSOR_PATCH 0 68 69 /* By default bold text is rendered with a bold font in the bright variant of the current color. 70 * This patch makes bold text rendered simply as bold, leaving the color unaffected. 71 * https://st.suckless.org/patches/bold-is-not-bright/ 72 */ 73 #define BOLD_IS_NOT_BRIGHT_PATCH 1 74 75 /* This patch adds custom rendering of lines/blocks/braille characters for gapless alignment. 76 * https://st.suckless.org/patches/boxdraw/ 77 */ 78 #define BOXDRAW_PATCH 1 79 80 /* By default st only sets PRIMARY on selection. 81 * This patch makes st set CLIPBOARD on selection. 82 * https://st.suckless.org/patches/clipboard/ 83 */ 84 #define CLIPBOARD_PATCH 1 85 86 /* This patch allows st to be resized without cutting off text when the terminal window is 87 * made larger again. Text does not wrap when the terminal window is made smaller, you may 88 * also want to have a look at the reflow patch. 89 * 90 * https://github.com/bakkeby/st-flexipatch/issues/34 91 */ 92 #define COLUMNS_PATCH 0 93 94 /* Select and copy the last URL displayed with Mod+l. Multiple invocations cycle through the 95 * available URLs. 96 * https://st.suckless.org/patches/copyurl/ 97 */ 98 #define COPYURL_PATCH 0 99 100 /* Select and copy the last URL displayed with Mod+l. Multiple invocations cycle through the 101 * available URLs. This variant also highlights the selected URLs. 102 * https://st.suckless.org/patches/copyurl/ 103 */ 104 #define COPYURL_HIGHLIGHT_SELECTED_URLS_PATCH 0 105 106 /* This patch adds support for CSI escape sequences 22 and 23, which save and 107 * restores the window title (for instance nvim does this when opening and closing). 108 * https://st.suckless.org/patches/csi_22_23/ 109 */ 110 #define CSI_22_23_PATCH 1 111 112 /* According to the specification (see link in BLINKING_CURSOR_PATCH) the "Set cursor style 113 * (DECSCUSR), VT520." escape sequences define both values of 0 and 1 as a blinking block, 114 * with 1 being the default. 115 * 116 * This patch allows the default cursor to be set when value 0 is used, as opposed to 117 * setting the cursor to a blinking block. 118 * 119 * This allows a command like this to restore the cursor to what st is configured with: 120 * $ echo -ne "\e[ q" 121 * 122 * While many terminal emulators do this it is not adhering to specification. xterm is an 123 * example terminal that sets a blinking block instead of the configured one, same as st. 124 */ 125 #define DEFAULT_CURSOR_PATCH 1 126 127 /* Return BS on pressing backspace and DEL on pressing the delete key. 128 * https://st.suckless.org/patches/delkey/ 129 */ 130 #define DELKEY_PATCH 0 131 132 /* This patch adds the option of disabling bold fonts globally. 133 * https://st.suckless.org/patches/disable_bold_italic_fonts/ 134 */ 135 #define DISABLE_BOLD_FONTS_PATCH 0 136 137 /* This patch adds the option of disabling italic fonts globally. 138 * https://st.suckless.org/patches/disable_bold_italic_fonts/ 139 */ 140 #define DISABLE_ITALIC_FONTS_PATCH 0 141 142 /* This patch adds the option of disabling roman fonts globally. 143 * https://st.suckless.org/patches/disable_bold_italic_fonts/ 144 */ 145 #define DISABLE_ROMAN_FONTS_PATCH 0 146 147 /* This patch makes the cursor color the inverse of the current cell color. 148 * https://st.suckless.org/patches/dynamic-cursor-color/ 149 */ 150 #define DYNAMIC_CURSOR_COLOR_PATCH 1 151 152 /* Reading and writing st's screen through a pipe, e.g. pass info to dmenu. 153 * https://st.suckless.org/patches/externalpipe/ 154 */ 155 #define EXTERNALPIPE_PATCH 0 156 157 /* This patch improves and extends the externalpipe patch in two ways: 158 * - it prevents the reset of the signal handler set on SIGCHILD, when 159 * the forked process that executes the external process exits and 160 * - it adds the externalpipein function to redirect the standard output 161 * of the external command to the slave size of the pty, that is, as if 162 * the external program had been manually executed on the terminal 163 * 164 * It can be used to send desired escape sequences to the terminal with a 165 * keyboard shortcut. The patch was created to make use of the dynamic-colors 166 * tool that uses the OSC escape sequences to change the colors of the terminal. 167 * 168 * This patch depends on EXTERNALPIPE_PATCH being enabled. 169 * 170 * https://github.com/sos4nt/dynamic-colors 171 * https://lists.suckless.org/hackers/2004/17218.html 172 */ 173 #define EXTERNALPIPEIN_PATCH 0 174 175 /* This patch allows command line applications to use all the fancy key combinations 176 * that are available to GUI applications. 177 * https://st.suckless.org/patches/fix_keyboard_input/ 178 */ 179 #define FIXKEYBOARDINPUT_PATCH 1 180 181 /* This patch allows you to add spare font besides the default. Some glyphs can be not present in 182 * the default font. For this glyphs st uses font-config and try to find them in font cache first. 183 * This patch append fonts defined in font2 variable to the beginning of the font cache. 184 * So they will be used first for glyphs that are absent in the default font. 185 * https://st.suckless.org/patches/font2/ 186 */ 187 #define FONT2_PATCH 0 188 189 /* This patch adds the ability to toggle st into fullscreen mode. 190 * Two key bindings are defined: F11 which is typical with other applications and Alt+Enter 191 * which matches the default xterm behavior. 192 * https://st.suckless.org/patches/fullscreen/ 193 */ 194 #define FULLSCREEN_PATCH 0 195 196 /* Hide the X cursor whenever a key is pressed and show it back when the mouse is moved in 197 * the terminal window. 198 * https://st.suckless.org/patches/hidecursor/ 199 */ 200 #define HIDECURSOR_PATCH 1 201 202 /* This patch hides the terminal cursor when the window loses focus (as opposed to showing a hollow 203 * cursor). 204 * https://www.reddit.com/r/suckless/comments/nvee8h/how_to_hide_cursor_in_st_is_there_a_patch_for_it/ 205 */ 206 #define HIDE_TERMINAL_CURSOR_PATCH 0 207 208 /* This patch adds a keybinding that lets you invert the current colorscheme of st. 209 * This provides a simple way to temporarily switch to a light colorscheme if you use a dark 210 * colorscheme or visa-versa. 211 * https://st.suckless.org/patches/invert/ 212 */ 213 #define INVERT_PATCH 0 214 215 /* Pressing the default binding Ctrl+Shift-i will popup dmenu, asking you to enter a unicode 216 * codepoint that will be converted to a glyph and then pushed to st. 217 * https://st.suckless.org/patches/iso14755/ 218 */ 219 #define ISO14755_PATCH 0 220 221 /* This patch allows you to select text on the terminal using keyboard shortcuts. 222 * NB: An improved variant of this patch is enabled if combined with the reflow patch. 223 * 224 * https://st.suckless.org/patches/keyboard_select/ 225 */ 226 #define KEYBOARDSELECT_PATCH 0 227 228 /* This patch adds support for drawing ligatures using the Harfbuzz library to transform 229 * original text of a single line to a list of glyphs with ligatures included. 230 * This patch depends on the Harfbuzz library and headers to compile. 231 * You need to uncomment the corresponding lines in config.mk to use the harfbuzz library 232 * when including this patch. 233 * https://github.com/cog1to/st-ligatures 234 * https://st.suckless.org/patches/ligatures/ 235 */ 236 #define LIGATURES_PATCH 0 237 238 /* This patch makes st ignore terminal color attributes by forcing display of the default 239 * foreground and background colors only - making for a monochrome look. Idea ref. 240 * https://www.reddit.com/r/suckless/comments/ixbx6z/how_to_use_black_and_white_only_for_st/ 241 */ 242 #define MONOCHROME_PATCH 0 243 244 /* This patch sets the _NET_WM_ICON X property with an icon that is read from a .png file. 245 * This patch depends on the GD Graphics Library and headers to compile. 246 * You need to uncomment the corresponding lines in config.mk to use the gd library. 247 * 248 * The default location for the .png file is: 249 * - /usr/local/share/pixmaps/st.png 250 * 251 * https://st.suckless.org/patches/netwmicon/ 252 */ 253 #define NETWMICON_PATCH 0 254 255 /* This patch sets the _NET_WM_ICON X property with an icon that is read from a farbfeld image. 256 * The benefit of this patch is that you do not need an additional dependency on an external 257 * library to read and convert the farbfeld image. 258 * 259 * The default location for the farbfeld image is: 260 * - /usr/local/share/pixmaps/st.ff 261 * 262 * Remember to change the ICONNAME in config.mk from st.png to st.ff when using this patch. 263 * 264 * Example command to convert a .png to farbfeld: 265 * $ png2ff < st.png > st.ff 266 * 267 * https://tools.suckless.org/farbfeld/ 268 * https://github.com/bakkeby/patches/wiki/netwmicon/ 269 */ 270 #define NETWMICON_FF_PATCH 0 271 272 /* This patch sets the _NET_WM_ICON X property with a hardcoded icon for st. This is the 273 * original version that predates the version that reads the image from a .png file. 274 * https://st.suckless.org/patches/netwmicon/ 275 */ 276 #define NETWMICON_LEGACY_PATCH 0 277 278 /* This patch allows you to spawn a new st terminal using Ctrl-Shift-Return. It will have the 279 * same CWD (current working directory) as the original st instance. 280 * https://st.suckless.org/patches/newterm/ 281 */ 282 #define NEWTERM_PATCH 0 283 284 /* This patch will set the _MOTIF_WM_HINTS property for the st window which, if the window manager 285 * respects it, will show the st window without window decorations. 286 * 287 * In dwm, if the decoration hints patch is applied, then the st window will start out without a 288 * border. In GNOME and KDE the window should start without a window title. 289 */ 290 #define NO_WINDOW_DECORATIONS_PATCH 0 291 292 /* Open contents of the clipboard in a user-defined browser. 293 * https://st.suckless.org/patches/open_copied_url/ 294 */ 295 #define OPENCOPIED_PATCH 0 296 297 /* This patch allows for URLs to be opened directly when you click on them. This may not work with 298 * all terminal applications. 299 * 300 * https://www.reddit.com/r/suckless/comments/cc83om/st_open_url/ 301 */ 302 #define OPENURLONCLICK_PATCH 1 303 304 /* This patch allows st to fetch the current working directory through the OSC 7 escape 305 * sequence emitted by shells. Must be used with newterm patch. 306 * 307 * https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory 308 * https://github.com/veltza/st-sx/commit/817865c2c6ed905af8849580e58bdcf399216fbd 309 */ 310 #define OSC7_PATCH 0 311 312 /* This patch allows jumping between prompts by utilizing the OSC 133 escape sequence 313 * emitted by shells. Must be used with either reflow or scrollback patch. 314 * 315 * https://codeberg.org/dnkl/foot#jumping-between-prompts 316 */ 317 #define OSC133_PATCH 1 318 319 /* Reflow. 320 * Allows st to be resized without cutting off text when the terminal window is made larger again. 321 * Text wraps when the terminal window is made smaller. 322 * Comes with scrollback. 323 */ 324 #define REFLOW_PATCH 1 325 326 /* This patch allows you to specify a border that is relative in size to the width of a cell 327 * in the terminal. 328 * https://st.suckless.org/patches/relativeborder/ 329 */ 330 #define RELATIVEBORDER_PATCH 0 331 332 /* This patch allows you to right-click on some selected text to send it to the plumbing 333 * program of choice, e.g. open a file, view an image, open a URL. 334 * https://st.suckless.org/patches/right_click_to_plumb/ 335 */ 336 #define RIGHTCLICKTOPLUMB_PATCH 0 337 338 /* Scroll back through terminal output using Shift+{PageUp, PageDown}. 339 * https://st.suckless.org/patches/scrollback/ 340 */ 341 #define SCROLLBACK_PATCH 1 342 343 /* Scroll back through terminal output using Shift+MouseWheel. 344 * This variant depends on SCROLLBACK_PATCH being enabled. 345 * https://st.suckless.org/patches/scrollback/ 346 */ 347 #define SCROLLBACK_MOUSE_PATCH 0 348 349 /* Scroll back through terminal output using mouse wheel (when not in MODE_ALTSCREEN). 350 * This variant depends on SCROLLBACK_PATCH being enabled. 351 * https://st.suckless.org/patches/scrollback/ 352 */ 353 #define SCROLLBACK_MOUSE_ALTSCREEN_PATCH 1 354 355 /* This patch adds the two color-settings selectionfg and selectionbg to config.def.h. 356 * Those define the fore- and background colors which are used when text on the screen is selected 357 * with the mouse. This removes the default behaviour which would simply reverse the colors. 358 * https://st.suckless.org/patches/selectioncolors/ 359 */ 360 #define SELECTION_COLORS_PATCH 0 361 362 /* This is the single drawable buffer patch as outlined in the FAQ to get images 363 * in w3m to display. While this patch does not break the alpha patch it images 364 * are not shown in w3m if the alpha patch is applied. 365 */ 366 #define SINGLE_DRAWABLE_BUFFER_PATCH 0 367 368 /* This patch adds SIXEL graphics support for st. 369 * Note that patch/sixel.c/sixel_hls.c come from mintty, licensed under GPL. 370 * Known issues: 371 * - Rendering sixel graphics may cause unusual cursor placement, this is 372 * not specific to this variant of st - the same issue is present in 373 * the xterm implementation. This is likely an issue of sixel height 374 * not being detected correctly. 375 * 376 * Note that you need to uncomment the corresponding lines in config.mk when including this patch. 377 * This patch is incompatible with the W3M patch. 378 * 379 * https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809 380 */ 381 #define SIXEL_PATCH 0 382 383 /* This patch allows clients to embed into the st window and is useful if you tend to 384 * start X applications from the terminal. For example: 385 * 386 * $ surf -e $WINDOWID 387 * 388 * The behavior is similar to Plan 9 where applications can take over windows. 389 * URL TBC 390 */ 391 #define ST_EMBEDDER_PATCH 0 392 393 /* Use inverted defaultbg/fg for selection when bg/fg are the same. 394 * https://st.suckless.org/patches/spoiler/ 395 */ 396 #define SPOILER_PATCH 1 397 398 /* This patch changes the mouse shape to the global default when the running program subscribes 399 * for mouse events, for instance, in programs like ranger and fzf. It emulates the behaviour 400 * shown by vte terminals like termite. 401 * https://st.suckless.org/patches/swapmouse/ 402 */ 403 #define SWAPMOUSE_PATCH 0 404 405 /* This patch adds synchronized-updates/application-sync support in st. 406 * This will have no effect except when an application uses the synchronized-update escape 407 * sequences. With this patch nearly all cursor flicker is eliminated in tmux, and tmux detects 408 * it automatically via terminfo. 409 * 410 * Note: this patch alters st.info to promote support for extra escape sequences, which can 411 * potentially cause application misbehaviour if you do not use this patch. Try removing or 412 * commenting out the corresponding line in st.info if this is causing issues. 413 * 414 * https://st.suckless.org/patches/sync/ 415 */ 416 #define SYNC_PATCH 1 417 418 /* Instead of a default X cursor, use the xterm cursor from your cursor theme. 419 * You need to uncomment the corresponding line in config.mk to use the -lXcursor library 420 * when including this patch. 421 * https://st.suckless.org/patches/themed_cursor/ 422 */ 423 #define THEMED_CURSOR_PATCH 0 424 425 /* Adds support for special underlines. 426 * 427 * Example test command: 428 * $ echo -e "\e[4:3m\e[58:5:10munderline\e[0m" 429 * ^ ^ ^ ^ ^- sets terminal color 10 430 * | | | \- indicates that terminal colors should be used 431 * | | \- indicates that underline color is being set 432 * | \- sets underline style to curvy 433 * \- set underline 434 * 435 * Note: this patch alters st.info to promote support for extra escape sequences, which can 436 * potentially cause application misbehaviour if you do not use this patch. Try removing or 437 * commenting out the corresponding line in st.info if this is causing issues. 438 * 439 * https://st.suckless.org/patches/undercurl/ 440 */ 441 #define UNDERCURL_PATCH 1 442 443 /* Allows mouse scroll without modifier keys for regardless of alt screen using the external 444 * scroll program. 445 * https://st.suckless.org/patches/universcroll/ 446 */ 447 #define UNIVERSCROLL_PATCH 0 448 449 /* Use XftFontMatch in place of FcFontMatch. 450 * 451 * XftFontMatch calls XftDefaultSubstitute which configures various match properties according 452 * to the user's configured Xft defaults (xrdb) as well as according to the current display and 453 * screen. Most importantly, the screen DPI is computed [1]. Without this, st uses a "default" 454 * DPI of 75 [2]. 455 * 456 * [1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535 457 * [2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255 458 * 459 * https://git.suckless.org/st/commit/528241aa3835e2f1f052abeeaf891737712955a0.html 460 */ 461 #define USE_XFTFONTMATCH_PATCH 0 462 463 /* Vertically center lines in the space available if you have set a larger chscale in config.h 464 * https://st.suckless.org/patches/vertcenter/ 465 */ 466 #define VERTCENTER_PATCH 0 467 468 /* Briefly inverts window content on terminal bell event. 469 * https://st.suckless.org/patches/visualbell/ 470 */ 471 #define VISUALBELL_1_PATCH 0 472 473 /* Adds support for w3m images. 474 * https://st.suckless.org/patches/w3m/ 475 */ 476 #define W3M_PATCH 0 477 478 /* Adds proper glyphs rendering in st allowing wide glyphs to be drawn as-is as opposed to 479 * smaller or cut glyphs being rendered. 480 * https://github.com/Dreomite/st/commit/e3b821dcb3511d60341dec35ee05a4a0abfef7f2 481 * https://www.reddit.com/r/suckless/comments/jt90ai/update_support_for_proper_glyph_rendering_in_st/ 482 */ 483 #define WIDE_GLYPHS_PATCH 1 484 485 /* There is a known issue that Google's Variable Fonts (VF) can end up with letter spacing 486 * that is too wide in programs that use Xft, for example Inconsolata v3.000. 487 * 488 * This is intended as a temporary patch / hack until (if) this is fixed in the Xft library 489 * itself. 490 * 491 * https://github.com/googlefonts/Inconsolata/issues/42#issuecomment-737508890 492 */ 493 #define WIDE_GLYPH_SPACING_PATCH 0 494 495 /* This patch allows user to specify the initial path st should use as the working directory. 496 * https://st.suckless.org/patches/workingdir/ 497 */ 498 #define WORKINGDIR_PATCH 0 499 500 /* This patch adds the ability to configure st via Xresources. At startup, st will read and 501 * apply the resources named in the resources[] array in config.h. 502 * https://st.suckless.org/patches/xresources/ 503 */ 504 #define XRESOURCES_PATCH 0 505 506 /* This patch adds the ability to reload the Xresources config when a SIGUSR1 signal is received 507 * e.g.: killall -USR1 st 508 * Depends on the XRESOURCES_PATCH. 509 */ 510 #define XRESOURCES_RELOAD_PATCH 0