Commit graph

368 commits

Author SHA1 Message Date
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
Daniel Eklöf
8640a9c99a
doc: footclient.1: document -o,--override 2021-06-23 15:12:09 +02:00
Daniel Eklöf
fcc20456cd
doc: foot.1: remove trailing space, add ‘=’ between option name and its value 2021-06-23 15:12:09 +02:00
Daniel Eklöf
7334b53d83
config: add csd.button-color option
This option controls the foreground color of the
minimize/maximize/close buttons. I.e. the color used to draw the
minimize/maximize/close glyphs.

It defaults to default background color.
2021-06-20 10:44:50 +02:00
Daniel Eklöf
cf81fff062
config: add underline-offset option
This option allows the user to configure a custom underline
offset. That is, use the user provided offset instead of the font
provided one.

Closes #490
2021-06-17 17:54:21 +02:00
nick black
80e780627f
[foot-ctlseqs] 8-bit control characters are C1 2021-06-14 06:21:20 -04:00
Daniel Eklöf
c3274fd97e
Merge branch 'xtversion'
Closes #359
2021-06-13 17:20:47 +02:00
Daniel Eklöf
772e376992
doc: ctlseq: add XTVERSION 2021-06-13 17:19:49 +02:00
Craig Barnes
c32c206a37 doc: foot-ctlseqs: mention that SS2/SS3 only affect the next character 2021-06-12 12:45:03 +01:00
Craig Barnes
d85bd7084d doc: foot-ctlseqs: rename SS0/SS1 to SO/SI
There's no mention of SS0 or SS1 functions in ECMA-48 or ECMA-35.

0x0E/0x0F are SO/SI (Shift In/Out) in "7-bit environments" or LS0/LS1
(Locking Shift 0/1) in "8-bit environments". The former is the one
that applies to foot, since it generally follows "7-bit" conventions
due to its use of UTF-8.

See also: ECMA-35 §7.2 and §9.2.
2021-06-12 12:22:07 +01:00
Ryan Farley
f379ffb8ed Override options from command line
Allow any configuration option to be overridden with -o/--override
'section.key=value' arguments, as suggested in #554

update completitions for override

slight refactoring to ease footclient support
2021-06-12 03:05:15 -05:00
Daniel Eklöf
405b887a82
osc: implement iTerm2’s OSC-9 - desktop notifications 2021-06-04 07:44:00 +02:00
Daniel Eklöf
2ffedc7082
doc: foot{,client}: updates from feedback from @craigbarnes 2021-06-02 08:10:02 +02:00
Daniel Eklöf
1321b23567
doc: footclient.1: -t,--term: add references to ENVIRONMENT and TERMINFO sections 2021-06-02 08:10:02 +02:00
Daniel Eklöf
a1a521b81d
doc: footclient.1: add TERMINFO section 2021-06-02 08:10:02 +02:00