8854 Commits

Author SHA1 Message Date
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
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
sin-ack
5e14b8e501 font/freetype: Downgrade pixfmt conversion log to debug
This is an expected occurrence with bitmap glyphs and causes unnecessary
spam when using the terminal with one.
2024-12-29 04:56:17 +00:00
sin-ack
1a6d9590a2 font/freetype: Add test for crisp bitmap font rendering
Now we can be certain that bitmap fonts stay crisp. :^)
2024-12-29 04:55:29 +00: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
Mitchell Hashimoto
c8950d376a Use premultiplied alpha for renderer clearColor (#3347)
Fixes #3324

---

I haven't tested it on Linux yet, but I believe it has the similar
problem and could be fixed by this PR as well.
2024-12-28 19:39:10 -08:00
XiaoYan Li
28bbd526f2 Fix the typing error when building on Linux
Co-authored-by: Gareth Widlansky <101901964+gerblesh@users.noreply.github.com>
2024-12-28 19:37:24 -08:00
Xiaoyan Li
2993d12de7 Use premultiplied alpha for renderer clearColor
Fixes #3324
2024-12-28 19:37:24 -08:00
Misaki Kasumi
02ca5bedac cgroup: change suffix to .scope 2024-12-29 11:25:45 +08:00
Mitchell Hashimoto
b50e087581 Add always in confirm-close-surface config option (#3700)
Fixes #3648
2024-12-28 19:22:47 -08:00
Mohammadi, Erfan
85fc49b22c confirm-close-surface option can be set to always to always require confirmation
Fixes #3648
The confirm-close-surface configuration can now be set to always
ensuring a confirmation dialog is shown before closing a surface, even
if shell integration indicates no running processes.
2024-12-28 19:16:36 -08:00
Mitchell Hashimoto
9fc1e4e91a ci: our GTK tests were installing Cachix twice 2024-12-28 18:53:13 -08:00
Mitchell Hashimoto
a2c446cb73 Add default keybinding cmd+backspace=esc:w for macOS (#3679)
regarding https://github.com/ghostty-org/ghostty/issues/3646
2024-12-28 18:46:40 -08:00
Mitchell Hashimoto
1783ec922d Update iTerm2 colorschemes (#3824)
Upstream revision:
08df2e8a72
2024-12-28 18:45:12 -08:00
Mitchell Hashimoto
b8a75c24a6 Update the pre-approved issue template 2024-12-28 18:37:17 -08:00
sin-ack
ea8fe9a4b0 font/freetype: Enable bitmap glyphs for non-color faces
This allows for crisp bitmap font rendering once again.
2024-12-29 02:27:56 +00:00
sin-ack
bfde326bcb font/freetype: Rewrite monoToGrayscale algorithm
The original version had issues converting properly and caused broken
glyphs. This version tries to be as simple as possible in order to make
it easy to understand. I haven't measured the performance but in
practice this will only happen during the first render of the glyph
after a face change (i.e. during launch or when changing font size).
2024-12-29 02:27:52 +00:00
Zein Hajj-Ali
fa83140585 Set alpha component for fullscreen background colour 2024-12-28 21:07:43 -05:00
mitchellh
a671ca43f8 deps: Update iTerm2 color schemes 2024-12-29 01:00:43 +00:00
Mitchell Hashimoto
5293fc9c2f gtk: add option to not link against libX11 (#3748)
Possible fix for #3477. Needs testing.
2024-12-28 14:44:55 -08:00
Mitchell Hashimoto
531a225b1e Clarify how to read logs on macOS (#3808)
I removed the sentence `See the Mac App section for more information.`
because I cannot find the relevant information. It would be great to
have a separate log file and indicate its location in the document.

For the record, I just spent 15 minute searching for the location of a
log file in the document, which is painful because the website does not
have a search button. Eventually I gave up and looked into the source
file, and finally found the following comment (btw do we really need
`sudo`?):


ca7c954712/src/main_ghostty.zig (L129-L132)

Hopefully, this commit can make other new users' lives easier!
2024-12-28 14:41:54 -08:00
Mitchell Hashimoto
a55bea3491 ci: install nix 2024-12-28 14:38:29 -08:00
Qingyao Sun
351a7c03a5 Clarify how to read logs on macOS 2024-12-28 17:35:32 -05:00
Mitchell Hashimoto
f95aa32965 run gtk matrix on small instances 2024-12-28 14:32:13 -08:00
Mitchell Hashimoto
63dad2fb10 prettier 2024-12-28 14:31:35 -08:00
Mitchell Hashimoto
c4ff873726 ci: test gtk via a matrix 2024-12-28 14:29:36 -08:00