{"id":13429233,"url":"https://codeberg.org/dnkl/foot","last_synced_at":"2025-03-16T03:31:16.279Z","repository":{"id":50978399,"uuid":"2366","full_name":"dnkl/foot","owner":"dnkl","description":"A fast, lightweight and minimalistic Wayland terminal emulator","archived":false,"fork":false,"pushed_at":null,"size":29614,"stargazers_count":535,"open_issues_count":59,"forks_count":106,"subscribers_count":null,"default_branch":"master","last_synced_at":"2023-08-08T22:39:38.006Z","etag":null,"topics":["lightweight","minimalistic","terminal","wayland"],"latest_commit_sha":null,"homepage":"","language":"","has_issues":true,"has_wiki":true,"has_pages":null,"mirror_url":"f","source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://codeberg.org/repo-avatars/2366-0a8af594a4c015fc9e84300a3600a091","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-18T21:07:46.000Z","updated_at":"2023-08-08T17:35:16.000Z","dependencies_parsed_at":"2022-08-03T00:15:26.795Z","dependency_job_id":null,"html_url":"https://codeberg.org/dnkl/foot","commit_stats":{"total_commits":5142,"total_committers":80,"mean_commits":64.275,"dds":0.06301050175029177,"last_synced_commit":"9f3ce9236f9818263437cb6a4f26b20c5506a218"},"previous_names":[],"tags_count":41,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/repositories/dnkl%2Ffoot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/repositories/dnkl%2Ffoot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/repositories/dnkl%2Ffoot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/repositories/dnkl%2Ffoot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/owners/dnkl","download_url":"https://codeberg.org/dnkl/foot/archive/master.zip","host":{"name":"codeberg.org","url":"https://codeberg.org","kind":"forgejo","repositories_count":34662,"owners_count":722,"icon_url":"https://github.com/Codeberg-org.png","version":null,"created_at":"2022-08-01T13:30:46.733Z","updated_at":"2024-07-18T11:23:32.687Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/codeberg.org/owners"}},"keywords":["lightweight","minimalistic","terminal","wayland"],"created_at":"2024-07-31T02:00:31.454Z","updated_at":"2025-03-16T03:31:13.918Z","avatar_url":"https://codeberg.org/repo-avatars/2366-0a8af594a4c015fc9e84300a3600a091","language":"","funding_links":["https://github.com/sponsors/dnkl"],"categories":["Projects with already integrated PGO into their build scripts","Uncategorized","Terminal","Terminal Emulators","Applications"],"sub_categories":["Other","Uncategorized","Emulator","Terminal"],"readme":"# ![Logo: a terminal with a foot shaped prompt](icons/hicolor/48x48/apps/foot.png) foot\n\nThe fast, lightweight and minimalistic Wayland terminal emulator.\n\n[![CI status](https://ci.codeberg.org/api/badges/dnkl/foot/status.svg)](https://ci.codeberg.org/dnkl/foot)\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/foot.svg?columns=4)](https://repology.org/project/foot/versions)\n\n\n## Index\n\n1. [Features](#features)\n1. [Installing](#installing)\n1. [Configuration](#configuration)\n1. [Troubleshooting](#troubleshooting)\n1. [Why the name 'foot'?](#why-the-name-foot)\n1. [Fonts](#fonts)\n1. [Shortcuts](#shortcuts)\n   1. [Keyboard](#keyboard)\n      1. [Normal mode](#normal-mode)\n      1. [Scrollback search](#scrollback-search)\n   1. [Mouse](#mouse)\n   1. [Touchscreen](#touchscreen)\n1. [Server (daemon) mode](#server-daemon-mode)\n1. [URLs](#urls)\n1. [Shell integration](#shell-integration)\n   1. [Current working directory](#current-working-directory)\n   1. [Jumping between prompts](#jumping-between-prompts)\n   1. [Piping last command's output](#piping-last-command-s-output)\n1. [Alt/meta](#alt-meta)\n1. [Backspace](#backspace)\n1. [Keypad](#keypad)\n1. [DPI and font size](#dpi-and-font-size)\n1. [Supported OSCs](#supported-oscs)\n1. [Programmatically checking if running in foot](#programmatically-checking-if-running-in-foot)\n1. [XTGETTCAP](#xtgettcap)\n1. [Credits](#Credits)\n1. [Code of Conduct](#code-of-conduct)\n1. [Bugs](#bugs)\n1. [Contact](#contact)\n   1. [IRC](#irc)\n   1. [Mastodon](#mastodon)\n1. [Sponsoring/donations](#sponsoring-donations)\n1. [License](#license)\n\n\n## Features\n\n* Fast (see [benchmarks](doc/benchmark.md), and\n  [performance](https://codeberg.org/dnkl/foot/wiki/Performance))\n* Lightweight, in dependencies, on-disk and in-memory\n* Wayland native\n* DE agnostic\n* Server/daemon mode\n* User configurable font fallback\n* On-the-fly font resize\n* On-the-fly DPI font size adjustment\n* Scrollback search\n* Keyboard driven URL detection\n* Color emoji support\n* IME (via `text-input-v3`)\n* Multi-seat\n* True Color (24bpp)\n* [Styled and colored underlines](https://sw.kovidgoyal.net/kitty/underlines/)\n* [Synchronized Updates](https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2) support\n* [Sixel image support](https://en.wikipedia.org/wiki/Sixel)\n\n  ![wow](doc/sixel-wow.png \"Sixel screenshot\")\n\n\n# Installing\n\nSee [INSTALL.md](INSTALL.md).\n\n\n## Configuration\n\n**foot** can be configured by creating a file\n`$XDG_CONFIG_HOME/foot/foot.ini` (defaulting to\n`~/.config/foot/foot.ini`).  A template for that can usually be found\nin `/etc/xdg/foot/foot.ini` or\n[here](https://codeberg.org/dnkl/foot/src/branch/master/foot.ini).\n\nFurther information can be found in foot's man page `foot.ini(5)`.\n\n\n## Troubleshooting\n\nSee the [wiki](https://codeberg.org/dnkl/foot/wiki#user-content-troubleshooting)\n\n\n## Why the name 'foot'?\n\nI'm bad at names. Most of my projects usually start out as _foo\nsomething_ (for example, [yambar](https://codeberg.org/dnkl/yambar)\nwas _f00bar_ for a while).\n\nSo why _foot_?\n\n_foo terminal_ → _footerm_ → _foot_\n\nPretty bad, I know.\n\nAs a side note, if you pronounce the _foo_ part of _foot_ the same way\nyou pronounce _foobar_, then _foot_ sounds a lot like the Swedish word\n_fot_, which incidentally means (you guessed it) _foot_.\n\n\n## Fonts\n\n**foot** supports all fonts that can be loaded by _freetype_,\nincluding **bitmap** fonts and **color emoji** fonts.\n\nFoot uses _fontconfig_ to locate and configure the font(s) to\nuse. Since fontconfig's fallback mechanism is imperfect, especially\nfor monospace fonts (it doesn't prefer monospace fonts even though the\nrequested font is one), foot allows you, the user, to configure the\nfallback fonts to use.\n\nThis also means you can configure _each_ fallback font individually;\nyou want _that_ fallback font to use _this_ size, and you want that\n_other_ fallback font to be _italic_?  No problem!\n\nIf a glyph cannot be found in _any_ of the user configured fallback\nfonts, _then_ fontconfig's list is used.\n\n\n## Shortcuts\n\nThese are the default shortcuts. See `man foot.ini` and the example\n`foot.ini` to see how these can be changed.\n\n\n### Keyboard\n\n#### Normal mode\n\n\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003epage up\u003c/kbd\u003e/\u003ckbd\u003epage down\u003c/kbd\u003e\n: Scroll up/down in history\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ec\u003c/kbd\u003e, \u003ckbd\u003eXF86Copy\u003c/kbd\u003e\n: Copy selected text to the _clipboard_\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ev\u003c/kbd\u003e, \u003ckbd\u003eXF86Paste\u003c/kbd\u003e\n: Paste from _clipboard_\n\n\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003einsert\u003c/kbd\u003e\n: Paste from the _primary selection_\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003er\u003c/kbd\u003e\n: Start a scrollback search\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003e+\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003e=\u003c/kbd\u003e\n: Increase font size\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003e-\u003c/kbd\u003e\n: Decrease font size\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003e0\u003c/kbd\u003e\n: Reset font size\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003en\u003c/kbd\u003e\n: Spawn a new terminal. If the shell has been [configured to emit the\n  OSC 7 escape\n  sequence](https://codeberg.org/dnkl/foot/wiki#user-content-spawning-new-terminal-instances-in-the-current-working-directory),\n  the new terminal will start in the current working directory.\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003eo\u003c/kbd\u003e\n: Enter URL mode, where all currently visible URLs are tagged with a\n  jump label with a key sequence that will open the URL.\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003eu\u003c/kbd\u003e\n: Enter Unicode input mode.\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ez\u003c/kbd\u003e\n: Jump to the previous, currently not visible, prompt. Requires [shell\n  integration](https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts).\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ex\u003c/kbd\u003e\n: Jump to the next prompt. Requires [shell\n  integration](https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts).\n\n\n#### Scrollback search\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003er\u003c/kbd\u003e\n: Search _backward_ for next match\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003es\u003c/kbd\u003e\n: Search _forward_ for next match\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ew\u003c/kbd\u003e\n: Extend current selection (and thus the search criteria) to the end\n  of the word, or the next word if currently at a word separating\n  character.\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ew\u003c/kbd\u003e\n: Same as \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ew\u003c/kbd\u003e, except that the only word\n  separating characters are whitespace characters.\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ev\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ev\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ey\u003c/kbd\u003e, \u003ckbd\u003eXF86Paste\u003c/kbd\u003e\n: Paste from clipboard into the search buffer.\n\n\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003einsert\u003c/kbd\u003e\n: Paste from primary selection into the search buffer.\n\n\u003ckbd\u003eescape\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eg\u003c/kbd\u003e\n: Cancel the search\n\n\u003ckbd\u003ereturn\u003c/kbd\u003e\n: Finish the search and copy the current match to the primary\n  selection\n\n\n### URL mode\n\n\u003ckbd\u003et\u003c/kbd\u003e\n: Toggle whether the URL is displayed in the jump label or not\n\n\u003ckbd\u003eescape\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ec\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eg\u003c/kbd\u003e, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ed\u003c/kbd\u003e\n: Exit URL mode without launching any URLs\n\n\n### Mouse\n\n\u003ckbd\u003eleft\u003c/kbd\u003e - **single-click**\n: Drag to select; when released, the selected text is copied to the\n  _primary_ selection. This feature is **disabled** when client has\n  enabled _mouse tracking_.\n: Holding \u003ckbd\u003eshift\u003c/kbd\u003e enables selection in mouse tracking enabled\n  clients.\n: Holding \u003ckbd\u003ectrl\u003c/kbd\u003e will create a block selection.\n\n\u003ckbd\u003eleft\u003c/kbd\u003e - **double-click**\n: Selects the _word_ (separated by spaces, period, comma, parenthesis\n  etc) under the pointer. Hold \u003ckbd\u003ectrl\u003c/kbd\u003e to select everything\n  under the pointer up to, and until, the next space characters.\n\n\u003ckbd\u003eleft\u003c/kbd\u003e - **triple-click**\n: Selects the everything between enclosing quotes, or the entire row\n  if not inside a quote.\n\n\u003ckbd\u003eleft\u003c/kbd\u003e - **quad-click**\n: Selects the entire row.\n\n\u003ckbd\u003emiddle\u003c/kbd\u003e\n: Paste from _primary_ selection\n\n\u003ckbd\u003eright\u003c/kbd\u003e\n: Extend current selection. Clicking immediately extends the\n  selection, while hold-and-drag allows you to interactively resize\n  the selection.\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eright\u003c/kbd\u003e\n: Extend the current selection, but force it to be character wise,\n  rather than depending on the original selection mode.\n\n\u003ckbd\u003ewheel\u003c/kbd\u003e\n: Scroll up/down in history\n\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ewheel\u003c/kbd\u003e\n: Increase/decrease font size\n\n\n### Touchscreen\n\n\u003ckbd\u003etap\u003c/kbd\u003e\n: Emulates mouse left button click.\n\n\u003ckbd\u003edrag\u003c/kbd\u003e\n: Scrolls up/down in history.\n: Holding for a while before dragging (time delay can be configured)\n  emulates mouse dragging with left button held.\n\n\n## Server (daemon) mode\n\nWhen run normally, **foot** is a single-window application; if you\nwant another window, start another foot process.\n\nHowever, foot can also be run in a _server_ mode. In this mode, one\nprocess hosts multiple windows. All Wayland communication, VT parsing\nand rendering is done in the server process.\n\nNew windows are opened by running `footclient`, which remains running\nuntil the terminal window is closed, at which point it exits with the\nexit value of the client process (typically the shell).\n\nThe point of this mode is **a)** reduced memory footprint - all\nterminal windows will share fonts and glyph cache, and **b)** reduced\nstartup time - loading fonts and populating the glyph cache takes\ntime, but in server mode it only happens once.\n\nThe downside is a performance penalty; all windows' input and output\nare multiplexed in the same thread (but each window will have its own\nset of rendering threads). This means that if one window is very busy\nwith, for example, producing output, then other windows will suffer.\n\nAnd of course, should the server process crash, **all** windows will\nbe gone.\n\nTypical usage would be to start the server process (`foot --server`)\nwhen starting your Wayland compositor (i.e. logging in to your\ndesktop), and then run `footclient` instead of `foot` whenever you\nwant to launch a new terminal.\n\nFoot supports socket activation, which means `foot --server` will only be\nstarted the first time you'll run `footclient`. (systemd user units are\nincluded, but it can work with other supervision suites).\n\n## URLs\n\nFoot supports URL detection. But, unlike many other terminal\nemulators, where URLs are highlighted when they are hovered and opened\nby clicking on them, foot uses a keyboard driven approach.\n\nPressing \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003eo\u003c/kbd\u003e enters _\"URL\nmode\"_, where all currently visible URLs are underlined, and is\nassociated with a _\"jump-label\"_. The jump-label indicates the _key\nsequence_ (e.g. **\"AF\"**) to use to activate the URL.\n\nThe key binding can, of course, be customized, like all other key\nbindings in foot. See `show-urls-launch` and `show-urls-copy` in the\n`foot.ini` man page.\n\n`show-urls-launch` by default opens the URL with `xdg-open`. This can\nbe changed with the `url-launch` option.\n\n`show-urls-copy` is an alternative to `show-urls-launch`, that changes\nwhat activating a URL _does_; instead of opening it, it copies it to\nthe clipboard. It is unbound by default.\n\nJump label colors, the URL underline color, and the letters used in\nthe jump label key sequences can be configured.\n\n\n## Shell integration\n\n### Current working directory\n\nNew foot terminal instances (bound to\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003en\u003c/kbd\u003e by default) will open in\nthe current working directory, **if** the shell in the \"parent\"\nterminal reports directory changes.\n\nThis is done with the OSC-7 escape sequence. Most shells can be\nscripted to do this, if they do not support it natively. See the\n[wiki](https://codeberg.org/dnkl/foot/wiki#user-content-spawning-new-terminal-instances-in-the-current-working-directory)\nfor details.\n\n\n### Jumping between prompts\n\nFoot can move the current viewport to focus prompts of already\nexecuted commands (bound to\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003ez\u003c/kbd\u003e/\u003ckbd\u003ex\u003c/kbd\u003e by\ndefault).\n\nFor this to work, the shell needs to emit an OSC-133;A\n(`\\E]133;A\\E\\\\`) sequence before each prompt.\n\nIn zsh, one way to do this is to add a `precmd` hook:\n\n```zsh\nprecmd() {\n    print -Pn \"\\e]133;A\\e\\\\\"\n}\n```\n\nSee the\n[wiki](https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts)\nfor details, and examples for other shells.\n\n### Piping last command's output\n\nThe key binding `pipe-command-output` can pipe the last command's\noutput to an application of your choice (similar to the other `pipe-*`\nkey bindings):\n\n```ini\n[key-bindings]\npipe-command-output=[sh -c \"f=$(mktemp); cat - \u003e $f; footclient emacsclient -nw $f; rm $f\"] Control+Shift+g\n```\n\nWhen pressing \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eshift\u003c/kbd\u003e+\u003ckbd\u003eg\u003c/kbd\u003e, the last\ncommand's output is written to a temporary file, then an emacsclient\nis started in a new footclient instance. The temporary file is removed\nafter the footclient instance has closed.\n\nFor this to work, the shell must emit an OSC-133;C (`\\E]133;C\\E\\\\`)\nsequence before command output starts, and an OSC-133;D\n(`\\E]133;D\\E\\\\`) when the command output ends.\n\nIn fish, one way to do this is to add `preexec` and `postexec` hooks:\n\n```fish\nfunction foot_cmd_start --on-event fish_preexec\n  echo -en \"\\e]133;C\\e\\\\\"\nend\n\nfunction foot_cmd_end --on-event fish_postexec\n  echo -en \"\\e]133;D\\e\\\\\"\nend\n```\n\nSee the\n[wiki](https://codeberg.org/dnkl/foot/wiki#user-content-piping-last-command-s-output)\nfor details, and examples for other shells\n\n\n## Alt/meta\n\nBy default, foot prefixes _Meta characters_ with ESC. This corresponds\nto XTerm's `metaSendsEscape` option set to `true`.\n\nThis can be disabled programmatically with `\\E[?1036l` (and enabled\nagain with `\\E[?1036h`).\n\nWhen disabled, foot will instead set the 8:th bit of meta character\nand then UTF-8 encode it. This corresponds to XTerm's `eightBitMeta`\noption set to `true`.\n\nThis can also be disabled programmatically with `rmm` (_reset meta\nmode_, `\\E[?1034l`), and enabled again with `smm` (_set meta mode_,\n`\\E[?1034h`).\n\n\n## Backspace\n\nFoot transmits DEL (`^?`) on \u003ckbd\u003ebackspace\u003c/kbd\u003e. This corresponds to\nXTerm's `backarrowKey` option set to `false`, and to\n[`DECBKM`](https://vt100.net/docs/vt510-rm/DECBKM.html) being _reset_.\n\nTo instead transmit BS (`^H`), press\n\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ebackspace\u003c/kbd\u003e.\n\nNote that foot does **not** implement `DECBKM`, and that the behavior\ndescribed above **cannot** be changed.\n\nFinally, pressing \u003ckbd\u003ealt\u003c/kbd\u003e will prefix the transmitted byte with\nESC.\n\n\n## Keypad\n\nBy default, \u003ckbd\u003eNum Lock\u003c/kbd\u003e overrides the run-time configuration\nkeypad mode; when active, the keypad is always considered to be in\n_numerical_ mode. This corresponds to XTerm's `numLock` option set to\n`true`.\n\nIn this mode, the keypad keys always sends either numbers (\u003ckbd\u003eNum\nLock\u003c/kbd\u003e is **active**) or cursor movement keys (\u003ckbd\u003eUp\u003c/kbd\u003e,\n\u003ckbd\u003eDown\u003c/kbd\u003e, \u003ckbd\u003eLeft\u003c/kbd\u003e, \u003ckbd\u003eRight\u003c/kbd\u003e, \u003ckbd\u003ePage\nUp\u003c/kbd\u003e, \u003ckbd\u003ePage Down\u003c/kbd\u003e etc).\n\nThis can be disabled programmatically with `\\E[?1035l` (and enabled\nagain with `\\E[?1035h`).\n\nWhen disabled, the keypad sends custom escape sequences instead of\nnumbers, when in _application_ mode.\n\n\n## DPI and font size\n\nFont sizes are apparently a complex thing. Many applications use a\nfixed DPI of 96. They may also multiply it with the monitor's scale\nfactor.\n\nThis results in fonts with different **physical** sizes (i.e. if\nmeasured by a ruler) when rendered on screens with different DPI\nvalues. Even if the configured font size is the same.\n\nThis is not how it is meant to be. Fonts are measured in _point sizes_\n**for a reason**; a given point size should have the same height on\nall mediums, be it printers or monitors, regardless of their DPI.\n\nThat said, on Wayland, Hi-DPI monitors are typically handled by\nconfiguring a _\"scaling factor\"_ in the compositor. This is usually\nexpressed as either a rational value (e.g. _1.5_), or as a percentage\n(e.g. _150%_), by which all fonts and window sizes are supposed to be\nmultiplied.\n\nFor this reason, and because of the new _fractional scaling_ protocol\n(see below for details), and because this is how Wayland applications\nare expected to behave, foot \u003e= 1.15 will default to scaling fonts\nusing the compositor's scaling factor, and **not** the monitor\nDPI.\n\nThis means the (assuming the monitors are at the same viewing\ndistance) the font size will appear to change when you move the foot\nwindow across different monitors, **unless** you have configured the\nmonitors' scaling factors correctly in the compositor.\n\nThis can be changed by setting the `dpi-aware` option to `yes` in\n`foot.ini`. When enabled, fonts will **not** be sized using the\nscaling factor, but will instead be sized using the monitor's\nDPI. When the foot window is moved across monitors, the font size is\nupdated for the current monitor's DPI.\n\nThis means that, assuming the monitors are **at the same viewing\ndistance**, the font size will appear to be the same, at all times.\n\n_Note_: if you configure **pixelsize**, rather than **size**, then DPI\nchanges will **not** change the font size. Pixels are always pixels.\n\n\n### Fractional scaling on Wayland\n\nFor a long time, there was no **true** support for _fractional\nscaling_. That is, values like 1.5 (150%), 1.8 (180%) etc, only\ninteger values, like 2 (200%).\n\nCompositors that _did_ support fractional scaling did so using a hack;\nall applications were told to scale to 200%, and then the compositor\nwould down-scale the rendered image to e.g. 150%. This works OK for\neverything **except fonts**, which ended up blurry.\n\nWith _wayland-protocols 1.32_, a new protocol was introduced, that\nallows compositors to tell applications the _actual_ scaling\nfactor. Applications can then scale the image using a _viewport_\nobject, instead of setting a scale factor on the raw pixel buffer.\n\n\n## Supported OSCs\n\nOSC, _Operating System Command_, are escape sequences that interacts\nwith the terminal emulator itself. Foot implements the following OSCs:\n\n* `OSC 0` - change window icon + title (but only title is actually\n  supported)\n* `OSC 2` - change window title\n* `OSC 4` - change color palette\n* `OSC 7` - report CWD (see [shell integration](#shell-integration))\n* `OSC 8` - hyperlink\n* `OSC 9` - desktop notification\n* `OSC 10` - change (default) foreground color\n* `OSC 11` - change (default) background color\n* `OSC 12` - change cursor color\n* `OSC 17` - change highlight (selection) background color\n* `OSC 19` - change highlight (selection) foreground color\n* `OSC 22` - set the xcursor (mouse) pointer\n* `OSC 52` - copy/paste clipboard data\n* `OSC 104` - reset color palette\n* `OSC 110` - reset default foreground color\n* `OSC 111` - reset default background color\n* `OSC 112` - reset cursor color\n* `OSC 117` - reset highlight background color\n* `OSC 119` - reset highlight foreground color\n* `OSC 133` - [shell integration](#shell-integration)\n* `OSC 176` - set app ID\n* `OSC 555` - flash screen (**foot specific**)\n* `OSC 777` - desktop notification (only the `;notify` sub-command of\n  OSC 777 is supported.)\n\nSee the **foot-ctlseqs**(7) man page for a complete list of supported\ncontrol sequences.\n\n\n## Programmatically checking if running in foot\n\nFoot does **not** set any environment variables that can be used to\nidentify foot (reading `TERM` is not reliable since the user may have\nchosen to use a different terminfo).\n\nYou can instead use the escape sequences to read the _Secondary_ and\n_Tertiary Device Attributes_ (secondary/tertiary DA, for short).\n\nThe tertiary DA response is always `\\EP!|464f4f54\\E\\\\`, where\n`464f4f54` is `FOOT` in hex.\n\nThe secondary DA response is `\\E[\u003e1;XXYYZZ;0c`, where `XXYYZZ` is\nfoot's major, minor and patch version numbers, in decimal, using two\ndigits for each number. For example, foot-1.4.2 would respond with\n`\\E[\u003e1;010402;0c`.\n\n**Note**: not all terminal emulators implement tertiary DA. Most\nimplement secondary DA, but not all. All _should_ however implement\n_Primary DA_.\n\nThus, a safe way to query the terminal is to request the tertiary,\nsecondary and primary DA all at once, in that order. All terminals\nshould ignore escape sequences they do not recognize. You will have to\nparse the response (which in foot will consist of all three DA\nresponses, all at once) to determine which requests the terminal\nemulator actually responded to.\n\nStarting with version 1.7.0, foot also implements `XTVERSION`, to\nwhich it will reply with `\\EP\u003e|foot(version)\\E\\\\`. Version is\ne.g. \"1.8.2\" for a regular release, or \"1.8.2-36-g7db8e06f\" for a git\nbuild.\n\n\n# XTGETTCAP\n\n`XTGETTCAP` is an escape sequence initially introduced by XTerm, and\nalso implemented (and extended, to some degree) by Kitty.\n\nIt allows querying the terminal for terminfo\ncapabilities. Applications using this feature do not need to use the\nclassic, file-based, terminfo definition. For example, if all\napplications used this feature, you would no longer have to install\nfoot's terminfo on remote hosts you SSH into.\n\nXTerm's implementation (as of XTerm-370) only supports querying key\n(as in keyboard keys) capabilities, and three custom capabilities:\n\n* `TN` - terminal name\n* `Co` - number of colors (alias for the `colors` capability)\n* `RGB` - number of bits per color channel (different semantics from\n  the `RGB` capability in file-based terminfo definitions!).\n\nKitty has extended this, and also supports querying all integer and\nstring capabilities.\n\nFoot supports this, and extends it even further, to also include\nboolean capabilities. This means foot's entire terminfo can be queried\nvia `XTGETTCAP`.\n\nNote that both Kitty and foot handles **responses** to\nmulti-capability queries slightly differently, compared to XTerm.\n\nXTerm will send a single DCS reply, with `;`-separated\ncapability/value pairs. There are a couple of issues with this:\n\n* The success/fail flag in the beginning of the response is always `1`\n  (success), unless the very **first** queried capability is invalid.\n* XTerm will not respond **at all** to an invalid capability, unless\n  it's the first one in the `XTGETTCAP` query.\n* XTerm will end the response at the first invalid capability.\n\nIn other words, if you send a large multi-capability query, you will\nonly get responses up to, but not including, the first invalid\ncapability. All subsequent capabilities will be dropped.\n\nKitty and foot on the other hand, send one DCS response for **each**\ncapability in the multi query. This allows us to send a proper\nsuccess/fail flag for each queried capability. Responses for **all**\nqueried capabilities are **always** sent. No queries are ever dropped.\n\nAll replies are in `tigetstr()` format. That is, given the same\ncapability name, foot's reply is identical to what `tigetstr()` would\nhave returned.\n\n\n# Credits\n\n* [Ordoviz](https://codeberg.org/Ordoviz), for designing and\ncontributing foot's [logo](icons/hicolor/48x48/apps/foot.png).\n\n\n# Code of Conduct\n\nSee [Code of Conduct](CODE_OF_CONDUCT.md)\n\n\n# Bugs\n\nPlease report bugs to https://codeberg.org/dnkl/foot/issues\n\nBefore you open a new issue, please search existing bug reports, both\nopen **and** closed ones. Chances are someone else has already\nreported the same issue.\n\nThe report should contain the following:\n\n- Foot version (`foot --version`).\n- Log output from foot (run `foot -d info` from another terminal).\n- Which Wayland compositor (and version) you are running.\n- If reporting a crash, please try to provide a `bt full` backtrace\n  with symbols.\n- Steps to reproduce. The more details the better.\n\n\n# Contact\n\n## IRC\n\nAsk questions, hang out, sing praise or just say hi in the `#foot`\nchannel on\n[irc.libera.chat](https://web.libera.chat/?channels=#foot). Logs are\navailable at https://libera.irclog.whitequark.org/foot.\n\n\n## Mastodon\n\nEvery now and then I post foot related updates on\n[@dnkl@social.treehouse.systems](https://social.treehouse.systems/@dnkl)\n\n\n# Sponsoring/donations\n\n* GitHub Sponsors: https://github.com/sponsors/dnkl\n\n\n# License\n\nFoot is released under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/codeberg.org%2Fdnkl%2Ffoot","html_url":"https://awesome.ecosyste.ms/projects/codeberg.org%2Fdnkl%2Ffoot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/codeberg.org%2Fdnkl%2Ffoot/lists"}