Commit graph

3762 commits

Author SHA1 Message Date
Daniel Eklöf
fd87bca102
grid: enable rows to have ‘extra’ data associated with them
This patch adds an ‘extra’ member to the row struct. It is a pointer
to a struct containing extra data to be associated with this row.

Initially, this struct contains a list of URL ranges. These
define (OSC-8) URLs on this row.

The ‘extra’ data is allocated on-demand. I.e. the pointer is NULL by
default; it is *not* allocated by grid_row_alloc().
2021-02-21 20:14:51 +01:00
Daniel Eklöf
3339915d20
url-mode: store URL in UTF-8, not UTF-32
The only time the URL is actually in UTF-32 is when we’re collecting
it (auto-detecting it) from the grid, since cells store their
character(s) in UTF-32.

Everything *after* that prefers the URL in UTF-8. So, do the
conversion while collecting the URL.

This patch also changes the URL activation code to strip the
‘file://user@host/’ prefix from file URIs that refer to files
on the *local* computer.
2021-02-21 20:14:51 +01:00
Daniel Eklöf
0bda60aacc
Merge branch 'restore-signals-when-spawning-subprocess'
Closes #366
2021-02-21 20:00:31 +01:00
Daniel Eklöf
dd5c31657e
spawn/slave: restore signal mask after fork
slave: no need to restore signal handlers; they are automatically
restored as long as they are not SIG_IGN (which they never are in
foot).

spawn(): restore signal mask after fork. This fixes an issue where a
terminal spawned with ctrl+shift+n did not terminate when its shell
exited.

Closes #366
2021-02-21 19:59:50 +01:00
Daniel Eklöf
34f89fbe72
Merge branch 'refactor-subsurface-creation' 2021-02-17 21:51:31 +01:00
Daniel Eklöf
7b5a43bcbd
wayland: csd_instantiate(): remove TODO
The sub-surfaces are working just fine without the initial commit.
2021-02-17 21:48:39 +01:00
Daniel Eklöf
5c8579043d
wayland: drop ‘_surface’ suffix from subsurface struct instances 2021-02-17 21:48:08 +01:00
Daniel Eklöf
438853a2d8
render-timer: use wayl_win_subsurface_new/destroy() 2021-02-17 21:48:08 +01:00
Daniel Eklöf
c8324943de
scrollback-indicator: use wayl_win_subsurface_new/destroy() 2021-02-17 21:48:08 +01:00
Daniel Eklöf
e049124f6d
search: use wayl_win_subsurface_new/destroy() 2021-02-17 21:48:07 +01:00
Daniel Eklöf
587f04f2e1
csd: use wayl_win_subsurface_new/destroy() 2021-02-17 21:48:07 +01:00
Daniel Eklöf
9d362158e3
url-mode: convert struct wl_url to use wayl_win_subsurface_new() 2021-02-17 21:48:07 +01:00
Daniel Eklöf
bb4d9a5fd3
wayland: add wayl_win_subsurface_new() and wayl_win_subsurface_destroy()
These are utility functions to create a Wayland subsurface associated
with the window.
2021-02-17 21:47:57 +01:00
Daniel Eklöf
8658ab4bed
csi: ‘CSI 13 ; 2 t’ reply is now (0,0)
Foot previously responded with window local coordinates.

But, XTerm responds with screen *absolute* coordinates. This isn’t
possible under Wayland, thus we now report (0,0) instead. Same as we
do for ‘CSI 13 ; 0 t’.
2021-02-16 14:31:46 +01:00
Daniel Eklöf
4ff07a0d18
install: add libnotify and xdg-utils as optional dependencies 2021-02-14 12:10:38 +01:00
Daniel Eklöf
f689584734
Merge branch 'notifications-are-inhibited-while-window-has-keyboard-focus'
Closes #328
2021-02-14 11:57:23 +01:00
Daniel Eklöf
d92d0a60d0
doc: foot.ini: notifications are inhibited while we’re focused
Closes #328
2021-02-14 11:22:07 +01:00
Daniel Eklöf
689a4cc741
Merge branch 'working-dir-command-line-option'
Closes #347
2021-02-14 11:17:08 +01:00
Daniel Eklöf
4c1846f11b
Merge branch 'url-hint-letters'
Closes #355
2021-02-13 19:13:46 +01:00
Daniel Eklöf
0b1af321d9
readme: mention that the key sequence alphabet can be configured 2021-02-13 11:45:54 +01:00
Daniel Eklöf
4118d23267
doc: foot.1: mention that the key sequence alphabet can be configured 2021-02-13 11:45:38 +01:00
Daniel Eklöf
c7006661f5
url-mode: use ‘jump-label-letters’ as the alphabet for key sequences
Instead of hard coding the alphabet to “sadfjklewcmpgh”, use the
letters from ‘jump-label-letters’.

Closes #355
2021-02-13 11:43:28 +01:00
Daniel Eklöf
d29ec4fd18
doc: foot.ini.5: document jump-label-letters 2021-02-13 11:43:02 +01:00
Daniel Eklöf
fe8e6f6cdb
foot.ini: add default value of jump-label-letters 2021-02-13 11:42:51 +01:00
Daniel Eklöf
7bcab01068
config: add jump-label-letters option 2021-02-13 11:42:40 +01:00
Daniel Eklöf
94266b99d7
config: refactor: add str_to_wchars(), use it when parsing word-delimiters 2021-02-13 11:42:21 +01:00
Daniel Eklöf
b09606e343
url-mode: do case insensitive comparison when matching key sequence 2021-02-13 11:41:04 +01:00
Daniel Eklöf
5b0ebee290
client: -D,--working-directory: check path exists and is a directory 2021-02-13 10:48:58 +01:00
Daniel Eklöf
f896f12967
main: -D,--working-directory: check path exists and is a directory 2021-02-13 10:48:31 +01:00
Daniel Eklöf
37c4917e8e
changelog: -D,--working-directory=DIR 2021-02-12 21:42:53 +01:00
Daniel Eklöf
fc070dbdf1
completions: fish: add -D,--working-directory 2021-02-12 21:42:53 +01:00
Daniel Eklöf
60e67b9c21
completions: zsh: add -D,--working-directory 2021-02-12 21:42:53 +01:00
Daniel Eklöf
0de3340d36
doc: footclient.1: add -D,--working-directory=DIR 2021-02-12 21:42:53 +01:00
Daniel Eklöf
38b138bb14
doc: foot.1: add -D,--working-directory=DIR 2021-02-12 21:42:53 +01:00
Daniel Eklöf
a2020ad6e8
doc: foot.1: add missing short option to --login-shell 2021-02-12 21:42:53 +01:00
Daniel Eklöf
19868c9c8d
main/client: add -D,--working-directory=DIR
This overrides the CWD the slave process chdir()’s into before
exec:ing the client application.
2021-02-12 21:42:53 +01:00
Daniel Eklöf
64a60d12f0
server: send exit-code -1 when we fail to instantiate a new terminal 2021-02-12 21:42:53 +01:00
Daniel Eklöf
2a99c5a093
user-notification: add new function ‘user_notification_add()’ 2021-02-12 21:42:53 +01:00
Daniel Eklöf
df1ed1c8cf
Merge branch 'releases/1.6' 2021-02-12 21:41:53 +01:00
Daniel Eklöf
dcd4f1ca79
meson/pkgbuild: bump version to 1.6.4 2021-02-12 21:27:47 +01:00
Daniel Eklöf
c18e459757
changelog: prepare for 1.6.4 2021-02-12 21:27:15 +01:00
Daniel Eklöf
299904e987
selection: don’t strip formatting C0 control characters in bracketed paste mode
It’s ok to let the receiving end handle formatting C0 control
characters in bracketed paste mode.

In fact, we *must* let them through. Otherwise it is impossible to
paste e.g. tabs into editors and similar applications.
2021-02-12 20:58:37 +01:00
Daniel Eklöf
669544eb0d
Merge branch 'dont-strip-formatting-chars-when-pasting-in-bracketed-paste-mode' 2021-02-12 20:55:48 +01:00
Daniel Eklöf
0da766e505
selection: don’t strip formatting C0 control characters in bracketed paste mode
It’s ok to let the receiving end handle formatting C0 control
characters in bracketed paste mode.

In fact, we *must* let them through. Otherwise it is impossible to
paste e.g. tabs into editors and similar applications.
2021-02-12 15:59:07 +01:00
Daniel Eklöf
caede90544
changelog: use standard signals for SIGCHLD 2021-02-12 10:58:58 +01:00
Daniel Eklöf
036a77194b
config: selection-target: space-optimize the static ‘value’ array 2021-02-12 10:56:38 +01:00
Daniel Eklöf
416e8e7e58
doc: foot.ini: selection-target=none|primary|clipboard|both 2021-02-12 10:56:34 +01:00
Daniel Eklöf
c0bff58d8d
changelog: selection-target=none|primary|clipboard|both 2021-02-12 10:56:28 +01:00
Daniel Eklöf
9db9a0d225
config: add ‘none’ as a possible value for ‘selection-target’
When ‘selection-target’ is set to ‘none’, selecting text does not copy
the text to _any_ clipboard.

This patch also refactors the value parsing to be data driven.
2021-02-12 10:55:50 +01:00
Daniel Eklöf
76e8d3f483
selection: copy selected text to the target configured by ‘selection-target’
Closes #288
2021-02-12 10:55:40 +01:00