9140 Commits

Author SHA1 Message Date
Leigh Oliver
e9bc033b88 fix(gtk): fix issue detecting preferred color scheme 2024-12-30 09:17:46 +00:00
Bryan Lee
c011c4622d macos: add generated Nvim files to app bundle 2024-12-30 17:01:48 +08:00
Tristan Partin
057dd3e209 apprt/gtk: move some static CSS to the style.css file
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 23:51:29 -06:00
Mitchell Hashimoto
87bd0bb744 gtk: Install 1024x1024 icon (#4003)
Fixes #3967

Include the 1024x1024 icon in the files installed by `build.zig` when
building the package for Linux with the GTK app runtime.
2024-12-29 21:18:41 -08:00
Arvin Verain
cfeed2b7a2 gtk: Install 1024x1024 icon 2024-12-30 13:05:57 +08:00
Mitchell Hashimoto
d2d6f8b9f4 apprt/gtk: make window-decoration=false with gtk-titlebar=true look better (#3999)
Before this change, there seemed to be some artifacting in the window
corners due to the window border no longer outlining the content
properly. By detecting the situation, we can turn the window border
radius off.
2024-12-29 21:01:01 -08:00
Tristan Partin
31c9a2fe59 apprt/gtk: make window-decoration=false with gtk-titlebar=true look better
Before this change, there seemed to be some artifacting in the window
corners due to the window border no longer outlining the content
properly. By detecting the situation, we can turn the window border
radius off.

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 22:57:48 -06:00
moni-dz
4d983a2083 surface: don't issue mode 2031 DSR reports when colors are changed by a VT sequence 2024-12-30 12:33:05 +08:00
Tristan Partin
0fd65035c5 apprt/gtk: fix the combination of gtk-titlebar=false and gtk-tabs-location=hidden
Fixes: #3178
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 22:12:37 -06:00
Mitchell Hashimoto
3059d9036b macos: Help menu goes to website docs (#3990) 2024-12-29 19:32:13 -08:00
Mitchell Hashimoto
37c5f5a123 macos: Help menu goes to website docs 2024-12-29 19:27:22 -08:00
Mitchell Hashimoto
35eefd4240 Add back quotes for variables in the zsh shell integration to improve compatibility (#3989)
https://github.com/ghostty-org/ghostty/pull/3332#issuecomment-2564526118
According to this comment, using variables without quoting may not work
with `setopt SH_WORD_SPLIT`.

We don't need to quote variables in `[[ ]]` because it works
differently.
2024-12-29 19:26:09 -08:00
Caleb Norton
8607b1f844 macos: correctly save terminal fullscreen style 2024-12-29 21:24:48 -06:00
XiaoYan Li
a9c1a5c73c Add back quotes for variables in the zsh shell integration to improve compatibility
https://github.com/ghostty-org/ghostty/pull/3332#issuecomment-2564526118
According to this comment, using variables without quoting may not work with `setopt SH_WORD_SPLIT`.

We don't need to quote variables in `[[ ]]` because it works differently.
2024-12-30 11:24:39 +08:00
Mitchell Hashimoto
06389b280a macos: restore 0 blur-radius when reloading config (#3954)
If a blur radius config value was previously set but then removed or set
to 0, the new blur radius would not take effect on config reload due to
the early return clause.
2024-12-29 19:17:25 -08:00
Mitchell Hashimoto
cb96ce5dcc apprt/gtk: fix website link in about window (#3958) 2024-12-29 19:17:11 -08:00
Iain H
936d0c0d58 Add unit tests 2024-12-29 21:01:18 -06:00
Tristan Partin
7256ebe13d apprt/gtk: fix website link in about window 2024-12-29 16:47:44 -06:00
Caleb Norton
479e735e7f macos: restore 0 blur-radius when reloading config 2024-12-29 16:25:30 -06:00
Iain H
b3290f6887 Correct the comptime GTK atLeast() function
The comptime path of the GTK `atLeast()` version function fails to take
the preceeding portion of the version into account. For example version
5.1.0 is incorrectly marked as less than 4.16.7 due to the minor version
(1) being less than the minor we are comparing against (16).

For example, building against GTK 4.17.1:
Before: version.atLeast(4,16,2) -> false
After:  version.atLeast(4,16,2) -> true
2024-12-29 16:20:20 -06:00
Daniel Patterson
3e11476d32 Add "top" and "bottom" aliases 2024-12-29 22:05:28 +00:00
Mitchell Hashimoto
d5703a57e7 Allow startup with $HOME read-only (#3949)
Fixes #3202

Two changes to get here:

1. Do not fail startup if crash reporting initialization fails. This is
a non-critical feature and should not prevent the terminal from
starting.

2. Avoid freeing Sentry transport on error path. This segfaults.
Upstream issue will be reported separately.
2024-12-29 14:05:15 -08:00
Mitchell Hashimoto
84a03aa202 Allow startup without $HOME writable
Fixes #3202

Two changes to get here:

1. Do not fail startup if crash reporting initialization fails. This is a
   non-critical feature and should not prevent the terminal from starting.

2. Avoid freeing Sentry transport on error path. This segfaults.
   Upstream issue will be reported separately.
2024-12-29 13:59:39 -08:00
Mitchell Hashimoto
b3925b83ae note source tarball name for 1.0.0 2024-12-29 13:39:11 -08:00
Mitchell Hashimoto
5698358c2f apprt/gtk: style the tab overview when window-theme=ghostty (#3920)
This requires libadwaita main (to be 1.8).

Signed-off-by: Tristan Partin <tristan@partin.io>


https://github.com/user-attachments/assets/057abec5-f85b-4fbb-980c-c58a20e7ddc7
2024-12-29 13:30:44 -08:00
Mitchell Hashimoto
ff6e60be56 Fix typo in list-themes browser (#3919)
This is a small PR to fix a tiny continuity typo I noticed in the
list-themes viewer.

#### Before and After


![image](https://github.com/user-attachments/assets/c95b23bb-01ad-4e82-8f9b-0b8559d006ba)
2024-12-29 13:29:41 -08:00
Mitchell Hashimoto
db0da9a273 Fix typo in config reference: window-decorations -> window-decoration (#3930)
I made the same PR to the autogenerated reference here:
https://github.com/ghostty-org/website/pull/168.
2024-12-29 13:28:44 -08:00
Mitchell Hashimoto
31ee48a355 apprt/gtk: create the tab overview even if gtk-titlebar=false (#3940)
self.isAdwWindow() obscures that check a bit.
2024-12-29 13:27:11 -08:00
Mitchell Hashimoto
b7dba0c5f5 macos: disable auto-updates for local builds (#3943)
The auto-update prompt isn't useful for local (source) builds. Disable
it by default by setting Sparkle's SUEnableAutomaticChecks Info.plist
key to NO (false) for all build configurations.

We then selectively re-enable it by deleting that Info.plist key from
our release workflows. We delete the key instead of setting its value to
YES (true) to give us Sparkle's default behavior of prompting the user
to enable update checks on the second application launch. (YES tells
Sparkle to skip that prompt and silently enable update checks.)

See also: https://sparkle-project.org/documentation/customization/

(This is a safer alternative to #3273.)

Fixes: #3179
2024-12-29 13:26:35 -08:00
Mitchell Hashimoto
3b8a0ed2b8 CI: Update release-tag.yml to include the version in the source archive and prefix within (#3490)
Continuing from #3043 I agree that it seems idiomatic to have an archive
with format <name>-<version>.tar.gz and matching prefix for packaging,
RPM and Debian packaging guides seem to assume this format and the
automated extract tooling assumes it too.

# Testing
I haven't tested running this workflow, and am unsure about the yaml
substitution at lines 105-106

# Breaking changes
This would break existing packaging scripts, not sure how we want to
version it
2024-12-29 13:25:28 -08:00
Mitchell Hashimoto
9c15d8de35 ci: keep old source tarballs as well 2024-12-29 13:24:28 -08:00
Jan200101
2bb3353672 add option to strip build regardless of optimization 2024-12-29 22:06:30 +01:00
Jon Parise
074edd3065 macos: disable auto-updates for local builds
The auto-update prompt isn't useful for local (source) builds. Disable
it by default by setting Sparkle's SUEnableAutomaticChecks Info.plist
key to NO (false) for all build configurations.

We then selectively re-enable it by deleting that Info.plist key from
our release workflows. We delete the key instead of setting its value to
YES (true) to give us Sparkle's default behavior of prompting the user
to enable update checks on the second application launch. (YES tells
Sparkle to skip that prompt and silently enable update checks.)

See also: https://sparkle-project.org/documentation/customization/
2024-12-29 15:48:59 -05:00
Tristan Partin
27ddc2a9b2 apprt/gtk: create the tab overview even if gtk-titlebar=false
self.isAdwWindow() obscures that check a bit.

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 14:45:45 -06:00
521337
7881bb2bf0 Fix typo in config reference: window-decorations -> window-decoration 2024-12-29 20:07:36 +01:00
Tristan Partin
c20fe23946 apprt/gtk: use CSS variables to deduplicate code
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 12:11:26 -06:00
Tristan Partin
2e048c870c apprt/gtk: style the tab overview when window-theme=ghostty
This requires libadwaita main (to be 1.8).

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 12:11:13 -06:00
goproslowyo
329c87a2b4 Merge branch 'main' into list-themes-typo 2024-12-29 17:54:30 +00:00
GoProSlowYo
c8c3fb2900 Fix typo in list-themes browser
Signed-off-by: GoProSlowYo <68455785+goproslowyo@users.noreply.github.com>
2024-12-29 09:39:46 -08:00
Mitchell Hashimoto
6508fec945 Revert "macos: disable auto-updates for local (source) builds (#3273)"
This reverts commit b39850fd8b463f78c6fb450cd7a59e43bdf4b622, reversing
changes made to 64ea3a1a29677ca5f094f8058c40c549bb741bc5.
2024-12-29 09:22:54 -08:00
Mitchell Hashimoto
b39850fd8b macos: disable auto-updates for local (source) builds (#3273)
The auto-update prompt isn't useful for local (source) builds so disable
both update checks and automatic downloads for the Debug and Release
configurations.

Fixes #3179
2024-12-29 09:20:07 -08:00
Mitchell Hashimoto
64ea3a1a29 renderer: track if fg/bg/cursor color is explicitly set by an OSC (#3228)
The renderer must track if the foreground, background, and cursor colors
are explicitly set by an OSC so that changes are not overridden when the
config file is reloaded.

Fixes: https://github.com/ghostty-org/ghostty/issues/2795
2024-12-29 09:05:37 -08:00
Mitchell Hashimoto
65a1c0df80 Redo: Handle execveZ failures in Command.zig tests (#3176)
https://github.com/ghostty-org/ghostty/pull/3130 do over. Github seems
to have lost track of the fork status for the previous work. (perhaps
permissions?). Rebased the PR to main as I can't see why it could
possibly fail.

<details>
  <summary>Previous description</summary>
Bit of a rabbit hole came up while trying to package ghostty for nixos.
zig build test would just hang when run as part of checkPhase in a nix
build. (rather than the nix develop ... command run in CI).

Here's what I understand so far:

/usr/bin/env does not exist in a nix build sandbox. This only works as a
test binary when running in nix develop as it shares its environment
with the user where this compatibility crutch exists.
When executing Command.zig tests that reference /usr/bin/env the
eventual call to fork+execevZ will duplicate the running test process as
execevZ returns rather than dissapearing into the new exec'd process.
Duplicating a test process via fork does unexepected things. zig build
test will hang for <reasons?>. A test binary created via -Demit-test-exe
will run two copies of the test suite producing two different failure
outputs for the same test. (or ~4 copies of the test framework, one
extra for each test that fails this way)

/bin/sh can be used and an alternative test target. It isn't amazing as
it's relying on stdenv creating /bin/sh and it just existing on user
systems. Other alternatives I can think of would require build flags or
some sort of contract with packaging around what binary will exist for
the Command.zig tests.
</details>
2024-12-29 09:05:05 -08:00
Mitchell Hashimoto
25a4a89ee3 config: add title_report (default false) to configure CSI 21 t (#3908) 2024-12-29 08:59:21 -08:00
Mitchell Hashimoto
5be77ded3a config: add title_report (default false) to configure CSI 21 t 2024-12-29 08:56:53 -08:00
Mitchell Hashimoto
02538bed3c fix: scrollback limit not being parsed correctly (#3906)
Change `scrollback-limit` type to a usize rather than a u32 to handle
parsing values larger than 4294967295.

Fixes https://github.com/ghostty-org/ghostty/issues/3900
2024-12-29 08:41:39 -08:00
Adam Wolf
a787e4b8fc fix: scrollback limit not being parsed correctly 2024-12-29 10:29:01 -06:00
Tim Culverhouse
e24f33ae6b surface: handle hyperlinks more reliably
We refresh the link hover state in two (generic) cases

1. When the modifiers change
2. When the cursor changes position

Each of these have additional state qualifiers. Modify the qualifiers
such that we refresh links under the following scenarios:

1. Modifiers change
  - Control is pressed (this is handled in the renderer)
  - Mouse reporting is off
    OR
    Mouse reporting is on AND shift is pressed AND we are NOT reporting
    shift to the terminal

2. Cursor changes position
  - Control is pressed (this is handled in the renderer)
  - We previously were over a link
  - The position changed (or we had no previous position)
  - Mouse reporting is off
    OR
    Mouse reporting is on AND shift is pressed AND we are NOT reporting
    shift to the terminal

This fixes a few issues with the previous implementation:

1. If mouse reporting was on and you were over a link, pressing ctrl
   would enable link hover state. If you moved your mouse, you would
   exit that state. The logic in the keyCallback and the
   cursorPosCallback was not the same. Now, they both check for the same
   set of conditions
2. If mouse reporting was off, you could hold control and move the mouse
   to discover links. If mouse reporting was on, holding control + shift
   would not allow you to discover links. You had to be hovering one
   when you pressed the modifiers. Previously, we only refreshed links
   if we *weren't* reporting the mouse event. Now, we refresh links even
   even if we report a mouse event (ie a mouse motion event with the
   shift modifier pressed *will* hover links and also report events)
2024-12-29 10:04:06 -06:00
Mitchell Hashimoto
64c393716a GTK: add delay before updating the title (#3746)
This pr fixes https://github.com/ghostty-org/ghostty/issues/2503 for
GTK.
The implementation is quite similar to what was done in
https://github.com/ghostty-org/ghostty/pull/2929 for the macOS version.

Before (i was able to reproduce the issue by just invoking `ls`):


https://github.com/user-attachments/assets/011acb1d-de71-46a1-8a14-45e8eb932183



After:


https://github.com/user-attachments/assets/b749cd1c-355e-47de-a976-62d98a56f966
2024-12-29 07:18:56 -08:00
Mitchell Hashimoto
2ab0376d80 misc: add desktop entry fields to support xdg-terminal-exec (#3853)
This PR adds fields to desktop entry that are standardized in [Proposal
for XDG Default Terminal Execution Specification
(xdg-terminal-exec)](https://github.com/Vladimir-csp/xdg-terminal-exec).
2024-12-29 07:16:41 -08:00