8616 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Mitchell Hashimoto
d359231e5c Add default Nix overlay (#3847)
Adding an overlay allows to easily change the version of `ghostty`
provided by `nixpkgs`:

```nix
pkgs = import nixpkgs {
  inherit system;
  overlays = [ ghostty.overlays.default ];
}
```

Then, all references to `pkgs.ghostty` would refer to this project's
package definition.
2024-12-29 07:14:12 -08:00
Sebastian Estrella
16f81353cc Add default Nix overlay 2024-12-29 07:12:59 -08:00
Mitchell Hashimoto
9bef43fd99 Fix markdown formatting for (blank) in docs (#3850)
I realize I'm rolling the dice by opening a PR without a pre-approved
issue, but I'll take that chance. Feel free to close if this isn't
desired; no hard feelings!

Currently, the docs for `cursor-style-blink` have two backticks side by
side in the docs, which end up rendering as actual backticks rather than
a code-formatted blank space:

<img width="721" alt="Screenshot 2024-12-28 at 11 19 02 PM"
src="https://github.com/user-attachments/assets/295369d6-624f-4efe-a7ea-495c9fd216bb"
/>

This change puts a space between the backticks so they render as a
code-formatted space.
2024-12-29 07:11:32 -08:00
Mitchell Hashimoto
56681741cb chore: Add milestone workflow to add milestone to merged PR and fixed issues (#3849)
## Description:

This workflow will do the following things:

- Add milestone to a merged PR automatically, example [action
detail](https://github.com/nushell/nushell/actions/runs/12530004607/job/34946134565)
- Add milestone to a closed issue that has a merged PR fix (if any),
example [action
detail](https://github.com/nushell/nushell/actions/runs/12515661380/job/34913564683)

If there is no opened milestone the action will stop. If there are
multiple opened milestones, the action will bind to the one whose due
date is closest to the PR merged date and fall back to the first one
sorted by the milestone created date.

We have use it in Nushell for a while, such as
[v0.101.0](https://github.com/nushell/nushell/issues?q=is%3Aclosed+milestone%3Av0.101.0)

Don't merge it if it's not a good fit
2024-12-29 07:08:57 -08:00
hustcer
c84fefc4ea chore: Add milestone workflow to add milestone to merged PR and fixed Issues 2024-12-29 07:06:47 -08:00
Mitchell Hashimoto
574407aacd gtk/x11: link directly to libX11, no more dlopen (#3857)
As a follow-up to #3477 and #3748, this eliminates the use of dlopen to
access `libX11` functions by directly linking `libX11` if X11 is
enabled. This should also fix problems with systems like NixOS and Void
Linux that have reported problems using Ghostty on X11 when using the
distribution packages.
2024-12-29 07:02:28 -08:00
Mitchell Hashimoto
579de8e491 apprt: add window-titlebar-{background,foreground} config options (#3806)
This gives people finer-grained control over the coloring of their
titlebars. Currently only implemented for GTK.
2024-12-29 06:24:58 -08:00
Mitchell Hashimoto
6ca64bc410 cgroup: change suffix to .scope (#3844)
I think it's more consistent with the name convention used by systemd
and other terminal emulators (e.g. gnome-terminal).

See also: https://systemd.io/CGROUP_DELEGATION/#systemds-unit-types
2024-12-29 06:24:21 -08:00
Maciej Bartczak
2b245c965c Invalidate the timer when the surface is destroyed 2024-12-29 09:27:59 +01:00
Tristan Partin
a92ed15baa apprt: add window-titlebar-{background,foreground} config options
This gives people finer-grained control over the coloring of their
window titlebars. Currently only implemented for GTK.

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-29 01:17:47 -06:00
Jeffrey C. Ollie
b6e45d49a3 gtk/x11: link directly to libX11, no more dlopen 2024-12-29 01:15:01 -06:00
Misaki Kasumi
5c2fb580d0 misc: add desktop entry fields to support xdg-terminal-exec 2024-12-29 13:58:12 +08:00
Richard Feldman
1ca25d3b5e Fix markdown formatting for (blank) in docs
It currently has two backticks side by side, which end up rendering as actual backticks rather than a code-formatted blank space.
2024-12-28 23:19:52 -05:00