patches.def.h (21718B)
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 0 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 0 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 0 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 0 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 0 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 0 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 0 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 /* Allows dragging a file into the terminal and have the path printed. 148 * https://st.suckless.org/patches/drag-n-drop 149 */ 150 #define DRAG_AND_DROP_PATCH 0 151 152 /* This patch makes the cursor color the inverse of the current cell color. 153 * https://st.suckless.org/patches/dynamic-cursor-color/ 154 */ 155 #define DYNAMIC_CURSOR_COLOR_PATCH 0 156 157 /* This is a variant of the anysize patch that explicitly do not change the size increment hints, 158 * i.e. only keeping the dynamic padding which is the main thing the anysize patch introduces. 159 * In practice this means that the dynamic padding / anysize functionality only ever comes into 160 * effect when the size hints are intentionally ignored. 161 * An example of this would be dwm respecting the size hints of floating windows, but disrespecting 162 * the size hints when the window is tiled (provided that resizehints config is set to 0). 163 * 164 * Note that this patch depends on ANYSIZE_PATCH being enabled to have an effect. 165 */ 166 #define DYNAMIC_PADDING_PATCH 0 167 168 /* Reading and writing st's screen through a pipe, e.g. pass info to dmenu. 169 * https://st.suckless.org/patches/externalpipe/ 170 */ 171 #define EXTERNALPIPE_PATCH 0 172 173 /* This patch improves and extends the externalpipe patch in two ways: 174 * - it prevents the reset of the signal handler set on SIGCHILD, when 175 * the forked process that executes the external process exits and 176 * - it adds the externalpipein function to redirect the standard output 177 * of the external command to the slave size of the pty, that is, as if 178 * the external program had been manually executed on the terminal 179 * 180 * It can be used to send desired escape sequences to the terminal with a 181 * keyboard shortcut. The patch was created to make use of the dynamic-colors 182 * tool that uses the OSC escape sequences to change the colors of the terminal. 183 * 184 * This patch depends on EXTERNALPIPE_PATCH being enabled. 185 * 186 * https://github.com/sos4nt/dynamic-colors 187 * https://lists.suckless.org/hackers/2004/17218.html 188 */ 189 #define EXTERNALPIPEIN_PATCH 0 190 191 /* This patch allows command line applications to use all the fancy key combinations 192 * that are available to GUI applications. 193 * https://st.suckless.org/patches/fix_keyboard_input/ 194 */ 195 #define FIXKEYBOARDINPUT_PATCH 0 196 197 /* This patch allows you to add spare font besides the default. Some glyphs can be not present in 198 * the default font. For this glyphs st uses font-config and try to find them in font cache first. 199 * This patch append fonts defined in font2 variable to the beginning of the font cache. 200 * So they will be used first for glyphs that are absent in the default font. 201 * https://st.suckless.org/patches/font2/ 202 */ 203 #define FONT2_PATCH 0 204 205 /* This patch adds the ability to toggle st into fullscreen mode. 206 * Two key bindings are defined: F11 which is typical with other applications and Alt+Enter 207 * which matches the default xterm behavior. 208 * https://st.suckless.org/patches/fullscreen/ 209 */ 210 #define FULLSCREEN_PATCH 0 211 212 /* Hide the X cursor whenever a key is pressed and show it back when the mouse is moved in 213 * the terminal window. 214 * https://st.suckless.org/patches/hidecursor/ 215 */ 216 #define HIDECURSOR_PATCH 0 217 218 /* This patch hides the terminal cursor when the window loses focus (as opposed to showing a hollow 219 * cursor). 220 * https://www.reddit.com/r/suckless/comments/nvee8h/how_to_hide_cursor_in_st_is_there_a_patch_for_it/ 221 */ 222 #define HIDE_TERMINAL_CURSOR_PATCH 0 223 224 /* This patch adds a keybinding that lets you invert the current colorscheme of st. 225 * This provides a simple way to temporarily switch to a light colorscheme if you use a dark 226 * colorscheme or visa-versa. 227 * https://st.suckless.org/patches/invert/ 228 */ 229 #define INVERT_PATCH 0 230 231 /* Pressing the default binding Ctrl+Shift-i will popup dmenu, asking you to enter a unicode 232 * codepoint that will be converted to a glyph and then pushed to st. 233 * https://st.suckless.org/patches/iso14755/ 234 */ 235 #define ISO14755_PATCH 0 236 237 /* This patch allows you to select text on the terminal using keyboard shortcuts. 238 * NB: An improved variant of this patch is enabled if combined with the reflow patch. 239 * 240 * https://st.suckless.org/patches/keyboard_select/ 241 */ 242 #define KEYBOARDSELECT_PATCH 0 243 244 /* This patch adds support for drawing ligatures using the Harfbuzz library to transform 245 * original text of a single line to a list of glyphs with ligatures included. 246 * This patch depends on the Harfbuzz library and headers to compile. 247 * You need to uncomment the corresponding lines in config.mk to use the harfbuzz library 248 * when including this patch. 249 * https://github.com/cog1to/st-ligatures 250 * https://st.suckless.org/patches/ligatures/ 251 */ 252 #define LIGATURES_PATCH 0 253 254 /* This patch makes st ignore terminal color attributes by forcing display of the default 255 * foreground and background colors only - making for a monochrome look. Idea ref. 256 * https://www.reddit.com/r/suckless/comments/ixbx6z/how_to_use_black_and_white_only_for_st/ 257 */ 258 #define MONOCHROME_PATCH 0 259 260 /* This patch sets the _NET_WM_ICON X property with an icon that is read from a .png file. 261 * This patch depends on the GD Graphics Library and headers to compile. 262 * You need to uncomment the corresponding lines in config.mk to use the gd library. 263 * 264 * The default location for the .png file is: 265 * - /usr/local/share/pixmaps/st.png 266 * 267 * https://st.suckless.org/patches/netwmicon/ 268 */ 269 #define NETWMICON_PATCH 0 270 271 /* This patch sets the _NET_WM_ICON X property with an icon that is read from a farbfeld image. 272 * The benefit of this patch is that you do not need an additional dependency on an external 273 * library to read and convert the farbfeld image. 274 * 275 * The default location for the farbfeld image is: 276 * - /usr/local/share/pixmaps/st.ff 277 * 278 * Remember to change the ICONNAME in config.mk from st.png to st.ff when using this patch. 279 * 280 * Example command to convert a .png to farbfeld: 281 * $ png2ff < st.png > st.ff 282 * 283 * https://tools.suckless.org/farbfeld/ 284 * https://github.com/bakkeby/patches/wiki/netwmicon/ 285 */ 286 #define NETWMICON_FF_PATCH 0 287 288 /* This patch sets the _NET_WM_ICON X property with a hardcoded icon for st. This is the 289 * original version that predates the version that reads the image from a .png file. 290 * https://st.suckless.org/patches/netwmicon/ 291 */ 292 #define NETWMICON_LEGACY_PATCH 0 293 294 /* This patch allows you to spawn a new st terminal using Ctrl-Shift-Return. It will have the 295 * same CWD (current working directory) as the original st instance. 296 * https://st.suckless.org/patches/newterm/ 297 */ 298 #define NEWTERM_PATCH 0 299 300 /* This patch will set the _MOTIF_WM_HINTS property for the st window which, if the window manager 301 * respects it, will show the st window without window decorations. 302 * 303 * In dwm, if the decoration hints patch is applied, then the st window will start out without a 304 * border. In GNOME and KDE the window should start without a window title. 305 */ 306 #define NO_WINDOW_DECORATIONS_PATCH 0 307 308 /* Open contents of the clipboard in a user-defined browser. 309 * https://st.suckless.org/patches/open_copied_url/ 310 */ 311 #define OPENCOPIED_PATCH 0 312 313 /* Open the selected text using xdg-open. 314 * https://st.suckless.org/patches/open_selected_text/ 315 */ 316 #define OPEN_SELECTED_TEXT_PATCH 0 317 318 /* This patch allows for URLs to be opened directly when you click on them. This may not work with 319 * all terminal applications. 320 * 321 * https://www.reddit.com/r/suckless/comments/cc83om/st_open_url/ 322 */ 323 #define OPENURLONCLICK_PATCH 0 324 325 /* This patch allows st to fetch the current working directory through the OSC 7 escape 326 * sequence emitted by shells. Must be used with newterm patch. 327 * 328 * https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory 329 * https://github.com/veltza/st-sx/commit/817865c2c6ed905af8849580e58bdcf399216fbd 330 */ 331 #define OSC7_PATCH 0 332 333 /* This patch allows jumping between prompts by utilizing the OSC 133 escape sequence 334 * emitted by shells. Must be used with either reflow or scrollback patch. 335 * 336 * https://codeberg.org/dnkl/foot#jumping-between-prompts 337 */ 338 #define OSC133_PATCH 0 339 340 /* Reflow. 341 * Allows st to be resized without cutting off text when the terminal window is made larger again. 342 * Text wraps when the terminal window is made smaller. 343 * Comes with scrollback. 344 */ 345 #define REFLOW_PATCH 0 346 347 /* This patch allows you to specify a border that is relative in size to the width of a cell 348 * in the terminal. 349 * https://st.suckless.org/patches/relativeborder/ 350 */ 351 #define RELATIVEBORDER_PATCH 0 352 353 /* This patch allows you to right-click on some selected text to send it to the plumbing 354 * program of choice, e.g. open a file, view an image, open a URL. 355 * https://st.suckless.org/patches/right_click_to_plumb/ 356 */ 357 #define RIGHTCLICKTOPLUMB_PATCH 0 358 359 /* Scroll back through terminal output using Shift+{PageUp, PageDown}. 360 * https://st.suckless.org/patches/scrollback/ 361 */ 362 #define SCROLLBACK_PATCH 0 363 364 /* Scroll back through terminal output using Shift+MouseWheel. 365 * This variant depends on SCROLLBACK_PATCH being enabled. 366 * https://st.suckless.org/patches/scrollback/ 367 */ 368 #define SCROLLBACK_MOUSE_PATCH 0 369 370 /* Scroll back through terminal output using mouse wheel (when not in MODE_ALTSCREEN). 371 * This variant depends on SCROLLBACK_PATCH being enabled. 372 * https://st.suckless.org/patches/scrollback/ 373 */ 374 #define SCROLLBACK_MOUSE_ALTSCREEN_PATCH 0 375 376 /* This patch adds the two color-settings selectionfg and selectionbg to config.def.h. 377 * Those define the fore- and background colors which are used when text on the screen is selected 378 * with the mouse. This removes the default behaviour which would simply reverse the colors. 379 * https://st.suckless.org/patches/selectioncolors/ 380 */ 381 #define SELECTION_COLORS_PATCH 0 382 383 /* This patch works with selectioncolors and alpha patches to make selection 384 * background color transparent. 385 * https://st.suckless.org/patches/selectionbg-alpha/ 386 */ 387 #define SELECTIONBG_ALPHA_PATCH 0 388 389 /* This is the single drawable buffer patch as outlined in the FAQ to get images 390 * in w3m to display. While this patch does not break the alpha patch it images 391 * are not shown in w3m if the alpha patch is applied. 392 */ 393 #define SINGLE_DRAWABLE_BUFFER_PATCH 0 394 395 /* This patch adds SIXEL graphics support for st. 396 * Note that patch/sixel.c/sixel_hls.c come from mintty, licensed under GPL. 397 * Known issues: 398 * - Rendering sixel graphics may cause unusual cursor placement, this is 399 * not specific to this variant of st - the same issue is present in 400 * the xterm implementation. This is likely an issue of sixel height 401 * not being detected correctly. 402 * 403 * Note that you need to uncomment the corresponding lines in config.mk when including this patch. 404 * This patch is incompatible with the W3M patch. 405 * 406 * https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809 407 */ 408 #define SIXEL_PATCH 0 409 410 /* This patch allows clients to embed into the st window and is useful if you tend to 411 * start X applications from the terminal. For example: 412 * 413 * $ surf -e $WINDOWID 414 * 415 * The behavior is similar to Plan 9 where applications can take over windows. 416 * URL TBC 417 */ 418 #define ST_EMBEDDER_PATCH 0 419 420 /* Use inverted defaultbg/fg for selection when bg/fg are the same. 421 * https://st.suckless.org/patches/spoiler/ 422 */ 423 #define SPOILER_PATCH 0 424 425 /* This patch changes the mouse shape to the global default when the running program subscribes 426 * for mouse events, for instance, in programs like ranger and fzf. It emulates the behaviour 427 * shown by vte terminals like termite. 428 * https://st.suckless.org/patches/swapmouse/ 429 */ 430 #define SWAPMOUSE_PATCH 0 431 432 /* This patch adds synchronized-updates/application-sync support in st. 433 * This will have no effect except when an application uses the synchronized-update escape 434 * sequences. With this patch nearly all cursor flicker is eliminated in tmux, and tmux detects 435 * it automatically via terminfo. 436 * 437 * Note: this patch alters st.info to promote support for extra escape sequences, which can 438 * potentially cause application misbehaviour if you do not use this patch. Try removing or 439 * commenting out the corresponding line in st.info if this is causing issues. 440 * 441 * https://st.suckless.org/patches/sync/ 442 */ 443 #define SYNC_PATCH 0 444 445 /* Instead of a default X cursor, use the xterm cursor from your cursor theme. 446 * You need to uncomment the corresponding line in config.mk to use the -lXcursor library 447 * when including this patch. 448 * https://st.suckless.org/patches/themed_cursor/ 449 */ 450 #define THEMED_CURSOR_PATCH 0 451 452 /* Adds support for special underlines. 453 * 454 * Example test command: 455 * $ echo -e "\e[4:3m\e[58:5:10munderline\e[0m" 456 * ^ ^ ^ ^ ^- sets terminal color 10 457 * | | | \- indicates that terminal colors should be used 458 * | | \- indicates that underline color is being set 459 * | \- sets underline style to curvy 460 * \- set underline 461 * 462 * Note: this patch alters st.info to promote support for extra escape sequences, which can 463 * potentially cause application misbehaviour if you do not use this patch. Try removing or 464 * commenting out the corresponding line in st.info if this is causing issues. 465 * 466 * https://st.suckless.org/patches/undercurl/ 467 */ 468 #define UNDERCURL_PATCH 0 469 470 /* Allows mouse scroll without modifier keys for regardless of alt screen using the external 471 * scroll program. 472 * https://st.suckless.org/patches/universcroll/ 473 */ 474 #define UNIVERSCROLL_PATCH 0 475 476 /* Use XftFontMatch in place of FcFontMatch. 477 * 478 * XftFontMatch calls XftDefaultSubstitute which configures various match properties according 479 * to the user's configured Xft defaults (xrdb) as well as according to the current display and 480 * screen. Most importantly, the screen DPI is computed [1]. Without this, st uses a "default" 481 * DPI of 75 [2]. 482 * 483 * [1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535 484 * [2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255 485 * 486 * https://git.suckless.org/st/commit/528241aa3835e2f1f052abeeaf891737712955a0.html 487 */ 488 #define USE_XFTFONTMATCH_PATCH 0 489 490 /* Vertically center lines in the space available if you have set a larger chscale in config.h 491 * https://st.suckless.org/patches/vertcenter/ 492 */ 493 #define VERTCENTER_PATCH 0 494 495 /* Briefly inverts window content on terminal bell event. 496 * https://st.suckless.org/patches/visualbell/ 497 */ 498 #define VISUALBELL_1_PATCH 0 499 500 /* Adds support for w3m images. 501 * https://st.suckless.org/patches/w3m/ 502 */ 503 #define W3M_PATCH 0 504 505 /* Adds proper glyphs rendering in st allowing wide glyphs to be drawn as-is as opposed to 506 * smaller or cut glyphs being rendered. 507 * https://github.com/Dreomite/st/commit/e3b821dcb3511d60341dec35ee05a4a0abfef7f2 508 * https://www.reddit.com/r/suckless/comments/jt90ai/update_support_for_proper_glyph_rendering_in_st/ 509 */ 510 #define WIDE_GLYPHS_PATCH 0 511 512 /* There is a known issue that Google's Variable Fonts (VF) can end up with letter spacing 513 * that is too wide in programs that use Xft, for example Inconsolata v3.000. 514 * 515 * This is intended as a temporary patch / hack until (if) this is fixed in the Xft library 516 * itself. 517 * 518 * https://github.com/googlefonts/Inconsolata/issues/42#issuecomment-737508890 519 */ 520 #define WIDE_GLYPH_SPACING_PATCH 0 521 522 /* This patch allows user to specify the initial path st should use as the working directory. 523 * https://st.suckless.org/patches/workingdir/ 524 */ 525 #define WORKINGDIR_PATCH 0 526 527 /* This patch adds the ability to configure st via Xresources. At startup, st will read and 528 * apply the resources named in the resources[] array in config.h. 529 * https://st.suckless.org/patches/xresources/ 530 */ 531 #define XRESOURCES_PATCH 0 532 533 /* This patch adds the ability to reload the Xresources config when a SIGUSR1 signal is received 534 * e.g.: killall -USR1 st 535 * Depends on the XRESOURCES_PATCH. 536 */ 537 #define XRESOURCES_RELOAD_PATCH 0 538 539 /* This patch adds the ability to configure st via Xdefaults, in addition to Xresources, 540 * like the rxvt-unicode terminal. At startup, st will read and apply the system and user's 541 * local Xdefault files, the XServer's Xresources, and the screen and per-host Xdefaults. 542 * This patch depends on XRESOURCES_PATCH and is compatible with XRESOURCES_RELOAD_PATCH. 543 */ 544 #define XRESOURCES_XDEFAULTS_PATCH 0