Commit graph

221 commits

Author SHA1 Message Date
Daniel Eklöf
19ec06b999
Merge branch 'reflow-multi-column-composed-characters' into master 2020-09-07 19:41:42 +02:00
Daniel Eklöf
6e4d29ef71
render: change minimum window size from 4x20 -> 1x2 (rows/cols) 2020-09-07 19:34:06 +02:00
Daniel Eklöf
61f950f77a
grid: reflow: calculate width of composed characters correctly
Before this patch, reflow called `wcwidth()` on our magic values for
composed characters.
2020-09-06 19:14:46 +02:00
Daniel Eklöf
f9cbdd3b11
changelog: scrollback indicator did not exist in 1.4(.4)
Thus it’s wrong to say its behavior has changed.
2020-09-06 19:05:17 +02:00
Daniel Eklöf
dd19173989
Merge branch 'improve-handling-of-private-usage-area-characters' into master
Closes #116
2020-09-06 08:28:20 +02:00
Daniel Eklöf
26d37b3305
changelog: output objects received before XDG output manager 2020-09-04 18:08:37 +02:00
Daniel Eklöf
b71016c25d
render: optionally enable heuristics that deal with private usage area chars
Try to detect double-width *glyphs* for single-width *characters*, and
allow them to overflow into the next cell.

This is only done for single-width chars with a glyph width that is at
least 1.5 cells wide, but at most 3 cells.

The feature is gated by the new
‘tweak.allow-overflowing-double-width-glyphs’, and is disabled by
default.

Closes #116
2020-09-03 17:37:44 +02:00
Daniel Eklöf
3309d8d779
changelog: new configuration file location 2020-08-27 20:02:43 +02:00
Daniel Eklöf
32e2173b5d
Merge branch 'scrollback-indicator-positioning' into master
Closes #108
2020-08-27 19:52:47 +02:00
Daniel Eklöf
2762e044aa
changelog: fixed input events from getting mixed with paste data 2020-08-25 18:56:15 +02:00
Daniel Eklöf
cc24c5f2e0
render: scrollback position: only count _used_ scrollback lines
When calculating where in the scrollback history we are, we previously
did this against the total number of scrollback lines. I.e. the
`scrollback.lines` setting in `footrc`.

Now, we count only the used/allocated scrollback lines.

Note that the initial indicator position might still seem to start a
bit high up, if the number of used scrollback lines is low. This is
because we use the *top* of the screen for the current position. Thus,
we'll never be at the bottom (except for the special case when
we're *really* at the bottom).
2020-08-25 18:45:04 +02:00
Craig Barnes
26fccae03d slave: set $COLORTERM environment variable to "truecolor"
This is also done by libvte, alacritty, kitty and several other
terminal emulators as a way to indicate support for 24-bit RGB
colors. It generally also implies support for the xterm 256-color
palette and basic ECMA-48 colors.
2020-08-23 05:33:48 +01:00
Daniel Eklöf
3ddc17937f
input: inhibit mouse events to client when a binding has consumed it
This introduces a new state to a seat's mouse struct, 'consumed'. It
is set on a mouse *press* event that is claimed by a mouse binding.

It is cleared after a mouse *release* event.

While set, *no* mouse motion or button events are sent to the client
application.
2020-08-22 13:35:36 +02:00
Daniel Eklöf
f85cf47b65
extract: only emit newlines if followed by non-empty cells
Closes #97
2020-08-20 19:22:13 +02:00
Daniel Eklöf
c0ddb78f4a
Merge branch 'selection-exclude-trailing-empty-cells' into master 2020-08-19 06:26:29 +02:00
Daniel Eklöf
1a2c6e183f
Merge branch 'update-grid-on-default-fg-bg-change' into master
Closes #94
2020-08-19 06:25:17 +02:00
Daniel Eklöf
fe95b6a013
changelog: trailing empty cells are not highlighted in mouse selections 2020-08-18 18:03:41 +02:00
Daniel Eklöf
3e1636c013
osc: dirty grids on *all* color modifying sequences
We only updated the grid for OSC 4 - Set color <idx>. But we did *not*
do it for 104 (reset color <idx>), 10 - set default foreground, 11 -
set default background, 110 - reset default foreground, or 111 - reset
default background.
2020-08-18 17:54:11 +02:00
Daniel Eklöf
dfcc4192ce
changelog: xtsave/xtrestore 2020-08-16 17:03:58 +02:00
Daniel Eklöf
5ab09cdc90
changelog: add ordoviz to contributors 2020-08-16 09:14:15 +02:00
Lennard Hofmann
df576d9a8e Fix typos 2020-08-15 23:29:38 +02:00
Daniel Eklöf
b07a43c20e
changelog: remove duplicate entries (caused by bad merge) 2020-08-14 22:54:42 +02:00
Daniel Eklöf
8f99a032c9
changelog: new mouse actions 2020-08-14 07:38:56 +02:00
Daniel Eklöf
1dd142aeab
changelog: click count in mouse bindings 2020-08-14 07:38:55 +02:00
Daniel Eklöf
8ed3f66ad9
changelog: modifier support in mouse bindings 2020-08-14 07:38:55 +02:00
Daniel Eklöf
f647816ff7
changelog: click count in mouse bindings 2020-08-14 07:36:53 +02:00
Daniel Eklöf
704d182c88
changelog: modifier support in mouse bindings 2020-08-13 18:47:20 +02:00
Daniel Eklöf
17070a0d54
config: add tweak.render-timer option
This can be set to 'none' (the default), 'osd', 'log' or 'both'.

When 'osd' is enabled, we'll render the frame rendering time to a
sub-surface after each frame.

When 'log' is enabled, the frame rendering time is logged on stderr.
2020-08-13 18:35:17 +02:00
Daniel Eklöf
a4b18ba832
changelog: cancelling -> canceling 2020-08-13 06:33:10 +02:00
Daniel Eklöf
fc154fcf3a
Merge branch 'selection-inversion' into master 2020-08-13 06:23:49 +02:00
Daniel Eklöf
8808dd28f2
selection: adjust start point when the selection changes direction
Without this, the initial cell will always be selected, regardless of
how the selection is moved to the left or right.

With this patch, the initial cell will only be selected while the
selection is being made in the original direction. Changing direction
of the selection moves the start point to next/previous character.
2020-08-12 19:42:21 +02:00
Daniel Eklöf
5e36ebdef8
config: make selection foreground/background colors configurable
The default is still to inverse the regular foreground/background
colors.

If the user sets *both* of the new options, selection-foreground and
selection-background, those colors will *always* be used for selected
cells, instead of inverting the regular foreground/background colors.
2020-08-12 19:41:50 +02:00
Daniel Eklöf
b01431e38f
search: fix viewport not moving if we tried to move it past the scrollback start
If the match was somewhere near the scrollback beginning, and if the
entire scrollback hadn't yet been filled, we ended up trying to move
the viewport past the beginning of the scrollback, which we then
adjusted in the wrong direction, causing the viewport to not move at
all.

Besides being a bad user experience, since the new match wasn't
visible, foot would also crash if you manually scrolled up to the
match.
2020-08-12 19:40:40 +02:00
Daniel Eklöf
ecb2695822
changelog: add birger to 'contributers' for the upcoming release 2020-08-08 10:23:26 +02:00
Daniel Eklöf
0a9aa2dd32
changelog: 'of' -> 'in' 2020-08-07 20:08:30 +02:00
Daniel Eklöf
721ca80abe
input: motion: do selection update even if cursor is outside the grid
Previously, the selection was only updated when the mouse cursor was
inside the grid. This makes it difficult to e.g. do large selections
fast, since you often end up moving the cursor outside the grid, or
outside the terminal window even.

Now, we update the selection regardless of *where* the cursor is. This
is done by bounding the row/col we pass to 'selection_update()' to the
grid, while still setting the seat's row/col to -1 when the cursor is
outside the grid, to ensure the xcursor etc are set correctly.

Care must also be taken to *not* pass any motion events to a mouse
grabbing client, when the cursor is outside the grid.

Closes #70.
2020-08-07 19:58:56 +02:00
Daniel Eklöf
158722b642
input: fix col/row calculation when cursor is in the top or left margin
This fixes an issue where the col/row were incorrectly set to 0
instead of -1, when the mouse cursor was inside the grid margins.

This resulted in e.g. the mouse cursor having the wrong shape, and
foot incorrectly handling mouse events as if they were inside the
grid.
2020-08-07 19:51:34 +02:00
Daniel Eklöf
019b6bc039
fix printf-format errors in 32-bit builds 2020-08-06 23:20:46 +02:00
Daniel Eklöf
c07d14e1c0
grid: reflow: don't insert <width> spacer cells for *every* empty cell
Only do it for the last, non-empty cell.
2020-08-04 18:07:54 +02:00
Daniel Eklöf
d929862245
config: move cursor.hide-when-typing to mouse.hide-when-typing 2020-08-04 07:33:15 +02:00
Daniel Eklöf
36468b0406
config: add scrollback.multiplier option
This option is used to multiply the mouse scroll amount for mouse and
trackpad based scrollback scrolling.

Closes #54.
2020-08-03 20:08:39 +02:00
Daniel Eklöf
2ee9830e2a
changelog: add craigbarnes to 'contributors' for the upcoming release 2020-08-03 08:17:26 +02:00
Daniel Eklöf
5e26d3ef47
server/client: use $WAYLAND_DISPLAY instead of $XDG_SESSION_ID in default socket path
Foot is a Wayland client and cannot be run outside of a Wayland
session. As such, it makes more sense to use $WAYLAND_SESSION instead
of $XDG_SESSION_ID in the default socket path since this makes it
clearer which Wayland session we belong to.

Closes #55.
2020-08-02 13:10:31 +02:00
Daniel Eklöf
d4ee9be4d7
config: add 'hide-when-typing'
When enabled, the mouse cursor is hidden when the user types in the
terminal. It is un-hidden when the user moves the mouse, or when the
window loses keyboard focus.
2020-07-31 17:09:06 +02:00
Daniel Eklöf
b00dfcf7b6
config: configuration errors are no longer fatal
Instead of refusing to start foot on configuration errors, we start
and print a user-notification.
2020-07-31 17:07:14 +02:00
Daniel Eklöf
639a61abd8
config: add 'pipe-selected' key binding
This works just like pipe-visible and pipe-scrollback, but pipes the
user-selected text, if any, to the external tool.

Closes #51
2020-07-31 17:04:30 +02:00
Daniel Eklöf
7767041c2c
config: tokenize key bindings' pipe command when loading the configuration
This allows us to detect syntax errors early on, and is also more
efficient since we don't have to re-tokenize the command line every
time the binding is executed.
2020-07-30 18:53:51 +02:00
Daniel Eklöf
6a186cb356
changelog: use <section>.<option> syntax 2020-07-30 18:50:01 +02:00
Daniel Eklöf
906c8f4d16
changelog: update scrollback indicator entry to reflect moved options 2020-07-29 17:50:19 +02:00
Daniel Eklöf
86e7cb04c4
main: add --check-config command line option 2020-07-29 17:48:22 +02:00