aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson/pkgbuild: bump version to 1.9.11.9.1Daniel Eklöf2021-10-01-2/+2
|
* changelog: prepare for 1.9.1Daniel Eklöf2021-10-01-5/+4
|
* Merge branch 'master' into releases/1.9Daniel Eklöf2021-10-01-468/+1031
|\
| * Merge branch 'hacktober-theme'Daniel Eklöf2021-10-01-0/+22
| |\
| | * Rename to Hacktobergrtcdr2021-09-26-0/+0
| | |
| | * add hacktoberfest themegrtcdr2021-09-22-0/+22
| | |
| * | Merge branch 'line-wise-selection-with-soft-line-wrapping'Daniel Eklöf2021-10-01-16/+85
| |\ \ | | | | | | | | | | | | Closes #726
| | * | selection: line-wise selection now handles soft line-wrappingDaniel Eklöf2021-09-30-16/+85
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, soft-wrapped lines were not selected correctly, as the selection logic was hardcoded to simply select everything between the first and last column on the current terminal row. Now, we scan backward and forward, looking for hard-wrapped lines. This is similar to how word-based selection works. Closes #726
| * | Merge branch 'static-color-table'Daniel Eklöf2021-09-26-46/+33
| |\ \
| | * | config: add comments to default_color_table[] about color channel valuesCraig Barnes2021-09-25-0/+2
| | | |
| | * | config: simplify initialization of color table in config_load()Craig Barnes2021-09-25-46/+31
| |/ /
| * | Merge branch 'non-dpi-aware-if-any-output-uses-scaling'Daniel Eklöf2021-09-24-27/+59
| |\ \ | | |/ | |/|
| | * term: only scale using DPI if *all* monitors have a scaling factor or oneDaniel Eklöf2021-09-24-27/+59
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With dpi-aware=auto (the default), scale fonts using DPI *only* if *all* available monitors have a scaling factor of one. The idea is this: if a user, with multiple monitors, have enabled scaling on *at least* one monitor, he/she has most likely done so to match the size of his/hers other monitors. For example, if the user has one monitor with a scaling factor of one, and another one with a scaling factor of two, he/she expects things to be twice as large on the second monitor. If we (foot) scale using DPI on the first monitor, and using the scaling factor on the second monitor, foot will *not* look twice as big on the second monitor (this was the old behavior of dpi-aware=auto). Part of #714
| * doc: foot.ini: remove stray double quote characterDaniel Eklöf2021-09-22-1/+1
| |
| * readme: avoid having two “see...” right next after each otherDaniel Eklöf2021-09-22-1/+1
| |
| * doc: foot.ini: font: add reference to dpi-aware optionDaniel Eklöf2021-09-22-1/+2
| |
| * doc: foot.ini: mention how dpi-aware interacts with :pixelsize=NDaniel Eklöf2021-09-22-0/+7
| |
| * doc: foot.ini: mention how dpi-aware interacts with bitmap fontsDaniel Eklöf2021-09-22-5/+11
| |
| * box-drawing: repair debug logsDaniel Eklöf2021-09-19-4/+3
| |
| * Merge branch 'eflag'Daniel Eklöf2021-09-19-4/+31
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Closes #184 Closes #257 Closes #313 Closes #596 Closes #625 Closes #716
| | * main/client: add no-op "-e" command-line optionCraig Barnes2021-09-18-4/+31
| |/
| * main/client: replace some uses of printf() with puts() in print_usage()Craig Barnes2021-09-18-27/+28
| | | | | | | | | | | | FOOT_DEFAULT_TERM is a string literal passed as a -D argument to the compiler, so it can just be concatenated with the other string literals, instead of being formatted with printf().
| * log: simplify Boolean logic for setting "colorize" var in log_init()Craig Barnes2021-09-15-1/+1
| |
| * Merge branch 'braille'Daniel Eklöf2021-09-14-39/+185
| |\ | | | | | | | | | Closes #702
| | * box-drawing: braille: prefer increasing spacing over dot widthDaniel Eklöf2021-09-14-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | Too large dots make them harder to distinguish, when the spacing between them is small. Prefer increasing the spacing, instead of increasing the dot size. This looks better at small font sizes in particular.
| | * term: turn ‘box-drawings’ array into three dynamically allocated arraysDaniel Eklöf2021-09-14-42/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The box_drawings array is now quite large, and uses up ~4K when *empty*. This patch splits it up into three separate, dynamically allocated arrays; one for the traditional box+line drawing and block elements glyphs, one for braille, and one for the legacy computing symbols. When we need to render a glyph, the *entire* array (that it belongs to) is allocated. I.e this is one step closer to a dynamic glyph cache (like the one fcft uses), but doesn’t go all the way. This is especially nice for people with ‘box-drawings-uses-font-glyphs=yes’; for them, the custom glyphs now uses 3*8 bytes (for the three array pointers), instead of 4K.
| | * box-drawing: NOINLINE brailleDaniel Eklöf2021-09-12-1/+1
| | |
| | * render: codespell: aquire -> acquireDaniel Eklöf2021-09-12-1/+1
| | |
| | * box-drawing: add braille charactersDaniel Eklöf2021-09-12-7/+105
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Render braille ourselves, instead of using font glyphs. Decoding a braille character is easy enough; there are 256 codepoints, represented by an 8-bit integer (i.e. subtract the Unicode codepoint offset, 0x2800, and you’re left with an integer in the range 0-255). Each bit corresponds to a dot. The first 6 bits represent the upper 6 dots, while the two last bits represent the fourth (and last) row of dots. The hard part is sizing the dots and the spacing between them. The aim is to have the spacing between the dots be the same size as the dots themselves, and to have the margins on each side be half the size of the dots. In a perfectly sized cell, this means two braille characters next to each other will be evenly spaced. This is however almost never the case. The layout logic currently: * Set dot size to either the width / 4, or height / 8, depending on which one is smallest. * Horizontal spacing is initialized to the width / 4 * Vertical spacing is initialized to the height / 8 * Horizontal margins are initialized to the horizontal spacing / 2 * Vertical margins are initialized to the vertical spacing / 2. Next, we calculate the number of “remaining” pixels. That is, if we add the left margin, two dots and the spacing between, how many pixels are left on the horizontal axis? These pixels are distributed in the following order (we “stop” as soon as we run out of pixels): * If the dot size is 0 (happens for very small font sizes), increase it to 1. * If the margins are 0, increase them to 1. * If we have enough pixels (need at 2 horizontal and 4 vertical), increase the dot size. * Increase spacing. * Increase margins. Closes #702
| * Merge branch 'pgo-script'Daniel Eklöf2021-09-12-74/+258
| |\ | | | | | | | | | Closes #701
| | * changelog: pgo build scriptsDaniel Eklöf2021-09-12-0/+3
| | |
| | * install.md: document pgo/*.sh scriptsDaniel Eklöf2021-09-12-0/+26
| | |
| | * pgo.sh: set -x *after* verifying inputDaniel Eklöf2021-09-12-1/+3
| | |
| | * pkgbuild: add back --prefix --wrap-mode=nofallbackDaniel Eklöf2021-09-12-1/+1
| | |
| | * pkgbuild: add ‘auto’ to the list of possible PGO valuesDaniel Eklöf2021-09-12-1/+1
| | |
| | * pgo: pgo.sh: remove both gcc and clang generated profile statsDaniel Eklöf2021-09-12-1/+8
| | |
| | * pkgbuild: the pgo script erases the old profdata filesDaniel Eklöf2021-09-12-1/+0
| | |
| | * pgo: pgo.sh: add meson bld/src dir arguments lastDaniel Eklöf2021-09-12-1/+1
| | |
| | * pgo: pgo.sh: run ‘find’ in the build-directory, not cwdDaniel Eklöf2021-09-12-1/+1
| | |
| | * pgo: pgo.sh: allow a pre-existing build directoryDaniel Eklöf2021-09-12-4/+4
| | |
| | * pkgbuild: build using pgo/pgo.shDaniel Eklöf2021-09-12-74/+4
| | |
| | * pgo: pgo.sh: auto: don’t use full-headless-swayDaniel Eklöf2021-09-12-2/+2
| | | | | | | | | | | | | | | | | | | | | This requires Sway >= 1.6.2, which hasn’t been released yet. Thus, don’t auto-use it. Users can still request it explicitly.
| | * pgo: add set -x to all PGO scriptsDaniel Eklöf2021-09-12-8/+8
| | | | | | | | | | | | | | | Without this, debugging error reports from users is going to be _very_ difficult...
| | * pgo: full-headless-cage: remove references to SwayDaniel Eklöf2021-09-12-1/+0
| | |
| | * pgo: full-headless-cage: new headless variantDaniel Eklöf2021-09-12-2/+19
| | | | | | | | | | | | | | | | | | | | | Appears to work, but cage spams a lot of 00:00:08.026 [types/wlr_output.c:720] Basic output test failed for HEADLESS-1 00:00:08.036 [types/wlr_output.c:720] Basic output test failed for HEADLESS-1
| | * pgo: full-inner: quote path in trap’s “rm” commandDaniel Eklöf2021-09-12-1/+1
| | |
| | * pgo: full-inner: remove -o tweak.render-timer=logDaniel Eklöf2021-09-12-1/+0
| | |
| | * pgo: replace meson-pgo.sh with several script primitivesDaniel Eklöf2021-09-12-154/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All scripts are in the ‘pgo’ directory: * options: command line options for generate-alt-random-writes.py, sourced by other scripts. * pgo.sh: top-level script, generates a meson build directory, selects a PGO method, generates the profiling data, re-configures the meson build directory and does the final build. This script is intended to be used by end-users, and shows _how_ to integrate the script primitives. Build servers will most likely *not* want to use this script as-is. * partial.sh: generates alt-random-write data and runs “foot{,client} --version”, and then feeds the alt-random data to the PGO helper binary. Does not require a running Wayland session. Touches $blddir/pgo-ok on success. * full-inner.sh: runs “footclient --version”, and then a complex “foot” command that first generates alt-random-write data, and then “cat’s” it. Requires a running Wayland session, *but*, this script is usually not called directly (see below). Touches $blddir/pgo-ok onsucces.. * full-current-session.sh: runs full-inner.sh. That is, it runs foot in the currently running Wayland session. Note that this will pop up a foot window. * full-headless-sway.sh: generates a custom Sway configuration that exec’s foot-headless-sway-inner.sh (see below), and then executes a headless Sway. In other words, this script does a *full* PGO build, but *without* requiring a running Wayland session. Requires Sway >= 1.6.2. * full-headless-sway.sh: runs full-inner.sh + “swaymsg exit”. To do a custom PGO build, without using pgo.sh, you’d need to: CFLAGS=”$CFLAGS -O3” meson --buildtype=release -Db_lto=true meson configure -Db_pgo=generate ninja ninja test (only needed if tllist+fcft are built as subprojects) Run *one* of: - partial.sh - full-current-session.sh - full-headless-sway.sh meson configure -D b_pgo=use ninja
| | * meson-pgo: document limitations/requirementsDaniel Eklöf2021-09-12-0/+8
| | |
| | * meson-pgo: headless-sway: export XDG_RUNTIME_DIRDaniel Eklöf2021-09-12-0/+7
| | |
| | * meson-pgo: use as little path quoting as possibleDaniel Eklöf2021-09-12-2/+5
| | |
| | * meson-pgo: do mode validation and mode evaluation at the same timeDaniel Eklöf2021-09-12-9/+7
| | |
| | * meson-pgo: improved argument validationDaniel Eklöf2021-09-12-10/+19
| | |
| | * meson-pgo: add mode=noneDaniel Eklöf2021-09-12-10/+16
| | |
| | * meson-pgo: ‘auto’ now prefers full-headless-swayDaniel Eklöf2021-09-12-3/+3
| | |
| | * meson-pgo: initial support for full PGO through headless SwayDaniel Eklöf2021-09-12-17/+33
| | |
| | * meson-pgo: remove debug outputDaniel Eklöf2021-09-12-2/+0
| | |
| | * meson-pgo: realpath() on build dir tooDaniel Eklöf2021-09-12-1/+1
| | |
| | * meson-pgo: initial version of a meson wrapper script for PGO buildsDaniel Eklöf2021-09-12-0/+109
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: meson-pgo.sh auto|partial|full <source-dir> <build-dir> <meson-options> Note: build-dir must *not* exist before the script is run (but if it does, the script will tell you so, and exit). Supported compilers: gcc and clang The script does *not* add _any_ custom meson options, except configure -Db_pgo. Thus, you probably want to call it like this: meson-pgo.sh auto . /tmp/foot-pgo-build --buildtype=release -Db_lto=true
| * Merge branch 'gnome-pointer-button-workaround'Daniel Eklöf2021-09-12-45/+63
| |\ | | | | | | | | | Closes #709
| | * input: workaround GNOME issue with pointer button eventsDaniel Eklöf2021-09-12-45/+63
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain circumstances, GNOME will send multiple pointer button press events, without any release or leave events in between. This trips up our button tracking. Workaround, by replacing the existing state for the pressed button with the new state. Previously, debug builds would assert (and thus crash), while release builds would have multiple states for the same button, causing (probably) issues like the title bar not being usable (as in, cannot be dragged, buttons not working etc). Hopefully closes #709
| * Merge branch 'default-section-is-main'Daniel Eklöf2021-09-09-3/+4
| |\
| | * doc: Document that the default section can be reopened as [main]Arnavion2021-09-09-3/+4
| |/
| * term: reduce scope of variableDaniel Eklöf2021-09-05-3/+1
| |
| * sixel: call decsixel() directly, instead of going through sixel_put()Daniel Eklöf2021-09-05-2/+2
| |
| * sixel: avoid looking up color from palette for each sixelDaniel Eklöf2021-09-05-3/+4
| | | | | | | | | | | | Instead, do the palette lookup when we receive the DECGCI (i.e. when the palette entry is selected), and store the actual color value in our sixel struct.
| * sixel: calculate default bg once, in initDaniel Eklöf2021-09-05-15/+11
| | | | | | | | | | | | | | | | We have all information we need to calculate the default background color in sixel_init(): * Whether the image have transparency or not * The current ANSI background color
| * server: no need to clone the config to handle -N,--no-waitDaniel Eklöf2021-09-05-7/+2
| |
| * render: unref clip regionDaniel Eklöf2021-09-04-0/+1
| |
| * Merge branch 'check-font-is-monospace'Daniel Eklöf2021-09-03-0/+84
| |\ | | | | | | | | | Closes #704
| | * config: codespell: setting has only two ‘t’Daniel Eklöf2021-08-31-1/+1
| | |
| | * changelog: check if primary font is monospacedDaniel Eklöf2021-08-31-0/+6
| | |
| | * server: verify primary font is monospacedDaniel Eklöf2021-08-31-0/+6
| | | | | | | | | | | | | | | | | | ... unless we’re re-using the main conf as-is, in which case we will already have done this (and the conf’s user-notification list will already contain a warning).
| | * main: verify primary font is monospaced at startupDaniel Eklöf2021-08-31-0/+72
| |/ | | | | | | | | | | | | | | | | | | Load a couple of ASCII glyphs and check if their advance widths matches. If not, warn the user that the font is probably not monospaced. This can be disabled by setting tweak.font-monospace-warn=no. Closes #704.
| * terminal: prefer the advance width of ‘M’ over that of a spaceDaniel Eklöf2021-08-31-3/+8
| | | | | | | | | | | | | | | | This makes some non-monospaced fonts more readable, allowing users to read errors and warnings printed in the window. Furthermore, fcft-3.0 will remove the space_advance member, so once we upgrade, we’ll have to rasterize a glyph ourselves anyway.
| * Merge branch 'csi-cleanup'Craig Barnes2021-08-30-32/+13
| |\
| | * csi: various, minor code/formatting improvementsCraig Barnes2021-08-30-32/+13
| | |
| * | changelog: terminfo changesDaniel Eklöf2021-08-30-0/+11
| | |
| * | pkgbuild: fix terminfo package install locationDaniel Eklöf2021-08-30-2/+2
| | |
| * | pkgbuild: line-wrap meson configure command lineDaniel Eklöf2021-08-30-1/+5
| | |
| * | install: terminfo: pipe sed output to ticDaniel Eklöf2021-08-30-2/+2
| | | | | | | | | | | | Related to #700
| * | install: document how to manually pre-process the terminfo source fileDaniel Eklöf2021-08-30-6/+3
| | | | | | | | | | | | Related to #700
| * | pkgbuild: fix terminfo removalDaniel Eklöf2021-08-30-1/+1
| | |
| * | Merge branch 'terminfo-no-custom-install-location'Daniel Eklöf2021-08-30-118/+77
| |\ \ | | | | | | | | | | | | Closes #695
| | * | meson: terminfo install location now defaults to $datadir/terminfoDaniel Eklöf2021-08-30-118/+77
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meson command line option -Dcustom-terminfo-install-location has been changed in the following ways: * If unset, $datadir/terminfo is used, and TERMINFO is *not* exported * If set, that value (relative to $prefix) is used, and TERMINFO *is* exported. * The special value ‘no’ is removed. -Ddefault-terminfo now also changes the terminfo names generated when -Dterminfo=enabled. Furthermore, the documentation for the TERMINFO environment variable has been removed from the foot.1 and footclient.1 man pages (but as mentioned above, foot *will* still set it if -Dcustom-terminfo-install-location has been used). INSTALL.md has been updated to now recommend using ncurses’ terminfo definitions, if available. But also to document the other alternatives; installing the terminfo definitions in a custom location, or installing them with a diferent name. It also describes the general problem, and the disadvantages of each alternative (but without going into too much depth).
| * | spawn: don’t error out if we fail to chdir()Daniel Eklöf2021-08-30-1/+7
| | |
| * | slave: log _which_ CWD we failed to change toDaniel Eklöf2021-08-30-1/+1
| |/
| * ci: codespell: ignore ‘doas’Daniel Eklöf2021-08-27-2/+2
| |
| * doc: how to pass TERMINFO through ‘doas’Daniel Eklöf2021-08-27-10/+24
| | | | | | | | See #692
| * changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-08-27-0/+11
| |
| * Merge branch 'releases/1.9'Daniel Eklöf2021-08-27-7/+6
| |\ | |/ |/|
* | meson/pkgbuild: bump version to 1.9.01.9.0Daniel Eklöf2021-08-27-2/+2
| |
* | changelog: prepare for 1.9.0Daniel Eklöf2021-08-27-5/+4
|/
* doc: foot{,,client}: document TERMINFODaniel Eklöf2021-08-27-0/+46
| | | | Closes #691
* meson: run generate_version.sh in a C localeDaniel Eklöf2021-08-25-2/+3
| | | | | | | | Previously, only the date command inside the script was run with LC_TIME=C. But there’s no reason to be that conservative; we absolutely do not want _anything_ in that script to generate locale dependent output.
* Merge branch 'terminfo'Daniel Eklöf2021-08-19-28/+20
|\ | | | | | | Closes #687
| * slave: set TERMINFO instead of TERMINFO_DIRSDaniel Eklöf2021-08-18-28/+20
|/ | | | | | | | | This seems to be slightly better supported than TERMINFO_DIRS. It also simplifies our code, since it’s no longer an issue of whether to append or not - we just set TERMINFO, and ignore whatever it was set to before. Also closes #687
* changelog: cursor.blink now works in GNOMEDaniel Eklöf2021-08-18-0/+2
|
* Merge branch 'terminfo-dirs'Daniel Eklöf2021-08-17-81/+191
|\ | | | | | | Closes #671
| * terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRSDaniel Eklöf2021-08-17-81/+191
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of 2021-07-31, ncurses ships its own version of foot’s terminfo. Since: * It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb capabilities. * It doesn’t set hs,fsl,dsl (statusbar). * We want to be able to update our termminfo without waiting for an ncurses release. * Foot should be installable and usable on Linux systems that doesn’t have the latest ncurses. we still want to ship our own version. We can however not install it to the default terminfo location (e.g. /usr/share/terminfo), since it will collide with the ncurses provided files. Our options are to either rename our terminfo to something else, or to keep the name, but install our terminfo files somewhere else. The first option would be the easy one. However, I think it makes sense to use the same name. For example, a user that SSH’s into a remote system that does *not* have our own version installed, but *does* have the ncurses one, will gracefully fall back to that one, which is better than manually having to set e.g. TERM=xterm-256color. Now, if we want to use the same name, we need to install it somewhere else. But where? And how do we ensure our version is preferred over the ncurses one? I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by default. It makes it namespaced to foot (i.e. we’re not introducing a new “standard” terminfo location), thus guaranteeing it wont collide with ncurses. To enable applications to find it, we export TERMINFO_DIRS. This is a list of *additional* directories to search for terminfo files. If it’s already defined, we *append* to it. The nice thing with this is, if there’s no terminfo in that location (e.g. when you SSH into a remote), the default terminfo location is *also* searched. But only *after* having searched through TERMINFO_DIRS. In short: our version is preferred, but the ncurses one (or an older version of our terminfo package!) will be used if ours cannot be found. To enable packagers full control over the new behavior, the existing meson command line options have been modified, and a new option added: -Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo files. -Dcustom-terminfo-install-location=<path>: *where* the terminfo files are expected to be found. This *needs* to be set *even* if -Dterminfo=disabled. For example, if the packaging script builds and packages the terminfo files separate from the regular foot build. The path is *relative to $prefix*, and defaults to $datadir/foot/terminfo. This is the value that will be appended to TERMINFO_DIRS. Note that you can set it to ‘no’, in which case foot will *not* set/modify TERMINFO_DIRS. Only do this if you don’t intend to package foot’s terminfo files at all (i.e. you plan on using the ncurses ones only). -Ddefault-terminfo=foot. Allows overriding the default TERM value. This should only be changed if the target platform doesn’t support terminfo files. Closes #671