Commit graph

5268 commits

Author SHA1 Message Date
Daniel Eklöf
ef54b7f2e5
Merge branch 'improve-shellscript' 2022-02-04 21:30:04 +01:00
Daniel Eklöf
e97e873b9e
box-drawing: LIGHT ARC: check for sqrt() failures
Closes #914
2022-02-04 18:15:35 +01:00
Daniel Eklöf
a5f8ed1b78
Merge branch 'sixel-repeat-edge-cases' 2022-02-04 18:14:32 +01:00
Daniel Eklöf
58bbbb0a31
sixel: revert to default state when an invalid DECGRI character is received 2022-02-04 18:14:25 +01:00
Daniel Eklöf
9e8d553a21
sixel: DECGRI (repeat) with a count of 0 should emit a single sixel 2022-02-04 18:14:24 +01:00
Daniel Eklöf
9150507209
sixel: resize: truncate instead of failing, when new size exceeds max size
If the size we’re trying to set exceeds the configured max size,
truncate instead of failing.
2022-02-04 18:14:24 +01:00
Daniel Eklöf
8ca0eaa94c
main: reset signal mask and signal handlers at startup
This ensures processes spawned by us (e.g. the shell, new terminal
instances etc) don’t inherit a flawed signal mask, or having signals
unknowingly ignored.

Closes #854
2022-02-04 18:13:21 +01:00
Pranjal Kole
a9bbbda1c7 generate-version: exit early if argc is not 3
Print usage information and exit if the number of arguments is not 3.
2022-02-04 19:10:16 +05:30
Daniel Eklöf
63b12d4cdc
Merge branch 'fix-bash-completions' 2022-02-03 19:33:51 +01:00
Nicolai Dagestad
0f49a8a033 Fix bash completion for lists of short options 2022-02-03 18:49:54 +01:00
Daniel Eklöf
af4ae65349
wayland: remove workaround for sway-1.5 bug - slow resizing of hidden windows
In Sway-1.5, sway waits for configure ACKs from hidden windows when
views are being resized. I.e. if you have e.g. a stacked view, with
one or more windows currently not visible, and you resize the stack,
then sway will emit configure events to all windows, and then wait for
ACKs before rendering the resized view.

The problem with this is that sway also does **not** call frame
callbacks on hidden windows. So if we have rendered one frame, and
thus registered a frame callback, we’ll never render any more frames
until the window becomes visible again. Ergo, if you resize the view
interactively, only the first resize actually happens. After that, all
hidden views are “stuck”, causing ACK timeouts.

We worked around this in foot by preempting the frame
callback. I.e. destroying it, and rendering the frame anyway.

This has fixed in sway-1.6, and thus we can remove the workaround.
2022-02-03 18:01:13 +01:00
Daniel Eklöf
69e2bff8c8
extract: ensure line-based selections are terminated with a newline
Closes #869
2022-02-03 17:58:25 +01:00
Daniel Eklöf
5ee902551a
selection: don’t quote file URIs on the alt screen
Closes #379
2022-02-02 21:17:01 +01:00
Daniel Eklöf
ab6b1b3679
install: remove reference to the Arch AUR package 2022-02-02 21:08:22 +01:00
grtcdr
fc99379a0c
docs: remove arch linux from install.md now that it's in the official repositories 2022-02-02 20:13:38 +01:00
Daniel Eklöf
04c091cf44
Merge branch 'alt-tab'
Closes #900
2022-02-02 19:22:20 +01:00
Daniel Eklöf
66801e4f33
keymap: alt-tab (C-tab) now emits “ESC tab” by default
In our default mode (roughly equivalent to XTerm’s modifyOtherKeys=1),
alt-tab now emits ESC-tab instead of CSI 27;3;9~.

When modifyOtherKeys=2 is enabled (CSI >4;2m), alt-tab emits the “old”
CSI 27 escape.

This better matches XTerm’s behavior.

Note that other alt-tab combos are ambiguous in XTerm, and thus they
are left unchanged here (i.e. we keep emitting CSI 27 escapes for
them).

Closes #900
2022-02-01 18:37:50 +01:00
Daniel Eklöf
94f0b7283a
Merge branch 'search-last-query' 2022-01-29 17:50:56 +01:00
Daniel Eklöf
eb33a0529f
changelog: search for last searched-for string 2022-01-29 17:50:43 +01:00
Daniel Eklöf
1537fd02bd
doc: foot.1: describe how to search for the previous search string 2022-01-29 17:50:43 +01:00
Daniel Eklöf
749d4c0766
doc: foot.1: shortcuts: mention that there are more actions than listed here 2022-01-29 17:50:43 +01:00
Daniel Eklöf
739e7d76b4
search: remember last searched-for string between searches
Regardless of how we exit search mode (commit or cancel), the search
string is remembered.

The next time we enter search mode, the last searched-for string will
be used when searching for the next/prev match (ctrl+r, ctrl+s), and
the search query is empty.
2022-01-29 17:50:42 +01:00
Daniel Eklöf
22266e384b
search: refactor: add add_wchars(), make search_add_chars() use it
search_add_chars() converts the incoming UTF-8 string into a wide-char
string, and then calls add_wchars().

add_wchars() inserts the string into the search buffer, at the current
cursor position.
2022-01-29 17:50:42 +01:00
Daniel Eklöf
2ab569169e
Merge branch 'xcursor-size' 2022-01-29 17:48:16 +01:00
Pranjal Kole
d9cd1749e0 wayland: use strtol() to parse xcursor_size
sscanf is not very robust. For example,
$ XCURSOR_SIZE="36asdf" foot
works without any errors, and xcursor_size is parsed as 36.
2022-01-29 17:52:06 +05:30
Daniel Eklöf
7930652b30
Merge branch 'xcursor-getenv-fix' 2022-01-29 13:06:13 +01:00
Pranjal Kole
fa396cdc33 wayland: use getenv() according to spec
From the NOTES section of getenv(3):
 The string pointed to by the return value of getenv() may be statically
 allocated, and can be modified by a subsequent call to getenv()...

So, previously xcursor_theme could be modified by libc to contain
xcursor_size. This has been fixed by getting xcursor_theme after
computing the value of xcursor_size.
2022-01-29 16:18:19 +05:30
Daniel Eklöf
2cc0a450b4
doc: foot.1: add missing ‘*’ 2022-01-27 18:54:48 +01:00
Daniel Eklöf
034f4171a4
doc: foot.1: use tab for indentation 2022-01-27 18:54:38 +01:00
Daniel Eklöf
49a2f4a9e6
Merge branch 'document-ansi-colors' 2022-01-27 18:49:54 +01:00
Daniel Eklöf
c7836bcd90
readme: add URL mode to the list of keyboard shortcuts 2022-01-27 18:49:04 +01:00
Daniel Eklöf
0c363b83bf
readme: add the new XF86{Copy,Paste} keyboard shortcuts 2022-01-27 18:48:51 +01:00
Daniel Eklöf
90b906d159
doc: foot.1: add URL mode bindings to the list of default keyboard shortcuts 2022-01-27 18:45:53 +01:00
Daniel Eklöf
701d5fe5a4
doc: foot.1: add “enter URL mode” shortcut 2022-01-27 18:45:41 +01:00
Daniel Eklöf
ef855aa132
doc: foot.1: add the new XF86{Copy,Paste} key bindings 2022-01-27 18:45:22 +01:00
Daniel Eklöf
27017cf0b3
Merge branch 'support-copy-paste-keybindings-by-default' 2022-01-25 21:41:07 +01:00
Mark Stosberg
6d76bb0f32 config: support Copy and Paste keycodes by default
These work as expected and don't interfere with anything else.

They are useful on the increasing number of keyboards with custom
firmware. The keycodes enable using the same key combination
for terminals as other apps.

For example: by holding down a layer-switching key with a thumb, the
Copy and Paste key codes can be assigned to the C and V keys on a secondary
layer, making for a natural universal copy/paste key combination.
2022-01-25 15:27:58 -05:00
Daniel Eklöf
9095cb105e
Merge branch 'typo' 2022-01-25 20:47:16 +01:00
Daniel Eklöf
0406ccd4f8
Merge branch 'remove-deprecated-bell-from-ini' 2022-01-25 20:42:15 +01:00
Felix Lechner
f5bb885978 Fix typo in manual page for foot.ini(5). 2022-01-20 10:41:27 -08:00
Mark Stosberg
7885a7ab17 foot.ini: remove deprecated "bell" option.
The "bell" option has been deprecated for 9 months.

The shipped `foot.ini` is used as a reference for setting up
new configs and deprecated options should not be used in new configs.
Further, the "bell=" option is no longer documented in `man foot.ini`,
creating confusion.
2022-01-17 13:14:24 -05:00
Mark Stosberg
0777d3b35f doc: document the 8 ANSI escape codes. 2022-01-15 14:36:45 -05: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
Daniel Eklöf
179ab08161
Merge branch 'clock-gettime' 2022-01-15 17:08:42 +01:00
Pranjal Kole
0da19a81bc replace gettimeofday with clock_gettime
POSIX.1-2008 has marked gettimeofday(2) as obsolete, recommending the
use of clock_gettime(2) instead.

CLOCK_MONOTONIC has been used instead of CLOCK_REALTIME because it is
unaffected by manual changes in the system clock. This makes it better
for our purposes, namely, measuring the difference between two points in
time.

tv_sec has been casted to long in most places since POSIX does not
define the actual type of time_t.
2022-01-15 21:35:45 +05:30
Daniel Eklöf
0d649408a0
Merge branch 'clock' 2022-01-14 16:17:21 +01:00
Érico Nogueira
5af65d897c terminal: use CLOCK_MONOTONIC instead of literal.
CLOCK_MONOTONIC isn't guaranteed to have the same value on all
platforms, and this makes the code more readable.
2022-01-14 11:39:27 -03:00
Daniel Eklöf
b292e735bb
dcs: decrqss: refactor: append_sgr_attr_n() is now a proper function 2022-01-14 14:09:28 +01:00
Daniel Eklöf
f048e08f10
Merge branch 'decrqss'
Closes #798
2022-01-14 13:52:58 +01:00
Daniel Eklöf
7243b094b7
dcs: decrqss: add note about Ps in the reply 2022-01-14 13:52:42 +01:00