Commit graph

382 commits

Author SHA1 Message Date
Daniel Eklöf
c01904a2c7
config: add [colors].dim0-7
This allows you to configure custom colors to be used when colors are
being dimmed (`\E[2m`).

It is implemented by color matching (just like
bold-text-in-bright=palette-based); the color-to-be-dimmed is matched
against the current color palette.

If it matches one of the regular colors (colors 0-7), the
corresponding “dim” color will be used.

If it matches one of the bright colors (colors 8-15), the
corresponding “regular” color will be used (but *only* if the “dim”
color has been set).

Otherwise, the color is dimmed by reducing its luminance.

The default behavior, i.e. when dim0-7 hasn’t been configured, is to
dim by reducing luminance for *all* colors. I.e. we don’t do any color
matching at all. In particular, this means that dimming a bright color
will *not* result in the corresponding “regular” color.

Closes #776
2021-11-13 17:39:08 +01:00
Daniel Eklöf
0d2a429109
doc: foot.ini: try to clear up the meaning of (AA)RRGGBB 2021-11-13 17:22:07 +01:00
Daniel Eklöf
d4b9ef7607
config: drop all warning logs from the tweak section 2021-11-13 11:04:30 +01:00
Daniel Eklöf
64f71c32f0
doc: foot.ini: mention “xkbcli interactive-wayland” 2021-11-07 15:51:53 +01:00
Daniel Eklöf
5e4de143de
csd: add support for a visible border
When we’re using CSDs, we’ve up until now rendered a 5px invisible
border. This border handles interactive resizing. I.e. hovering it
changes the mouse cursor, and mouse button events are used to start an
interactive resize.

This patch makes it possible to color part of (or the entire) border,
with a configurable color.

To facilitate this, two new options have been added:

* csd.border-width
* csd.border-color

border-width defaults to 0, resulting in the look we’re used to.

border-color defaults to the title bar color. If the title bar color
hasn’t been set, it defaults to the default foreground color (just
like the title bar color does).

This means that, setting border-width but not border-color, results in
a border that blends with the title bar.
2021-10-27 18:32:28 +02:00
Daniel Eklöf
bcea929c94
config: add [key-bindings].noop action
Key combinations assigned to this action will not be sent to the
application.

Closes #765
2021-10-27 17:07:26 +02:00
Daniel Martí
b2ddacb799 doc: fix a typo
I presume "can be used here as well" was meant.
Spotted it while reading the docs.
2021-10-23 22:06:37 +01:00
Daniel Eklöf
00c0bc12aa
doc: foot.5: we support “real” urgency through XDG activation
Foot has been signaling window urgency through the (new) “XDG
activation” protocol for some time now. Update the documentation to
reflect this.
2021-10-22 20:03:18 +02:00
Daniel Eklöf
60edefc311
doc: foot.5: warn user to be careful with single letter key bindings in url mode 2021-10-20 19:55:08 +02:00
Daniel Eklöf
f9782848e5
doc: foot.1: reporting bugs: move “search existing issues” 2021-10-16 15:30:21 +02:00
Daniel Eklöf
a75f1f7ab4
doc: foot.1: reporting bugs: re-order and tweak
* Tell people to search existing bugs first (open + closed)
* Re-order instructions: most important ones first
2021-10-16 15:25:11 +02:00
Daniel Eklöf
37f9f54840
config: enable grapheme shaping by default
This changes the default value of tweak.grapheme-shaping to “yes”,
thus enabling grapheme shaping by default.

It also changes the default value of tweak.grapheme-width-method to
“wcswidth”, for maximum compatibility with terminal applications.
2021-10-13 17:42:40 +02:00
Craig Barnes
a31d04fa23 doc: ctlseq: improve text formatting in CSI and SGR sections
Using underlining for parameters allows the angle brackets to be
removed while still keeping a visual separation between literals
and parameters. The removes any uncertainty about whether the
angle brackets are part of the sequence or not. It also mirrors
the formatting used further down in the document.
2021-10-11 15:40:36 +01:00
Craig Barnes
fd989f47cf doc: ctlseq: fix SGR table heading
The other tables that contain only params also use the heading
"Parameter" rather than "Sequence".
2021-10-11 15:13:45 +01:00
feeptr@codeberg.org
7eea97b659 doc: document indicator-color 2021-10-09 16:59:52 -04:00
Daniel Eklöf
227b33ac75
doc: benchmark: 1.9.2 results, laptop 2021-10-09 12:20:11 +02:00
Daniel Eklöf
fbc1770348
doc: benchmark: 1.9.2 results, beefy desktop 2021-10-09 11:33:30 +02:00
Mitja Horvat
729f7466ae notify: add the notify-focus-inhibit config option
foot doesn't show desktop notifications (via OSC777) if the current
terminal has keyboard focus.

This is probably a sane default, but there are use cases where showing
a notification regardless of the focus status may be desired. For
example, a completion notification of a long running task inside a
non-focused tmux window.

This PR adds the notify-focus-inhibit option which can be used to
disable inhibition of notifications when the window has focus.

The default value is `yes`, which retains the old behavior.
2021-10-06 23:33:17 +02:00
Daniel Eklöf
fb77637eb9
term: only scale using DPI if *all* monitors have a scaling factor or one
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
2021-09-24 22:07:47 +02:00
Daniel Eklöf
2934a4e96c
doc: foot.ini: remove stray double quote character 2021-09-22 22:04:30 +02:00
Daniel Eklöf
af1a01b252
doc: foot.ini: font: add reference to dpi-aware option 2021-09-22 22:01:35 +02:00
Daniel Eklöf
ab34288e18
doc: foot.ini: mention how dpi-aware interacts with :pixelsize=N 2021-09-22 22:01:17 +02:00
Daniel Eklöf
14e77fec32
doc: foot.ini: mention how dpi-aware interacts with bitmap fonts 2021-09-22 22:00:28 +02:00
Craig Barnes
ef7919e64d main/client: add no-op "-e" command-line option 2021-09-18 23:40:40 +01:00
Arnavion
b26fda7ef0 doc: Document that the default section can be reopened as [main] 2021-09-08 22:42:58 -07:00
Daniel Eklöf
8ffc556d44
main: verify primary font is monospaced at startup
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.
2021-08-31 19:58:35 +02:00
Daniel Eklöf
9434066546
meson: terminfo install location now defaults to $datadir/terminfo
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).
2021-08-30 19:09:13 +02:00
Daniel Eklöf
fd78fa98b4
doc: how to pass TERMINFO through ‘doas’
See #692
2021-08-27 20:25:26 +02:00
Daniel Eklöf
6e8da20ee2
doc: foot{,,client}: document TERMINFO
Closes #691
2021-08-27 13:31:15 +02:00
Daniel Eklöf
7639186865
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
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
2021-08-17 21:04:30 +02:00
Daniel Eklöf
0c03e9a766
config: add url.uri-characters
This option specifies the characters allowed in the auto-detected
URLs.

Any character not in this set constitutes an URL delimiter, and will
never be included in auto-detected URLs.

This option does not affect OSC-8 URLs.

Closes #654
2021-08-09 18:25:36 +02:00
Daniel Eklöf
ed855c72dc
doc: foot.ini: include paths are allowed to begin with ~/ 2021-07-30 14:57:35 +02:00
Daniel Eklöf
46d30406be
doc: foot.ini: indent lists 2021-07-30 14:56:55 +02:00
David Rosca
2c5a23867f
Only brighten palette colors with bold-text-in-bright=palette-based 2021-07-26 19:13:46 +02:00
Daniel Eklöf
51250c64cc
doc: meson: no need to check for scdoc again
We’re already checking for scdoc in the top-level meson.build
2021-07-24 16:42:47 +02:00
Daniel Eklöf
c38b3507bc
doc: foot.ini: mention that csd.font is sized using the title bar size 2021-07-24 11:02:44 +02:00
Daniel Eklöf
50f59fe575
config: add csd.font option 2021-07-24 11:02:43 +02:00
Daniel Eklöf
a987b1bd99
doc: ctlseq: improve description of OSC 52 response 2021-07-22 12:02:28 +02:00
Timur Celik
91801ae55d render: Allow cells to bleed into their neighbor
This patch adds a `confined` flag to each cell to track if the last
rendered glyph bled into it's right neighbor.  To keep things simple,
bleeding into any other neighbor cell than the immediate right one is
not allowed.  This should cover most use cases.

Before rendering a row we now do a prepass and mark all cells unclean
that are affected by a bleeding neighbor.  If there are consecutive
bleeding cells, the whole group must be re-rendered even if only a
single cell has changed.

The patch also deprecates both old overflowing glyph options
*allow-overflowing-double-width-glyphs* and *pua-double-width* in favor
of a single new one named *overflowing-glyphs*.
2021-07-17 13:22:44 +02:00
Ben Brown
9a14e5d818 doc: fix typo in foot man page 2021-07-08 10:43:51 +01:00
Daniel Eklöf
fcb60abc13
config: add locked-title=no|yes
Closes #386
2021-07-04 17:59:40 +02:00
Daniel Eklöf
d101325885
doc: foot.ini.5: typo: relay-size-ms -> resize-delay-ms 2021-07-02 16:53:49 +02:00
Daniel Eklöf
5138f02214
config: rename at-most-2 (value for grapheme-width-method) to double-width 2021-07-01 08:00:23 +02:00
Daniel Eklöf
9817e44c32
config: add tweak.grapheme-width-method=wcswidth|at-most-2 2021-07-01 07:58:06 +02:00
Craig Barnes
5dca0458a0 log: add LOG_CLASS_NONE and use as initializer for log_level
This means that logging will be completely disabled until log_init()
has been called, which is useful to prevent log spam when running
UNITTEST{} blocks in debug builds.

Note that this doesn't change the default log level at runtime, which
was already being set to LOG_CLASS_INFO in main.c and client.c.

The new log level is also exposed to the command-line interface as
`--log-level=none`, which allows disabling logging entirely.
2021-06-26 22:15:09 +01:00
Daniel Eklöf
d206697001
doc: benchark: laptop results for 1.8.0 2021-06-25 10:56:40 +02:00
Daniel Eklöf
e365ac0b10
doc: benchmark: add --dat to vtebench command line 2021-06-25 10:24:55 +02:00
Daniel Eklöf
2873043865
doc: benchmarks: update desktop results with 1.8.0 2021-06-25 10:23:43 +02:00
Daniel Eklöf
f3e5c3deb9
doc: foot.ini: grapheme-shaping: mention regular compose characters 2021-06-24 17:30:49 +02:00
Daniel Eklöf
b9ef703eb1
wip: grapheme shaping 2021-06-24 17:30:45 +02:00