8156 Commits

Author SHA1 Message Date
Mitchell Hashimoto
bcefbfd7b4 terminal: move UTF8 encoding to Page and wrap around it 2024-12-03 15:53:12 -08:00
Mitchell Hashimoto
50dc4b75d7 Merge pull request #2878 from ghostty-org/push-wopvxurkxzwk
terminal: PageList.reset has to zero arena memory to avoid reuse
2024-12-03 09:14:25 -05:00
Mitchell Hashimoto
e712314f31 terminal: PageList.reset has to zero arena memory to avoid reuse
Fixes #2877

As the comment in the diff states, we rely on `mmap` to zero our memory.
When we reset we are reusing previously allocated memory so we won't hit
an `mmap`. We need to zero the memory ourselves.

This is pretty slow if there is a lot of memory but in every case except
allocation failures, we expect there to be only a few pages allocated.
2024-12-03 08:58:57 -05:00
Mitchell Hashimoto
91ae0e16f4 Merge pull request #2876 from ghostty-org/push-ptmtrltnsput
Full reset (DEC RIS) preserves tracked pins, reclaims memory
2024-12-02 17:50:21 -05:00
Mitchell Hashimoto
212bd3d5fb terminal: fullReset uses the new screen reset methods 2024-12-02 17:44:07 -05:00
Mitchell Hashimoto
d7fcaefdf3 terminal: PageList.reset 2024-12-02 17:26:19 -05:00
Mitchell Hashimoto
d57d1d2395 terminal: failing tracked pin test on fullReset 2024-12-02 09:39:43 -05:00
Mitchell Hashimoto
2cb334f293 Merge pull request #2864 from s-valent/main
Fix slow scroll in tui apps
2024-12-01 12:30:12 -08:00
Mitchell Hashimoto
84e9aae918 Merge pull request #2849 from andrejdaskalov/dolphin-action
Add ghostty right-click menu item for Plasma users
2024-12-01 12:15:47 -08:00
Valentin Shinkarev
e7bfc17318 fix slow scroll in mouseReport 2024-12-01 22:58:46 +03:00
Mitchell Hashimoto
adaada3744 Merge pull request #2863 from ghostty-org/push-oonwksrnrlzn
macos: trigger fullscreenDidChange on any fullscreen event
2024-12-01 11:44:20 -08:00
Mitchell Hashimoto
f384fd038b macos: trigger fullscreenDidChange on any fullscreen event
Fixes #2840
Related to #2842

This builds on #2842 by missing a key situation: when native fullscreen
is toggled using the menu bar items it doesn't go through our
`FullscreenStyle` machinery so we don't trigger fullscreen change
events.

This commit makes it so that our FullscreenStyle always listens for
native fullscreen change (even in non-native modes) to fire a fullscreen
did change event. This way we can always rely on the event to be fired
when fullscreen changes no matter what.
2024-12-01 11:37:04 -08:00
Andrej Daskalov
3048d71537 added gtk-single-instance argument 2024-12-01 13:16:56 +01:00
Mitchell Hashimoto
3c637a2777 Merge pull request #2858 from ghostty-org/push-ryssxoyktulx
terminal: reset should preserve desired default mode values
2024-11-29 14:48:43 -08:00
Mitchell Hashimoto
853ba9e3c7 terminal: reset should preserve desired default mode values
Fixes #2857

Some terminal modes always reset, but there are others that should be
conditional based on how the terminal's default state is configured.
Primarily from #2857 is the grapheme clustering mode (mode 2027) which
was always resetting to false but should be conditional based on the
the `grapheme-width-method` configuration.
2024-11-29 14:42:01 -08:00
Mitchell Hashimoto
ffb5fff555 Merge pull request #2856 from ghostty-org/push-nmsumxnrsyrq
macos: unicode keybindings must convert to string properly
2024-11-29 14:31:19 -08:00
Mitchell Hashimoto
f98fab132b Merge pull request #2855 from mhartington/powerline-font-addition
font/sprite: add missing chevron powerline fonts
2024-11-29 14:27:36 -08:00
Mitchell Hashimoto
9ac929ef8e macos: unicode keybindings must convert to string properly
Fixes #2848

The proper way to convert a unicode scalar in Swift is to use the
`String` initializer that takes a `UnicodeScalar` as an argument. We
were converting a number to a string before, which is incorrect.
2024-11-29 14:21:46 -08:00
Mike Hartington
df4a6f2161 font/sprite: add missing chevron powerline fonts 2024-11-29 14:26:22 -05:00
Mitchell Hashimoto
cf21689a88 Merge pull request #2853 from ghostty-org/push-zzvowmuxvolu
macos: titlebar tabs can find titlebar container in fullscreen
2024-11-29 10:43:48 -08:00
Mitchell Hashimoto
3bf1fdd7de macos: titlebar tabs can find titlebar container in fullscreen
Fixes #2850

In native fullscreen, the titlebar container is no longer part of our
NSWindow and is instead a separate window called
NSToolbarFullScreenWindow. We now search for this window when we are in
native fullscreen.
2024-11-29 10:35:02 -08:00
Andrej Daskalov
46afa9c4e1 use cli argument instead of cd 2024-11-29 11:51:10 +01:00
Andrej Daskalov
46adc2fb43 Revert "update readme"
This reverts commit adfbf9d7f45f559bec08b261fef8ebaf40d7fd72.
2024-11-29 11:14:36 +01:00
Andrej Daskalov
074312c5ef updated permissions and build process
Removed check for plasma in build.zig, it installs it anyways now
Added executable permissions for ghostty_dolphin.desktop since Plasma
requires them for context menu items
2024-11-29 11:14:17 +01:00
Andrej Daskalov
4be06d1c11 rename file to match package 2024-11-29 00:27:51 +01:00
Andrej Daskalov
d6beec2f99 Merge branch 'ghostty-org:main' into dolphin-action 2024-11-29 00:26:42 +01:00
Andrej Daskalov
adfbf9d7f4 update readme 2024-11-28 23:41:55 +01:00
Andrej Daskalov
62fe3eb652 added right click action for plasma 2024-11-28 23:41:55 +01:00
Mitchell Hashimoto
423f58c24c Merge pull request #2843 from ghostty-org/push-lqkuvlyttoul
config: need to dupe filepath for diagnostics
2024-11-27 08:51:51 -08:00
Mitchell Hashimoto
f55b70912d Merge pull request #2842 from ghostty-org/push-tusxnlsuxrlm
macos: disable background opacity/blur in native fullscreen
2024-11-27 08:47:53 -08:00
Mitchell Hashimoto
5b01cb353d config: need to dupe filepath for diagnostics
Fixes #2800

The source string with the filepath is not guaranteed to exist beyond
the lifetime of the parse operation. We must copy it.
2024-11-27 08:46:47 -08:00
Mitchell Hashimoto
ba4185f6b7 macos: disable background opacity/blur in native fullscreen
See #2840
2024-11-27 08:35:13 -08:00
Mitchell Hashimoto
466d094c18 Merge pull request #2834 from ghostty-org/push-lzkskxmwylpx
apprt/gtk: update app color scheme state
2024-11-26 20:04:32 -08:00
Mitchell Hashimoto
abafb81a1b apprt/gtk: update app color scheme state
Fixes #2781

This commit contains two separate changes but very related:

1. We update the color scheme state of the app on app start. This is
   necessary so that the configuration properly reflects the conditional
   state of the theme at the app level (i.e. the window headerbar).

2. We take ownership of the new config when it changes, matching macOS.
   This ensures that things like our GTK headerbar update when the theme
   changes but more generally whenever any config changes.

And some housekeeping:

- We remove runtime CSS setup from init. We can do it on the first tick
  of `run` instead. This will probably save some CPU cycles especially
  when we're just notifying a single instance to create a new window.

- I moved dbus event setup to `run` as well. We don't need to know these
  events unless we're actually running the app. Similar to the above,
  should save some CPU time on single instance runs.
2024-11-26 19:13:36 -08:00
Mitchell Hashimoto
f12ac32c97 README: clarify config docs location 2024-11-26 16:35:36 -08:00
Mitchell Hashimoto
12fc439ce2 Merge pull request #2833 from ghostty-org/push-wrstnvxstmpx
renderer: set QoS class of the renderer thread on macOS
2024-11-26 15:53:35 -08:00
Mitchell Hashimoto
a482224da8 renderer: set QoS class of the renderer thread on macOS
This sets the macOS QoS class of the renderer thread. Apple
recommends[1] that all threads should have a QoS class set, and there
are many benefits[2] to that, mainly around power management moreso than
performance I'd expect.

In this commit, I start by setting the QoS class of the renderer thread.
By default, the renderer thread is set to user interactive, because it
is a UI thread after all. But under some conditions we downgrade:

  - If the surface is not visible at all (i.e. another window is fully
    covering it or its minimized), we set the QoS class to utility. This
    is lower than the default, previous QoS and should help macOS
    unschedule the workload or move it to a different core.

  - If the surface is visible but not focused, we set the QoS class to
    user initiated. This is lower than user interactive but higher than
    default. The renderer should remain responsive but not consume as
    much time as it would if it was user interactive.

I'm unable to see any noticable difference in anything from these
changes. Unfortunately it doesn't seem like Apple provides good tools to
play around with this.

We should continue to apply QoS classes to our other threads on macOS.

[1]: https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon?preferredLanguage=occl
[2]: https://blog.xoria.org/macos-tips-threading/
2024-11-26 15:43:35 -08:00
Mitchell Hashimoto
3cf563ba5d Merge pull request #2831 from ghostty-org/push-wsstrqtukpzq
config: clone should copy diagnostics
2024-11-26 15:16:45 -08:00
Mitchell Hashimoto
2e939b617e config: clone should copy diagnostics
Fixes #2800
2024-11-26 15:13:32 -08:00
Mitchell Hashimoto
6be17882ff Merge pull request #2830 from ghostty-org/push-rwwztpqwxolk
terminal: eraseChars was checking wide char split boundary on wrong cell
2024-11-26 14:33:00 -08:00
Mitchell Hashimoto
e20b27de84 terminal: eraseChars was checking wide char split boundary on wrong cell
Fixes #2817

The test is pretty explanatory. I also renamed `end` to `count` since I
think this poor naming was the reason for the bug. In `eraseChars`, the
`count` (nee `end`) is the number of cells to erase, not the index of
the last cell to erase.
2024-11-26 14:29:58 -08:00
Mitchell Hashimoto
204c5796a7 Merge pull request #2825 from StratusFearMe21/gtk-startup
Prevent GTK from initializing Vulkan. This improves startup time
2024-11-26 13:24:16 -08:00
Mitchell Hashimoto
e3621e81b7 apprt/gtk: use proper env var for vulkan disable on <= 4.14 2024-11-26 13:18:05 -08:00
Mitchell Hashimoto
c5a711a0e3 Merge pull request #2828 from ghostty-org/push-nqtkytsrpxwv
config: implement `clone` for RepeatableLink
2024-11-26 10:53:36 -08:00
Mitchell Hashimoto
9171cb5c29 config: implement clone for RepeatableLink
Fixes #2819
2024-11-26 10:50:13 -08:00
Isaac Mills
39fbd7db4b Prevent GTK from initializing Vulkan. This improves startup time 2024-11-26 11:10:00 -07:00
Mitchell Hashimoto
e95b2eaace Merge pull request #2821 from gpanders/push-wvnqywotosxu
termio: fixes to kitty color reporting
2024-11-26 09:38:10 -08:00
Gregory Anders
2cbc2833d1 termio: fixes to kitty color reporting
The kitty color report response is an OSC, not a CSI, so change `[` to
`]`. Colors which are unset should be reported with `{key}=`.
2024-11-26 09:01:31 -06:00
Mitchell Hashimoto
518f8b1048 Merge pull request #2797 from kyswtn/application-support-dir
Support loading config from "Application Support" directory on macOS
2024-11-25 16:15:59 -08:00
Mitchell Hashimoto
b9345e8d6a try to abstract bundle ID to a zig file 2024-11-25 16:11:02 -08:00