Commit graph

2976 commits

Author SHA1 Message Date
Daniel Eklöf
e9e3e076fc
changelog: update contributors 2020-11-21 22:05:24 +01:00
Daniel Eklöf
ea64fe4223
Merge branch 'footclient-getopt-fix' 2020-11-21 22:03:14 +01:00
Craig Barnes
e813883367 client: add missing options to getopt_long(3) optstring argument 2020-11-21 20:34:49 +00:00
Daniel Eklöf
0d61a49e47
client-protocol: codespell: stati -> static 2020-11-21 20:48:31 +01:00
Daniel Eklöf
f4de500a18
server: avoid doing unaligned struct accesses 2020-11-21 20:47:17 +01:00
Daniel Eklöf
997c6a4ae3
client: we added argv lengths twice 2020-11-21 20:46:08 +01:00
Daniel Eklöf
0b3a84bd9c
client: avoid doing a signed vs. unsigned comparison 2020-11-21 20:29:47 +01:00
Daniel Eklöf
f2a88d6071
server: verify strings are NULL terminated 2020-11-21 20:27:13 +01:00
Daniel Eklöf
fc81f413c0
client/server: simplify setup packet handling
Instead of writing (and logging errors for) every parameter, one at a
time, send all fixed size data in a single struct, followed by all the
variable length data.
2020-11-21 20:21:18 +01:00
Daniel Eklöf
3640164917
Merge branch 'dpi-unaware' 2020-11-19 19:26:06 +01:00
Daniel Eklöf
c65fcacf43
terminal: use 96, not 75, for DPI when being DPI unaware 2020-11-19 19:25:48 +01:00
Daniel Eklöf
8e7658a135
config: add ‘dpi-aware’ option, defaulting to enabled
When disabled, foot no longers uses outputs’ DPI to scale the
font. Instead, it uses the outputs’ scaling factor.

That is, instead of appending “:dpi=123” to the fontconfig string,
modify the “:pixelsize” or “:size” attribute.

Closes #206
2020-11-19 19:25:48 +01:00
Daniel Eklöf
587fce68fa
Merge branch 'require-space-to-overflow-double-width-glyph' 2020-11-19 19:24:37 +01:00
Daniel Eklöf
774dd75542
render: allow-overflow: require a space in the next cell
When checking if we should allow a single-width character double-width
glyph to overflow into the next cell, require the next cell to either
be empty, or contain a space.

Closes #203
2020-11-19 19:24:15 +01:00
Daniel Eklöf
2de60eafb7
keymap: fix alt+return combos
All alt+return combos mapped to the same escape sequence as alt+return
itself.

With this patch, alt+<mod(s)>+return map to a standard ‘CSI 27;x;13~’
sequence.
2020-11-19 19:22:52 +01:00
Daniel Eklöf
121b488e74
keymap: use same lookup table for Tab and ISO_Left_Tab
With XKB, Shift+Tab maps to XKB_KEY_ISO_Left_Tab, not
XKB_Key_Tab. Previously, we had two different lookup tables for the
two.

The tab table was correctly populated, while the ISO-left tab
wasn’t. As a result, all Shift+Tab combos (except Shift+Tab itself)
was wrong, and resulted in the same escape sequence as Shift+Tab.

Fix by using the same table for both tab and ISO-left tab.

Closes #210
2020-11-19 19:22:48 +01:00
Daniel Eklöf
7554895674
Merge branch 'dim-and-brighten-via-hsl' 2020-11-17 18:52:21 +01:00
Daniel Eklöf
690cf0ab54
render: dim/brighten: multiply/divide instead of add/subtract 2020-11-15 21:04:21 +01:00
Daniel Eklöf
2b8e2b3506
render: dim and brighten colors by adjusting luminance
To do this, we need to convert our RGB to HSL, adjust luminance, and
then convert back to RGB.
2020-11-15 20:05:01 +01:00
Daniel Eklöf
e0297daa1f
hsl: add our own implementations of rgb-to-hsl and hsl-to-rgb
* New function: rgb_to_hsl()
* New function: hsl_to_rgb()
* Replace XTerm’s hls_to_rgb() with our own, hsl_to_rgb().
* Ensure hue/lum/sat values are within range before calling
  hsl_to_rgb()

Note that sixels’ use the following primary hues:

*  blue:  0°
*  red:   120
*  green: 240°

While “standard” HSL uses:

*  red:   0°
*  green: 120°
*  blue:  240°

Thus, we need to adjust the sixel’s hue value before calling
hsl_to_rgb().
2020-11-15 19:45:33 +01:00
Daniel Eklöf
8e779b356e
render: remove debug output 2020-11-15 19:40:25 +01:00
Daniel Eklöf
134e1d307c
Merge branch 'bold-is-bright'
Closes #199
2020-11-14 22:09:51 +01:00
Daniel Eklöf
11ea06c71d
install: simplify sentence 2020-11-14 14:12:22 +01:00
Daniel Eklöf
a6fc5d64e8
pkgbuild: remove -fno-plt 2020-11-14 14:00:57 +01:00
Daniel Eklöf
fb32d339a7
install: remove -fno-plt from recommended CFLAGS
It appears to _worsen_ the performance...
2020-11-14 13:57:56 +01:00
Daniel Eklöf
7c110d75ba
changelog: bold-text-in-bright 2020-11-14 11:23:01 +01:00
Daniel Eklöf
ee5607b9eb
render: brighten color of bold text if default.bold-text-in-bright=yes
Closes #199
2020-11-14 11:22:35 +01:00
Daniel Eklöf
60a1ebac2b
doc: foot.ini: document default.bold-text-in-bright 2020-11-14 11:22:23 +01:00
Daniel Eklöf
34abf665e2
config: add default.bold-text-in-bright option 2020-11-14 11:22:19 +01:00
Daniel Eklöf
c764a45ee0
changelog: move pipe-* actions from ‘fixed’ to ‘added’ 2020-11-13 23:26:03 +01:00
Daniel Eklöf
b931ba3bda
readme: don’t uppercase titles 2020-11-13 17:50:47 +01:00
Daniel Eklöf
5b43477cc2
config: enable allow-overflowing-double-width-glyphs by default 2020-11-13 17:50:16 +01:00
Daniel Eklöf
4b645376fd
render: improve sixel rendering performance
Up until now, we’ve always re-rendered the entire image (the part of
it that is visible at least), *every* time we render a frame.

This is not really needed. In many cases, the cells covered by the
image hasn’t been touched.

Rewrite the sixel rendering code to only render the part of the sixel
image that covers dirty cells.

This is done on a per-row basis. I.e. Each *row* of the image that
covers at least one dirty cell is re-rendered. For this to work, we
now also dirty all cells covered by the image when we emit the image.

Finally, for this to work, the sixels need to be rendered *before* we
do the normal grid render pass (since that will clear all dirty bits).
2020-11-13 16:54:40 +01:00
Daniel Eklöf
08e4d2c238
changelog: fix link to readme#keypad 2020-11-12 18:20:54 +01:00
Daniel Eklöf
3df34055d2
Merge branch 'keypad-numlock-override'
Closes #194
2020-11-12 18:19:33 +01:00
Daniel Eklöf
e2a7c7f243
pkgbuild: append ‘foot-terminfo’ dependency in package_foot-git()
This ensures that:

* Main dependencies are still checked before the package is built
* Makepkg doesn’t complain about missing dependency foot-terminfo
2020-11-12 08:02:57 +01:00
Daniel Eklöf
0ec69eb846
pkgbuild: make foot-terminfo a hard dependency for foot 2020-11-11 21:07:17 +01:00
Daniel Eklöf
121adbe825
Merge branch 'preempt-render-scheduling-on-configure-events'
Closes #190
2020-11-11 19:04:13 +01:00
Daniel Eklöf
2af65471a6
readme/doc:foot.1: document the (new) keypad behavior 2020-11-11 18:37:28 +01:00
Daniel Eklöf
deb2c2db6d
input: enforce ‘numerical’ keypad mode when Num Lock override is enabled
When num lock override has been enabled via “CSI?1035h” (the default),
keypad is always considered to be in ‘numerical’ mode.

This affects how keypad keys are translated to escape sequences when
Num Lock is active.

The keypad has four modes:

* Num Lock off, numerical mode
* Num Lock off, application mode
* Num Lock on, numerical mode
* Num Lock on, application mode

The keymap is identical for numerical and application mode when Num
Lock is off, meaning the keypad effectively has three different modes.

In XTerm, numerical and application mode _can_ be the same, **if** the
‘numLock’ resource is set to true (the default). It is only when
‘numLock’ is false that the application mode is actually used.

This patch changes foot to do the same. We don’t expose an option, but
do implement “CSI ? 1035”.

Closes #194
2020-11-11 18:28:37 +01:00
Daniel Eklöf
bdaf20ba71
input: track num lock state 2020-11-11 18:28:13 +01:00
Daniel Eklöf
2382d6b448
csi: implement “CSI ? 1035” - toggle Num Lock override
This adds a num_lock_modifier state to the terminal, and hooks up
“CSI?1035h/l” to toggle it.
2020-11-11 18:26:47 +01:00
Daniel Eklöf
75bd780f02
input: use XKB_MOD_NAME_* macros instead of hard-coded strings 2020-11-11 18:25:54 +01:00
Daniel Eklöf
02ee570c27
wayland: preempt render scheduling in ‘configure’ events
A configure event must be “committed”. In case of resizing, that means
rendering a new frame and committing that surface.

render_resize() will resize the grid and *schedule* a render
refresh. However, if one is already pending, the refresh will take a
very (relatively) long time - until the next frame callback is
received.

This poses a problem when the window is hidden, since in this case,
the frame callback *never* comes. This in turn means we fail to commit
a new surface in response to the ‘configure’ event. And that means the
compositor needs to wait for a transaction timeout before continuing.

The end effect is very slow and jerky window resizing when a hidden
foot window is being resized.

This can happen in tiled compositors, like Sway, where a window can be
tabbed (and thus invisible), but still resized when its container is
resized.

Closes #190
2020-11-10 19:20:35 +01:00
Daniel Eklöf
c9de30e2bc
client: let getopt_long(3) print error messages
Closes #191
2020-11-10 19:04:20 +01:00
Daniel Eklöf
3fa3c58c8b
input: ignore keymap if we don’t recognize its format 2020-11-09 19:59:48 +01:00
Daniel Eklöf
85220a5543
wayland: use wl_*_release() instead of wl_*_destroy()
This lets the compositor free up internal state.
2020-11-09 19:59:45 +01:00
Daniel Eklöf
71e98d5b8f
Merge branch 'jeromenerf-patch-1'
Closes #185
2020-11-07 11:54:00 +01:00
jeromenerf
dbac3e4e4a Fix documentation snippets
- zsh doesn't like "export var+=value", make it two steps
- meson was complaining with "ERROR: Must specify at least one directory name.", so add the relative "../.."
2020-11-06 21:30:39 +01:00
Daniel Eklöf
6f28c16023
Merge branch 'releases/1.5' 2020-11-06 20:21:33 +01:00