4505 Commits

Author SHA1 Message Date
Mitchell Hashimoto
470b57f194 os: no mouse interval on ios 2024-01-14 14:48:56 -08:00
Mitchell Hashimoto
8c8838542f use Apple logging subsystem on all Darwin targets 2024-01-14 14:48:39 -08:00
Mitchell Hashimoto
87f5d6f6a8 apprt/embedded: do not depend on macOS APIs on non-macOS 2024-01-14 14:31:14 -08:00
Mitchell Hashimoto
722348f552 build: build iOS lib into XCFramework 2024-01-13 21:39:08 -08:00
Mitchell Hashimoto
3360a008cd build: build produces a broken object file for iOS
This gets `zig build -Dtarget=aarch64-ios` working. By "working" I mean
it produces an object file without compiler errors. However, the object
file certainly isn't useful since it uses a number of features that will
not work in the iOS sandbox.

This is just an experiment more than anything to see how hard it would be to
get libghostty working within iOS to render a terminal. Note iOS doesn't
support ptys so this wouldn't be a true on-device terminal. The
challenge right now is to just get a terminal rendering (not usable).
2024-01-13 21:38:58 -08:00
Mitchell Hashimoto
f61eaea4d0 build: update our macOS checks to check for macOS specifically 2024-01-13 15:29:12 -08:00
Mitchell Hashimoto
bfe3c356f0 build: move our configuration out of globals 2024-01-13 15:18:45 -08:00
Mitchell Hashimoto
d4b53cac06 build: move more options to BuildConfig 2024-01-13 15:11:28 -08:00
Mitchell Hashimoto
dfa55988d6 build: use BuildConfig struct 2024-01-13 15:08:37 -08:00
Mitchell Hashimoto
adb7958f61 remove tracy usage from all files 2024-01-13 15:06:08 -08:00
Mitchell Hashimoto
29717269ca build: remove tracy completely 2024-01-13 14:30:56 -08:00
Atanas Pepechkov
ee1366a0a8 add sudo wrapper as optional shell integration feature 2024-01-13 18:56:21 +02:00
Mitchell Hashimoto
81b9a6b623 config: rename window-append-new-tab to window-new-tab-position 2024-01-12 09:50:47 -08:00
Thorsten Ball
2aa1874f94 gtk: append new tabs at the end if config is set
This adds a new config option: `window-append-new-tabs` (please: if you
have a better name, let me know). If this is set to true, then new GTK
tabs aren't added after the current tab, but after at the end.
2024-01-12 17:35:15 +01:00
Mitchell Hashimoto
50a119d300 Selection: add adjust method, unit test it, swap for adjustments 2024-01-11 22:14:40 -08:00
Qwerasd
3f3703deb6 Fixed accidentally consuming ALL shift+<key> releases 😅 2024-01-11 21:58:19 -05:00
Qwerasd
8cf3b6bef3 Shift+keys selection: Fixed up/down logic, added page up/down, home, & end. 2024-01-11 21:19:41 -05:00
Qwerasd
e0867801a5 Added use of shift+arrow keys to expand current selection 2024-01-11 20:58:12 -05:00
widberg
de71e992ec Use WINDIR instead of hardcoding C:\Windows 2024-01-11 11:57:40 -08:00
Mitchell Hashimoto
411c48af51 cli/list-colors: use unstable sort, sort in-place on arraylist 2024-01-11 07:56:25 -08:00
Jeffrey C. Ollie
5258554135 sort output from +list-colors 2024-01-11 00:30:48 -06:00
Mitchell Hashimoto
02c0ceab11 cli: list-colors uses new generated rgb 2024-01-10 20:43:22 -08:00
Mitchell Hashimoto
5216b4cfe9 build: remove generate_rgb_names 2024-01-10 20:40:21 -08:00
Mitchell Hashimoto
cf8763561d terminal: use comptime generated X11 lookup table from rgb.txt 2024-01-10 20:36:47 -08:00
Jeffrey C. Ollie
bc1544a3f0 add ability to specify RGB colors as names from the X11 rgb name list 2024-01-10 20:26:59 -08:00
Gregory Anders
d059c57440 gtk: use modifier state from GTK key event on X11
On X11 gdk_device_get_modifier_state does not correctly return the
modifier state, while the modifier state passed to the key callback
does. On Wayland, the situation is exactly reversed.

Therefore on X11 we use the mods provided by the key callback and on
Wayland we continue to get the modifier state from the device.

`App.modifier_state_from_xkb` is removed since we can lift the
conditional out of the function call (we would need to make a second,
redundant check for the presence of `x11_xkb` otherwise).
2024-01-10 16:26:53 -06:00
Mitchell Hashimoto
507a55ba3f Merge pull request #1253 from jcollie/enquiry
implement enquiry/answerback
2024-01-10 09:29:10 -08:00
Mitchell Hashimoto
60b1b0a8de termio/exec: assign arena last so we capture allocations 2024-01-10 09:26:10 -08:00
Mitchell Hashimoto
4b6c2f86a7 termio/exec: remove a bunch of state that is duplicated on StreamHandler
A lot of the state that we put on Exec is just there to copy to
StreamHandler, but we already have it in DerivedConfig. I think this
whole copy copy copy is just legacy cruft since termio.Exec is one of
the older parts of the source code.

This rearchitects the Exec struct to act more like Surface and Renderer
where it stores its derived config. This lets us avoid a few extra
allocations and removes a LOT of struct member noise from termio.Exec.

For pointer lifetimes, the memory allocated is now owned by
DerivedConfig. When changeConfig is called, its the only time BOTH are
still alive, so we can safely swap pointers and deinit without having to
duplicate across threads. This is the same as renderer/surface.
2024-01-10 09:15:55 -08:00
Gregory Anders
36a5965eea x11: fix modifier mask for Super key
Mod4 is "Super" in X11, verified via the `xmodmap` command:

    xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

    shift       Shift_L (0x32),  Shift_R (0x3e)
    lock        Caps_Lock (0x42)
    control     Control_L (0x25),  Caps_Lock (0x42),  Control_R (0x69)
    mod1        Alt_L (0x85),  Alt_R (0x86),  Alt_L (0xcc),  Meta_L (0xcd)
    mod2        Num_Lock (0x4d)
    mod3        ISO_Level5_Shift (0xcb)
    mod4        Super_L (0x40),  Super_R (0x6c),  Super_L (0xce),  Hyper_L (0xcf)
    mod5        ISO_Level3_Shift (0x5c)
2024-01-10 10:15:39 -06:00
Mitchell Hashimoto
fc30fdfb2b renderer: do not free new configuration on change
Fixes #1271
2024-01-09 21:05:27 -08:00
Mitchell Hashimoto
44544f29b2 macos: support Display P3 colorspace through configuration
Fixes #1214

This introduces the `window-colorspace` configuration which allows
configuring the colorspace to use for windows on macOS. The default is
sRGB (same as before) but this can also be set to `display-p3`.
2024-01-09 20:47:07 -08:00
Mitchell Hashimoto
cba27e26cf input: manage application keypad state with mode 1035
Fixes #1099

We previously applied application keypad mode logic (`ESC=` or mode 66)
whenever it was active. However, from looking at the behavior of other
terminals (xterm and foot) it appears this isn't correct.

For xterm, application keypad mode only applies unconditionally if the
keyboard mode is VT220 (`-kt vt220`). For modern terminals, application
keypad mode is only applied if mode 1035 is disabled.

Mode 1035 is the "ignore numpad state with keypad mode" mode. It
defaults to true on terminal startup. If this is true, keypads are
always encoded in numerical mode. If this is false, the numlock state
will be respected.
2024-01-09 11:57:09 -08:00
Mitchell Hashimoto
dcc3c17738 input: missing kp_begin encoding entry 2024-01-09 10:52:49 -08:00
Mitchell Hashimoto
96d33fef20 custom shader animation can be set to "always" to always remain active
Fixes #1225

The `custom-shader-animation` configuration can now be set to "always"
which keeps animation active even if the terminal is unfocused.
2024-01-09 09:21:15 -08:00
Jeffrey C. Ollie
3c2dfd4a84 change name of config entry and variables, add lock for safety during config update 2024-01-09 10:07:32 -06:00
Tristan Partin
d2813655e5 fix: update code to compile with 0.12.0-dev.2075+f5978181e 2024-01-08 20:08:10 -06:00
Mitchell Hashimoto
cfdf6cf312 Merge pull request #1259 from rockorager/kitty-associated
input: never report associated text on key release
2024-01-08 08:13:30 -08:00
Mitchell Hashimoto
baf8e04287 input: add unit test for no associated text on release 2024-01-08 08:12:54 -08:00
Mitchell Hashimoto
bc80073ffd core: add emoji fallback on macOS after built-in font
This doesn't fix any issues, but it slightly improves performance since
we'll try our text font first which is most likely to hit most input.
2024-01-08 08:01:17 -08:00
Mitchell Hashimoto
ab606c6cfd font: autoitalic should only apply to text presentation
Fixes #1256
2024-01-08 07:57:42 -08:00
Tim Culverhouse
e90a6ee19f input: never report associated text on key release
Associated text should only be reported when it was generated from the
key event. To my knowledge, there are no release events which produce
text. This now matches kitty reporting for release events.
2024-01-08 07:32:18 -06:00
Mitchell Hashimoto
2082751a65 font/shaper: prevent underflow in multi-cell lig detection
Fixes #1251

See the comment for details.
2024-01-07 22:16:11 -08:00
Jeffrey C. Ollie
342b5e9d06 implement enquiry 2024-01-07 23:50:58 -06:00
Mitchell Hashimoto
ba45e4120e Merge pull request #1248 from der-teufel-programming/main
WIP: Update Ghostty to use the new build system API
2024-01-07 15:34:38 -08:00
Mitchell Hashimoto
62e5234da4 renderer: for constrained cells, offset was being doubled
This helps better preserve the centerline for constrained glyphs
2024-01-07 15:02:56 -08:00
Mitchell Hashimoto
f7c558e733 renderer: constrain dingbats category to cell size
Dingbats are generally symbolic glyphs that frequently overflow the
cell. Their defined codepoint width is "1" so they take one cell but
very often overflow to the next.

This extends the previously created logic for Nerd Font symbols such
that when a dingbat is next to whitespace, we allow it to use the full
size, but when a dingbat is next to an occupied cell we constrain it to
the cell size.
2024-01-07 14:54:15 -08:00
Mitchell Hashimoto
162ebaa8fa Merge pull request #1246 from rbino/linux-xft-dpi
linux: consider Xft.dpi to scale the content
2024-01-07 12:29:13 -08:00
Mitchell Hashimoto
b62c78b61d apprt/gtk: stylistic changes 2024-01-07 12:25:56 -08:00
Mitchell Hashimoto
a8a42c8658 fix macos zig build test failures 2024-01-07 12:10:48 -08:00