Commit Graph

6901 Commits (0d089388ecec433661dafad00e25aa83eff77d0a)

Author SHA1 Message Date
Łukasz Niemier 0d089388ec
chore: add mailmap to unify duplicated authors 2024-08-15 16:22:00 +02:00
Mitchell Hashimoto 93c377c6a1
Merge pull request #2094 from jcollie/gtk-url-overlay-pretty
gtk: prettify the url overlays
2024-08-14 11:12:37 -07:00
Jeffrey C. Ollie 414fdc0214
gtk: prettify the url overlays 2024-08-13 14:21:28 -05:00
Mitchell Hashimoto 3e0a5d3a73
Merge pull request #2091 from gpanders/patch-1
config: fix typo
2024-08-12 09:46:13 -07:00
Gregory Anders 59f259d7e4
config: fix typo
Disabling vsync reduces input latency, so this should say "minimize"
rather than "maximize".
2024-08-12 09:24:03 -05:00
Mitchell Hashimoto 60f6576770
Merge pull request #2088 from rockorager/main
fix(surface): account for padding in mouse pixel reports
2024-08-11 18:04:21 -07:00
Mitchell Hashimoto 59de7d8239
Merge pull request #2087 from qwerasd205/murica
spelling: normalize grey -> gray
2024-08-11 18:03:22 -07:00
Mitchell Hashimoto 23de1fb4ea
Merge pull request #2085 from Syphdias/option-to-limit-procs
Add Config Option to Limit Number of Processes
2024-08-11 15:57:13 -07:00
Tim Culverhouse 97db055b54 fix(surface): account for padding in mouse pixel reports
Padding was accounted for in cell reports, but not pixel reports. Update
inspector to report the pixel coordinates the terminal reports.
2024-08-11 17:47:21 -05:00
Mitchell Hashimoto ed49670d2f
font: remove broken test (on purpose) due to improvements in shaping 2024-08-11 15:46:08 -07:00
Mitchell Hashimoto 468a8e9ed4
Merge pull request #2086 from ghostty-org/split
font/shaper: split text runs on common bad ligature pairs
2024-08-11 15:40:22 -07:00
Mitchell Hashimoto a158a1d45f
os: unify memory/processes cgroup limiting func 2024-08-11 15:37:54 -07:00
Qwerasd 10b8ca3c69 spelling: normalize grey -> gray 2024-08-11 18:31:01 -04:00
Mitchell Hashimoto e385e0f9d0
font/shaper: split text runs on common bad ligature pairs
Fixes #2081

Many fonts have a bad ligature for "fl", "fi", or "st". We previously
maintained a list of such fonts in quirks.zig. However, these are so
common that it was suggested we do something more systematic and this
commit is that.

This commit changes our text run splitting algorithm to always split on
`fl`, `fi`, and `st`. This will cause some more runs for well behaved
fonts but the combination of those characters is rare enough and our
caching algorithm is good enough that it should be minimal overhead.

This commit renders our existing quirks fonts obsolete but I kept that
logic around so we can add to it if/when we find other quirky font
behaviors.
2024-08-11 15:26:36 -07:00
Mitchell Hashimoto de9ea2d735
font: add test for fl lig 2024-08-11 15:04:56 -07:00
Christian Kugler ba41f142ed
Add Config Option to Limit Number of Processes
To protect your system and ghostty from misbehaving programs that launch
too many processes for the system to handle (e.g. like a fork bomb),
this implements an option to limit the number of processes that can be
started in a surface.

A fork bomb for example or other misbehaving program would then only
take down one surface and not the entire system.

Side node:
If I am right in issue #2084, this feature does not actually work on a
per surface basis but on all surfaces. If this is the case, it could
probably be fixed together. Chances are, that I am wrong though 😉

Further improvements that could be done:
- unify way to set cgroup attributes
- set sane default: 10% of system max?
2024-08-11 23:37:57 +02:00
Mitchell Hashimoto 956b097786
Merge pull request #2083 from ghostty-org/macos-resize
macOS: resize overlay improvements
2024-08-11 11:41:56 -07:00
Mitchell Hashimoto affe12d68c
ios: add focusInstant field to surface 2024-08-11 11:10:35 -07:00
Mitchell Hashimoto 2e0e8897e7
macos: avoid showing overlay if gained focus recently 2024-08-11 11:07:07 -07:00
Mitchell Hashimoto 975fc86866
Merge pull request #2076 from cryptocode/cc-pagelist-arrayhashmap
Improve resize performance by switching to AutoArrayHashMapUnmanaged
2024-08-11 10:36:19 -07:00
Mitchell Hashimoto 087b663787
Merge pull request #2082 from jcollie/gtk-resize-overlay-improvements
gtk: resize overlay improvements
2024-08-11 10:36:07 -07:00
Mitchell Hashimoto 4680c87c8b
macos: pause resize overlay until 500ms passes 2024-08-11 10:34:53 -07:00
Jeffrey C. Ollie f4bdf8d3a1
gtk: resize overlay improvements
* runtime changing of `resize-overlay` now works on GTK
* shorten function names in ResizeOverlay
* improve documentation
2024-08-11 12:23:43 -05:00
Mitchell Hashimoto 1cbeb264c9
Merge pull request #2077 from ghostty-org/resize-mac
macos: implement resize overlay
2024-08-10 21:23:25 -07:00
Mitchell Hashimoto 448382b49d
macos: add iOS field necessary 2024-08-10 21:08:59 -07:00
Mitchell Hashimoto 0e2012617e
macos: truncate tail of resize view 2024-08-10 21:01:29 -07:00
Mitchell Hashimoto bac258e6d2
renderer: fix underflow possibility in padding calculation 2024-08-10 21:00:04 -07:00
Mitchell Hashimoto 1c982278f3
macos: use dedicated overlay view for resize overlay 2024-08-10 20:56:21 -07:00
Mitchell Hashimoto 9cf247bb3e
macos: implement resize overlay
Implements the resize overlay configurations completely.
2024-08-10 20:17:33 -07:00
Mitchell Hashimoto 451cf69398
Merge pull request #2071 from jcollie/resize-overlay
gtk: add resize overlay
2024-08-10 15:07:09 -07:00
Mitchell Hashimoto 1c88377e97
apprt/gtk: small style tweaks for resize overlay 2024-08-10 15:06:44 -07:00
cryptocode 2e88ff1d05
Improve resize performance by switching to AutoArrayHashMapUnmanaged
I noticed that the HashMap iterator showed up prominently in Instruments when quickly
resizing Ghostty.

I think this is related to the [tombstone issue](https://github.com/ziglang/zig/issues/17851),
where the `next()` function has to skip unused meta-nodes.

In that same issue, Andrew is suggesting that the non-array hashmap might get deleted from the
standard library.

After switching to `AutoArrayHashMapUnmanaged`, iteration barely shows up anymore.

Deletion from the pin list should also be fast as swapRemove is used (order does not need to be preserved).

Question is if insertion performance is negatively affected, though I'm not seeing anything obvious.
Still, checking this PR for any perf regressions might be a good idea.

If this pans out, there are more places where this switch might be beneficial.
2024-08-10 23:54:04 +02:00
Mitchell Hashimoto 1ef3c79ba8
config: quit-after-last-window-closed should be true on Linux
This was the behavior on GTK prior to #2021 and I think it makes sense
as a default there.
2024-08-10 14:38:20 -07:00
Jeffrey C. Ollie 4dbd2fb639
move resize overlay code to a new file to keep the file size down 2024-08-10 14:59:05 -05:00
Jeffrey C. Ollie b55b3de05b
resize overlay: move all resize overlay code and data into a struct
Keepin´ the code clean by gathering all of the resize overlay
related data and code into a struct.
2024-08-10 14:44:28 -05:00
Jeffrey C. Ollie 8b919df1f5
resize-overlay: change default and delay → duration
Change the default to `after-first` and change `resize-overlay-delay` →
`resize-overlay-duration`.
2024-08-10 13:22:20 -05:00
Mitchell Hashimoto edea928117
Merge pull request #2057 from jcollie/xtwinops
[DRAFT] Implement the XTWINOPS (CSI t) control sequences that "make sense".
2024-08-10 11:21:49 -07:00
Mitchell Hashimoto 61ad6d10de
apprt/embedded: store title directly instead of get_title cb 2024-08-10 11:15:53 -07:00
Mitchell Hashimoto ccf62a4960
stylistic nitpicks 2024-08-10 11:03:56 -07:00
Mitchell Hashimoto aa5aad4344
Merge pull request #2075 from ghostty-org/extend
window-padding-color improvements
2024-08-10 10:51:49 -07:00
Mitchell Hashimoto 9db89dbf2c
config: make window-padding-color=extend default again 2024-08-10 10:41:36 -07:00
Mitchell Hashimoto f7f8c655df
renderer: remove alt-screen extend-always 2024-08-10 10:39:10 -07:00
Mitchell Hashimoto 9f06e74353
config: add window-padding-color=extend-always to force always 2024-08-10 10:34:12 -07:00
Mitchell Hashimoto 40b3d4c72e
config: clarify padding color default 2024-08-10 10:27:59 -07:00
Mitchell Hashimoto aeb3b64110
do not extend background for window-padding-color if powerline 2024-08-10 10:20:08 -07:00
Jeffrey C. Ollie 301826dfff
gtk: add resize overlay
This adds a transient overlay that shows the size of the surface
while you are resizing the window or the surfaces.
2024-08-09 22:58:33 -05:00
Mitchell Hashimoto 6cb85efc50
Merge pull request #2070 from ghostty-org/kitty-shm
terminal/kitty: shared memory size may be larger than expected for pages
2024-08-09 20:55:40 -07:00
Mitchell Hashimoto b368702a9d
terminal/kitty: shared memory size may be larger than expected for pages
The shared memory segment size must be a multiple of page size. This
means that it may be larger than our expected image size. In this case,
we trim the padding at the end.
2024-08-09 20:33:39 -07:00
Mitchell Hashimoto be88815a76
Merge pull request #2068 from ghostty-org/metal-fix
metal: cell bg pipeline no longer has vertex data, needs no vertex desc
2024-08-09 15:23:29 -07:00
Mitchell Hashimoto 861fe0379b
metal: cell bg pipeline no longer has vertex data, needs no vertex desc
This happened to work in releases somehow but Xcode debug builds would
catch this as an assertion. Our cell bg pipeline now uses the "full
screen vertex shader" which takes no parameters, so we don't need a
vertex descriptor.
2024-08-09 15:10:58 -07:00