Commit graph

4887 commits

Author SHA1 Message Date
Daniel Eklöf
57c7fb33af
config: add value_to_enum() 2021-11-13 11:04:28 +01:00
Daniel Eklöf
328b53b166
config: let value_to_double() log errors 2021-11-13 11:04:28 +01:00
Daniel Eklöf
def2d80b0a
config: let value_to_ulong() log errors 2021-11-13 11:04:28 +01:00
Daniel Eklöf
176b85cb10
config: add LOG_CONTEXTUAL_{ERR,WARN,ERRNO}
These work like LOG_AND_NOTIFY_* but add contextual information: path
of the conf file, line number, section name, key/option name and the
value.
2021-11-13 11:04:28 +01:00
Daniel Eklöf
534e9d8bef
config: first argument to log_and_notify() is now a ‘struct context’ 2021-11-13 11:04:28 +01:00
Daniel Eklöf
958ef9dd3b
config: rename str_to_spawn_template() -> value_to_spawn_template() 2021-11-13 11:04:27 +01:00
Daniel Eklöf
70aec2068a
config: rename str_to_fonts() -> value_to_fonts() 2021-11-13 11:04:27 +01:00
Daniel Eklöf
4aa3d1d5f8
config: rename str_to_wchars() -> value_to_wchars() 2021-11-13 11:04:27 +01:00
Daniel Eklöf
5fb86859df
config: rename str_to_double() -> value_to_double()
* str_to_double() -> value_to_double()
* str_to_pt_or_px() -> value_to_pt_or_px()
2021-11-13 11:04:27 +01:00
Daniel Eklöf
922490217e
config: rename str_to_ulong() -> value_to_ulong()
* str_to_ulong() -> value_to_ulong()
* str_to_color() -> value_to_color()
* str_to_two_colors() -> value_to_two_colors()
2021-11-13 11:04:27 +01:00
Daniel Eklöf
92e08a04ed
config: value_to_bool(): fixup 2021-11-13 11:04:27 +01:00
Daniel Eklöf
5bb2973c39
config: rename str_to_bool() -> value_to_bool()
Change argument to a ‘struct context’ pointer
2021-11-13 11:04:26 +01:00
Daniel Eklöf
82a7885324
config: pass aggregated struct to top-level section handlers 2021-11-13 11:04:26 +01:00
Craig Barnes
0e5e68d82e main: improve handling of setlocale(3) return value
There's no need to call setlocale() twice, since the first call
returns the same value as the second.

We also handle a NULL return value explicitly and show a distinct
error message for that case, since it typically indicates a
misconfigured locale and not just a non-UTF8 locale.
2021-11-10 17:41:48 +00:00
Daniel Eklöf
3e04c4e4f4
wayland: guard XDG startup notification with HAVE_XDG_ACTIVATION
Fixes compilation on systems with “too old” wayland-protocols
2021-11-09 18:23:44 +01:00
Daniel Eklöf
a08f4bc551
PKGBUILD: drop
The bundled PKGBUILD has been pretty much identical to the one in the
AUR package “foot-git” for a long time now.
2021-11-07 15:58:42 +01:00
Daniel Eklöf
64f71c32f0
doc: foot.ini: mention “xkbcli interactive-wayland” 2021-11-07 15:51:53 +01:00
Daniel Eklöf
15a5a0e62e
Merge branch 'error-out-on-too-old-wl-seat-interface'
Closes #779
2021-11-07 15:39:10 +01:00
Daniel Eklöf
0183e13f50
wayland: error out if there aren’t any seats available
If there aren’t any seats available, input is not possible (neither
keyboard nor mouse input).

Note that this is not the same thing as e.g. no keyboard being plugged
in. In this case, there will be a seat, but without the keybaord
capability. Input may not be possible _right now_, but may be later,
if the user plugs in a keyboard.

Closes #779
2021-11-07 11:29:25 +01:00
Daniel Eklöf
347b90eaae
Merge branch 'xdga-launch' 2021-11-03 12:58:55 +01:00
Ronan Pigott
99d5bf64bc foot/client: implement xdga client activation
This is an application of the xdg activation protocol that will allow
compositors to associate new foot toplevels with the command that
launched them.

footclient receives an activation token from the launcher which the
compositor can use to track application startup. It passes the token
to the foot server, which then activates the new window with the token
to complete the startup sequence.
2021-10-31 18:52:29 -07:00
Daniel Eklöf
347e79f8a1
config: format all (well, most) error messages in the same way
path:lineno: [section].key: value: message desribing what’s wrong with value
2021-10-31 20:58:17 +01:00
Daniel Eklöf
86cc0e0c95
config: use "[section].key" syntax when logging errors 2021-10-31 20:25:54 +01:00
Daniel Eklöf
b0ba58b841
config: improve error messages for invalid section keys 2021-10-31 20:23:35 +01:00
Daniel Eklöf
bf42884494
install: remove text describing obsolete differences between PKGBUILDs 2021-10-31 14:26:53 +01:00
Daniel Eklöf
74cca03976
readme: add GitHub Sponsors link 2021-10-31 14:24:17 +01:00
Daniel Eklöf
2398af7b47
Merge branch 'client-sendall' 2021-10-31 09:49:12 +01:00
Daniel Eklöf
4607763e79
client: use MSG_NOSIGNAL in send(3)
MSG_NOSIGNAL  Requests not to send the SIGPIPE signal if an attempt
                to send is made on  a  stream-oriented socket that is
                no longer connected. The [EPIPE] error shall still be
                returned.
2021-10-30 18:07:06 +02:00
Daniel Eklöf
cad48c1b0a
client: handle partial writes in send(3) 2021-10-29 21:44:34 +02:00
Daniel Eklöf
9a04c741a0
Merge branch 'csd-border' 2021-10-29 19:32:35 +02:00
Daniel Eklöf
e69c3e5b1e
render: csd_part: we don’t use the ‘src’ pixman image 2021-10-29 19:31:09 +02:00
Daniel Eklöf
61635b4132
foot.ini: csd.border-color: <color> -> <csd.color> 2021-10-29 19:30:11 +02: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
eebec8e38d
meson: install themes to $datadir/foot/themes 2021-10-27 17:31:02 +02:00
Daniel Eklöf
329ad66568
Merge branch 'scrolling-fixes' 2021-10-27 17:09:39 +02:00
Daniel Eklöf
0900d01ec9
input: clean up mouse scroll handling
* Allow scrolling on the normal (non-alt) screen, when application is
  grabbing the mouse (when user presses Shift).
* Use term_mouse_grabbed() instead of explicitly checking for
  MOUSE_NONE tracking.
* Remove mouse tracking check from cmd_scrollback_{up,down}. Caller is
  expected to have done the check.
* Don’t scroll down on mouse wheel tilt events.
2021-10-27 17:09:26 +02:00
Daniel Eklöf
3413901678
Merge branch 'noop-key-binding'
Closes #765
2021-10-27 17:08:48 +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
0978b442c6
ci: also build release branches 2021-10-23 16:05:00 +02:00
Daniel Eklöf
3155ab45fe
foot/client: version info: add +/- assertions 2021-10-23 15:40:54 +02:00
Daniel Eklöf
db2529159c
term: bell: simplify if-statement - we don’t need two nested levels 2021-10-22 20:04:23 +02: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
3b57cd45a4
changeloge: style fixes 2021-10-22 19:57:11 +02:00
Daniel Eklöf
2fbc336eb9
term: ignore window title updates if title is un-changed 2021-10-22 18:01:53 +02:00
Daniel Eklöf
de6ab6dca0
Merge branch 'update-input-serial-on-each-keypress'
Closes #753
2021-10-21 16:18:51 +02:00
Daniel Eklöf
d60e303c33
config: error out on invalid grapheme-width-method values 2021-10-21 16:17:41 +02:00
Daniel Eklöf
5b66592a57
render: tab -> spaces 2021-10-20 20:03:15 +02:00
Daniel Eklöf
8691ad8b2e
input: update serial on each key press/release and mouse button
The serial is used when copying/pasting data from the clipboard. Up
until now, we’ve used the serial from the keyboard/mouse enter
events.

This works in most cases, but breaks in the following example:

  $ wl-copy  WLCOPY
  /* Ctrl+Shift+v works fine (pastes "WLCOPY") */

  $ printf "\033]52;c;eHl6\a"
  /* Ctrl+Shift+v pastes "WLCOPY" instead of "xyz" */

Shifting focus away and then back to the foot window, and re-executing
the printf works, suggesting the “enter” serial is no longer valid
after another process(?) has copied something to the clipboard.

Updating the serial on key press/release (and the corresponding mouse
serial on mouse button events) seems to fix this.

I’ve also tested that “normal” copy/paste operations, within the same
foot instance, and between foot and other applications, are still
working. In at least river (wlroots based), and GNOME/mutter.

Closes #753
2021-10-20 19:59:57 +02:00
Daniel Eklöf
174f8870c7
Merge branch 'parse-rgb-strlen' 2021-10-20 19:59:05 +02:00