Commit graph

260 commits

Author SHA1 Message Date
Daniel Eklöf
b88f0d672f
meson: bump version to 1.17.2 2024-04-17 11:26:45 +02:00
Daniel Eklöf
04ebd02874
meson: bump version to 1.17.1 2024-04-11 15:28:17 +02:00
Daniel Eklöf
21951feb2b
meson: bump version to 1.17.0 2024-04-02 16:27:54 +02:00
Daniel Eklöf
8b3dbf0972
meson: bump version to 1.16.2 2023-10-17 17:24:12 +02:00
Daniel Eklöf
195eb3356a
meson: bump version to 1.16.1 2023-10-12 16:36:18 +02:00
Daniel Eklöf
a9d6eaf937
meson: bump version to 1.16.0 2023-10-11 18:15:01 +02:00
Daniel Eklöf
34520aa16e
meson: allow building with wayland-protocols as a subproject 2023-08-08 19:32:45 +02:00
Daniel Eklöf
698c5b54f3
wayland: cursor-shape-v1 is now always available
Since we're requiring wayland-protocols >= 1.32
2023-08-07 16:53:19 +02:00
Daniel Eklöf
7eee415b75
wayland: fractional-scale-v1 is now always available
Since we're requiring wayland-protocols >= 1.32
2023-08-07 16:53:19 +02:00
Daniel Eklöf
d59a4e7a77
wayland: xdg-activation is now always available
Since we're requiring wayland-protocols >= 1.32
2023-08-07 16:53:19 +02:00
Daniel Eklöf
e0475a5421
meson: require wayland-protocols >= 1.32 2023-08-07 16:53:19 +02:00
Daniel Eklöf
f314699945
meson: bump version to 1.15.3 2023-08-07 16:39:54 +02:00
Daniel Eklöf
53a5d62e5a
meson: bump version to 1.15.2 2023-07-30 13:18:55 +02:00
Daniel Eklöf
139fd6d55c
meson: add -Dterminfo-base-name option
This defines the base name of the generated terminfo files. It
defaults to the value of -Ddefault-terminfo (i.e. 'foot')

Example:

  meson -Ddefault-terminfo=foot-bananas -Dterminfo-base-name=foot-apples

The generated terminfo files will be

* terminfo/f/foot-apples
* terminfo/f/foot-apples-direct

The default value of $TERM will be 'foot-bananas'
2023-07-28 15:40:53 +02:00
Daniel Eklöf
9e4d82a484
meson: bump version to 1.15.1 2023-07-21 08:57:03 +02:00
Max Gautier
d3ffb0bde1
Ties systemd units to graphical-session.target
- wayland-instance template target was a mistake.
  Systemd does not support simultaneous same user session, so stop
  trying to go against that.
- Only start systemd units in Wayland environments.
2023-07-21 08:12:55 +02:00
Daniel Eklöf
5a3706ac46
meson: bump version to 1.15.0 2023-07-14 12:26:03 +02:00
Daniel Eklöf
3800b279d6
meson: move cursor-shape.{c,h} from ‘foot’ binary to vtlib
This should fix a build issue when doing partial PGO builds, when
cursor-shape-v1 is *available*.
2023-07-03 14:42:22 +02:00
Daniel Eklöf
8fc43ccd2d
meson: log availability of cursor-shape-v1 2023-07-03 14:36:33 +02:00
Daniel Eklöf
c2e481fb6a
meson: bump wayland-protocols version required for cursor-shape to 1.32 2023-07-03 14:36:32 +02:00
Daniel Eklöf
bf83a0b2bd
meson: cursor-shape: use .xml from wayland-protocols
This patch assumes a git snapshot of wayland-protocols are
installed.

We need to bump the version number as soon as the next version of
wayland-protocols have been released.
2023-07-03 14:36:32 +02:00
Daniel Eklöf
c8e13ad393
cursor-shape: add support for server side cursor shapes
This implements support for the new cursor-shape-v1 protocol. When
available, we use it, instead of client-side cursor surfaces, to
select the xcursor shape.

Note that we still need to keep client side pointers, for:

* backward compatibility
* to be able to "hide" the cursor

Closes #1379
2023-07-03 14:36:32 +02:00
Daniel Eklöf
ee794a121e
refactor: track current xcursor using an enum, instead of a char pointer 2023-07-03 14:36:32 +02:00
Daniel Eklöf
7a37e6891f
meson: log availability of optional wayland protocols 2023-06-30 08:28:20 +02:00
Daniel Eklöf
1e6204e1ac
meson: generate bindings for wp-fractional-scale + wp-viewport 2023-06-29 15:38:17 +02:00
sewn
16872ecc41
meson: use meson feed feature for scdoc input
Removes the need for a shell dependency.
2023-06-14 17:15:20 +00:00
Daniel Eklöf
e78319fccd
utmp: rewrite utmp logging
This patch generalizes the utmp support, to not only support
libutempter, but also ulog (and in the future, even more interfaces).

* Rename config option main.utempter to main.utmp-helper
* Add meson option -Dutmp-backend=none|libutempter|ulog|auto
* Rename meson option -Ddefault-utempter-path to -Dutmp-default-helper-path
* utmp is no longer detected at compile time, but at runtime instead.

Meson will configure the following pre-processor macros, based on the
selected utmp backend:

* UTMP_ADD - argument to pass to utmp helper when adding a record (starting foot)
* UTMP_DEL - argument to pass to utmp helper when removing a record (exiting foot)
* UTMP_DEL_HAVE_ARGUMENT - if defined, UTMP_DEL expects an extra argument ($WAYLAND_DISPLAY)
* UTMP_DEFAULT_HELPER_PATH - path to the default utmp helper binary

The documentation has been updated to mention which arguments are
passed to the helper binary.

Closes #1314
2023-05-22 18:47:25 +02:00
Vivian Szczepanski
98528da5e5
meson: bump tllist dependency version to 1.1.0
The tll_sort() macro was added to tllist in version 1.1.0, and so
building with a previous version causes a linking error.
2023-04-09 09:05:50 +02:00
Daniel Eklöf
ae6bbce6c2
meson: bump version to 1.14.0 2023-04-03 18:52:42 +02:00
Daniel Eklöf
9937d92c85
utils: xtgettcap: new utility, to send XTGETTCAP queries 2022-10-07 14:40:22 +02:00
Daniel Eklöf
aa10b1d2da
Add support for creating utmp records
This patch adds support for creating utmp records using the ‘utempter’
helper binary from the ‘libutempter’ package.

* New config option ‘main.utempter’
* New meson command line option, -Ddefault-utempter-path. Defaults to
  auto-detecting the path.

The default value of the new ‘main.utempter’ config option depends on
the meson command line option ‘-Ddefault-utempter-path’.

If ‘main.utempter’ is *not* set to ‘none’, foot will try to execute
the utempter helper binary to create utmp records when a new terminal
is instantiated. The record is removed when the terminal instance is
destroyed.
2022-09-23 23:02:25 +02:00
Vladimír Magyar
debf1b8453
chore: rename desktop files 2022-09-18 17:57:11 +02:00
Daniel Eklöf
cd1933baf1
meson: bump version to 1.13.1 2022-08-31 19:19:15 +02:00
Daniel Eklöf
e0465d3a7a
meson: bump version to 1.13.0 2022-08-07 09:32:02 +02:00
Daniel Eklöf
8967dd9cfe
input: add new Unicode input mode
This mode is activated through the new key-bindings.unicode-input and
search-bindings.unicode-input key bindings.

When active, the user can “build” a Unicode codepoint by typing its
hexadecimal value.

Note that there’s no visual feedback in this mode. This is
intentional. This mode is intended to be a fallback for users that
don’t use an IME.

Closes #1116
2022-07-29 09:26:31 +02:00
Daniel Eklöf
fabffd626b
wayland: log human readable SHM format names in debug builds 2022-06-20 18:58:40 +02:00
Daniel Eklöf
15d45d5704
meson: -Dsystemd-units-dir installs even if systemd is not found
If -Dsystemd-units-dir is explicitly set, then install the systemd
service files regardless of whether systemd is available or not.
2022-05-12 13:46:06 +02:00
Daniel Eklöf
62fe452cc2
meson: add -Dsystemd-units-dir=<path> meson command line option
This allows package maintainers to override the location to which our
systemd service files are installed.

It’s value is an *absolute* path, and *not* relative ${prefix}.

The default is ${systemduserunitdir}.
2022-05-12 13:45:53 +02:00
Daniel Eklöf
e95269447f
meson: bump version to 1.12.1 2022-04-27 20:06:09 +02:00
Daniel Eklöf
ea1171a5a2
meson: bump version to 1.12.0 2022-04-22 17:14:41 +02:00
Daniel Eklöf
c7248cf763
meson: add -Dtests=false|true option
When set to false, no test binaries are neither built, nor
executed (with “ninja test”).

Closes #919
2022-04-22 17:05:25 +02:00
Merlin Büge
e6f884a9e1
doc + meson.build: update information about foot.ini, small cleanup
- foot.ini.5: mention location of example config file
- foot.1: replace outdated (or incomplete) information about the
  location of the config file with references to foot.ini.5
- foot.1 and foot.ini.5: conform to scdoc specification, thus surround each
  header with (at least) one blank line. additionally consistently use exactly
  one line before/after each header (was sometimes two before)
- foot.1: some parts of the keybindings had their own section, move into
  KEYBOARD SHORTCUTS section
- foot.1: move EXIT STATUS section to the end where it is commonly found
- foot.1: copy information about config file handling from the beginning of
  foot.ini.5 into the CONFIGURATION section of foot.1
- INSTALL.md: foot.ini is no longer included in the documentation
- meson.build: do not bundle foot.ini with documentation anymore, see also
  https://codeberg.org/dnkl/foot/pulls/1015

Closes #1002
2022-04-22 17:00:04 +02:00
Daniel Eklöf
90a2ca966f
key-binding: new API, for handling sets of key bindings
Up until now, our Wayland seats have been tracking key bindings. This
makes sense, since the seat’s keymap determines how the key bindings
are resolved.

However, tying bindings to the seat/keymap alone isn’t enough, since
we also depend on the current configuration (i.e. user settings) when
resolving a key binding.

This means configurations that doesn’t match the wayland object’s
configuration, currently don’t resolve key bindings correctly. This
applies to footclients where the user has overridden key bindings on
the command line (e.g. --override key-bindings.foo=bar).

Thus, to correctly resolve key bindings, each set of key bindings must
be tied *both* to a seat/keymap, *and* a configuration.

This patch introduces a key-binding manager, with an API to
add/remove/lookup, and load/unload keymaps from sets of key bindings.

In the API, sets are tied to a seat and terminal instance, since this
makes the most sense (we need to instantiate, or incref a set whenever
a new terminal instance is created). Internally, the set is tied to a
seat and the terminal’s configuration.

Sets are *added* when a new seat is added, and when a new terminal
instance is created. Since there can only be one instance of each
seat, sets are always removed when a seat is removed.

Terminals on the other hand can re-use the same configuration (and
typically do). Thus, sets ref-count the configuration. In other words,
when instantiating a new terminal, we may not have to instantiate a
new set of key bindings, but can often be incref:ed instead.

Whenever the keymap changes on a seat, all key bindings sets
associated with that seat reloads (re-resolves) their key bindings.

Closes #931
2022-04-17 15:39:51 +02:00
Daniel Eklöf
e95bc9283e
meson: install foot.ini to /etc/xdg/foot/foot.ini
Closes #1001
2022-04-17 11:27:53 +02:00
Daniel Eklöf
9b343fd9fb
meson: stop using deprecated functions, require meson >= 0.58
* get_pkgconfig_variable() -> get_variable()
* prog.path() -> prog.full_path()
* meson.build_root() -> meson.global_build_root()
2022-02-27 11:28:11 +01:00
Max Gautier
1783f69cbd Adding systemd unit files for socket activation
- Support for multiples concurrent instances, templated on
  WAYLAND_DISPLAY
- Use standard input for the socket file descriptor (inetd style)
- Always use the socket provided by systemd with the systemd user
  service
- wayland-instance@.target is intended to be a special target a bit like
  graphical-session.target.
2022-02-26 16:09:30 +01:00
Daniel Eklöf
990a15250a
meson: fcft-3.0.0 is buggy, require 3.0.1
Fcft-3.0.0 is known to cause crashes. We don’t want anyone ever
compiling foot against it.

Closes #935
2022-02-09 21:48:34 +01:00
Daniel Eklöf
3fea7829fa
meson: bump version to 1.11.0 2022-02-05 17:20:27 +01:00
Daniel Eklöf
e0227266ca
fcft: adapt to API changes in fcft-3.x
Fcft no longer uses wchar_t, but plain uint32_t to represent
codepoints.

Since we do a fair amount of string operations in foot, it still makes
sense to use something that actually _is_ a string (or character),
rather than an array of uint32_t.

For this reason, we switch out all wchar_t usage in foot to
char32_t. We also verify, at compile-time, that char32_t used
UTF-32 (which is what fcft expects).

Unfortunately, there are no string functions for char32_t. To avoid
having to re-implement all wcs*() functions, we add a small wrapper
layer of c32*() functions.

These wrapper functions take char32_t arguments, but then simply call
the corresponding wcs*() function.

For this to work, wcs*() must _also_ be UTF-32 compatible. We can
check for the presence of the  __STDC_ISO_10646__ macro. If set,
wchar_t is at least 4 bytes and its internal representation is UTF-32.

FreeBSD does *not* define this macro, because its internal wchar_t
representation depends on the current locale. It _does_ use UTF-32
_if_ the current locale is UTF-8.

Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is
defined.

Other fcft API changes:

* fcft_glyph_rasterize() -> fcft_codepoint_rasterize()
* font.space_advance has been removed
* ‘tags’ have been removed from fcft_grapheme_rasterize()
* ‘fcft_log_init()’ removed
* ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
2022-02-05 17:00:54 +01:00
Daniel Eklöf
379e68916e
meson: fix race build order of builtin terminfo
The builtin terminfo is used by dcs.c, which is built as part of the
static library ‘vtlib’. Thus, vtlib needs to depend on the
builtin_terminfo target.
2022-01-15 17:15:45 +01:00