2615 Commits

Author SHA1 Message Date
Mitchell Hashimoto
115e8130ba Merge pull request #955 from mitchellh/text_action
Text action: input any text you want
2023-11-24 10:37:12 -08:00
Mitchell Hashimoto
6fc0d2d4a8 input: allocate for text bindings 2023-11-24 10:36:43 -08:00
Mitchell Hashimoto
0e2970bdeb config: add string parse, tests 2023-11-24 10:26:55 -08:00
Mitchell Hashimoto
2e02083eef Revert "parse string literal at load time"
This reverts commit 9c3e2b4ddd546e5f0c9d60c25a22bc5ab0be1283.
2023-11-24 10:06:34 -08:00
Guillaume Wenzek
9c3e2b4ddd parse string literal at load time 2023-11-24 18:15:47 +01:00
Guillaume Wenzek
223accb4c8 add "text" action 2023-11-24 17:53:46 +01:00
Mitchell Hashimoto
a67d90710c input: kitty encoding should ignore committed preedit state
Fixes #952
2023-11-24 07:58:31 -08:00
Mitchell Hashimoto
8b09764614 terminal: implement OSC 1 (change icon) and ignore it
Fixes #948

We want to parse it so we can log at a lower level than warn but we
don't want to support this because it isn't very well defined.
2023-11-23 14:58:34 -08:00
Mitchell Hashimoto
78420119df core: clear selection on mouse cursor keys
Fixes #939
2023-11-23 14:46:09 -08:00
Mitchell Hashimoto
b34e0f6ec7 core: do not send repeat/release events if the press consumed a binding
Fixes #943
2023-11-23 08:40:52 -08:00
Chris Marchesi
e0d458004f font/sprite: add Powerline face
This adds the Powerline face to our set of built-in faces, which
represents glyphs that are used to draw Powerline-style shell prompts
and status lines.

Since these are used similar to box-drawing characters, alignment is
important, and this gives us the most control in preventing related
artifacts.

This initial commit is scaffolding and support for the various solid
triangles - additional glyphs will come in other commits.

Fixes #675.
2023-11-23 01:29:12 -08:00
Mitchell Hashimoto
5acaf3279d apprt/gtk: use new resources dir 2023-11-22 22:10:16 -08:00
Mitchell Hashimoto
f25a136ea5 cli: +list-themes 2023-11-22 21:50:16 -08:00
Mitchell Hashimoto
84e71c8c1f config: update themes docs 2023-11-22 21:38:05 -08:00
Mitchell Hashimoto
4dfbb79f8c config: load themes 2023-11-22 21:34:26 -08:00
Mitchell Hashimoto
45a4be6873 core: move resources dir to main global state 2023-11-22 21:12:01 -08:00
Mitchell Hashimoto
0dc5516ac6 config: add "theme" config, track inputs 2023-11-22 21:08:39 -08:00
Mitchell Hashimoto
ec3b570b3e terminal: know about autorepeat mode
Ignore it because xterm does
2023-11-21 18:48:05 -08:00
Mitchell Hashimoto
34cfe0abab xterm audit: DECOM (origin mode) 2023-11-21 18:32:00 -08:00
Mitchell Hashimoto
2ce3db7dc2 apprt/gtk: set default cursor to be "text" (ibeam)
Fixes #933

On startup, we'd set the cursor to "text" but we wouldn't store that as
our cursor so when the mouse was unhidden, we'd go back to "default".
This PR changes it so that on surface startup we set and store the
"text" cursor so as the cursor hides/shows it reverts to the proper
value.
2023-11-21 17:10:44 -08:00
Mitchell Hashimoto
247b92ce07 renderer/opengl: convert Kitty images from RGB to RGBA
Fixes #932

We have to do this for Metal as well (this code is copied from Metal)
since Metal doesnt even allow RGB textures. I couldn't figure out a way
to get the A value to be "255" (byte), it seems to always be set to 1
which gets normalized to 1/255, so lets just manually convert.
2023-11-21 16:56:02 -08:00
Mitchell Hashimoto
44e28e43d3 terminal: fix cursor pos when resizing more rows not at bottom
Fixes #906

This changes our resize behavior when increasing row height.

If the cursor was originally at the bottom of the viewport, existing
scrollback (if it exists) will be "pulled down" from the top,
effectively keeping the cursor at the bottom. This is the behavior
today, prior to this commit.

If the cursor is not at the bottom of the viewport, scrollback will NOT
be "pulled down" and instead blank lines will be added _below_. This is
new behavior.
2023-11-21 11:27:02 -08:00
Mitchell Hashimoto
fd84178cc7 terminal: switching alt/primary screen invalidates Kitty image state 2023-11-21 08:37:41 -08:00
Tim Culverhouse
469c88c0c6 osc: fix OSC4 response
When reporting colors via OSC4, the index must also be reported.
2023-11-21 10:00:14 -06:00
Mitchell Hashimoto
cf8a0bdaec renderer: handle Kitty images where z < 0 for all placements 2023-11-20 21:34:17 -08:00
Mitchell Hashimoto
89fe07271e font: fallback fonts need to deinit their unused deferred faces
Fixes #885

Interestingly, this isn't that big of a leak for whatever reason on
macOS. But on Linux with fontconfig this is a MASSIVE memory leak.
2023-11-20 21:05:01 -08:00
Mitchell Hashimoto
bb8e5b9f76 terminal: handle width=3 by pretending width=2 for now 2023-11-20 20:41:58 -08:00
Mitchell Hashimoto
0430758b60 Merge pull request #923 from vancluever/vancluever-config-gtk-titlebar
apprt/gtk: let GTK titlebar be toggleable
2023-11-20 20:29:47 -08:00
Chris Marchesi
39e3fca210 apprt/gtk: let GTK titlebar be toggleable
This adds the gtk-titlebar option, which allows you to toggle the GTK
titlebar on (default) and off.

Under some circumstances (e.g. tiling WMs with titlebars enabled), one
may wish to disable the GTK titlebar/CSD for aesthetic reasons. This
allows you to do that.

Fixes #920.
2023-11-20 20:07:11 -08:00
Mitchell Hashimoto
3c98c6375a terminal: handle width==3 glyphs by just pretending they're width 2 2023-11-20 19:55:06 -08:00
Mitchell Hashimoto
42c4f52711 font: shaper should not look up U+200D for consistent fonts
Related to #914

U+200D is the zero-width joiner character used for multi-codepoint
Emojis. When faced with a multi-codepoint grapheme, the font shaper must
find a font that provides _all codepoints_ consistently. However, U+200D
isn't meant to be provided by any font. As a result, the font shaper
search ends up iterating over every font looking for a match.
2023-11-20 19:12:37 -08:00
Mitchell Hashimoto
f2c1e18647 apprt/gtk: support IME popups such as Asian language input
Fixes #882

This hooks up all the GTK.IMContext things properly so that we support
switching input methods, popups, etc. This should improve our support
for asian languages, emoji input, etc.
2023-11-20 18:08:23 -08:00
Mitchell Hashimoto
67119e6433 apprt/gtk: disable GTK capturing F10
Fixes #894
2023-11-20 14:16:13 -08:00
Mitchell Hashimoto
db7262a8dd terminal: resize less cols attempts to preserve cursor y
Fixes #906

Previously, when the cursor isn't at the bottom and you resized to less
cols, the cursor would jump to the bottom of the viewport. But if you
resized to more columns it didn't do this. This was jarring. This commit
attempts to keep the cursor at the same place.
2023-11-20 14:00:14 -08:00
Mitchell Hashimoto
9988dedb80 renderr/opengl: stylistic 2023-11-20 09:45:38 -08:00
Mitchell Hashimoto
d1de53ed22 renderer/opengl: correct shader params 2023-11-19 22:52:40 -08:00
Mitchell Hashimoto
a5d71723d5 renderer/opengl: do not need to convert 2023-11-19 22:49:30 -08:00
Mitchell Hashimoto
2a10af90a3 renderer/opengl: draw images 2023-11-19 22:43:39 -08:00
Mitchell Hashimoto
64cacce1cf renderer/opengl: setup image uniforms 2023-11-19 22:33:06 -08:00
Mitchell Hashimoto
76c76ce85e renderer/opengl: upload kitty image textures 2023-11-19 22:08:07 -08:00
Mitchell Hashimoto
553d81afd1 terminal: enable kitty graphics commands on OpenGL 2023-11-19 21:39:30 -08:00
Mitchell Hashimoto
a325ab5712 terminal: remove invalid test 2023-11-19 21:13:22 -08:00
Mitchell Hashimoto
7066fb7bbb terminal: ESC [ 2 J does a scroll and clear if viewport is at a prompt 2023-11-19 21:07:16 -08:00
Mitchell Hashimoto
b5cad7184d terminal: ED handles invalid values 2023-11-19 20:47:04 -08:00
Mitchell Hashimoto
39c2549b1a terminal: add ESC [ 22 J (scroll and clear) 2023-11-19 20:45:57 -08:00
Mitchell Hashimoto
b220179c3a terminal: add "clear" screen scroll mode 2023-11-19 20:39:57 -08:00
Mitchell Hashimoto
542f605d54 terminal: add explicit errorset to scroll screen 2023-11-19 20:39:40 -08:00
Mitchell Hashimoto
eb694574ab config: select all should default to ctrl+shift+a on linux 2023-11-18 11:17:02 -08:00
Mitchell Hashimoto
080789957a Merge pull request #903 from mitchellh/macos-update
Custom Shaders (Metal and OpenGL)
2023-11-17 22:06:38 -08:00
Mitchell Hashimoto
eaf847381a config: clarify runtime reloading of shader stuff 2023-11-17 22:00:33 -08:00