5905 Commits

Author SHA1 Message Date
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
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
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
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
Qingyao Sun
351a7c03a5 Clarify how to read logs on macOS 2024-12-28 17:35:32 -05:00
Mitchell Hashimoto
c4ff873726 ci: test gtk via a matrix 2024-12-28 14:29:36 -08:00
Mitchell Hashimoto
ca7c954712 docs: Add info about adjustments to adjustment config options (#3672)
Fix for misunderstanding in
https://github.com/ghostty-org/ghostty/issues/3400

Adds info about the MetricModifier config options that they can be used
with percentages, and links to the config option `adjust-cell-width`
that has more info
2024-12-28 12:58:30 -08:00
Jelle Besseling
b22417630b docs: Add info about adjustments to adjustment config options 2024-12-28 12:58:21 -08:00
Mitchell Hashimoto
54679ff30e docs: add guide for setting quick terminal toggle keybind (#3647)
Added documentation to guide users on configuring a keybind to toggle
the quick terminal. By default there is no keybind and there is no
reference in docs also on how to set a keybind.

Related:
https://github.com/ghostty-org/website/pull/193#issuecomment-2564164801
2024-12-28 12:57:31 -08:00
Ronit Gandhi
38643ec4fe docs: add guide for setting quick terminal toggle keybind 2024-12-28 12:57:17 -08:00
Mitchell Hashimoto
040ce0e7df docs: update guides on handling number identifier (#3664)
Related:
https://github.com/ghostty-org/website/pull/170#discussion_r1898746444
2024-12-28 12:55:24 -08:00
Hisam Fahri
b00a4275f0 Update Config.zig 2024-12-28 12:55:04 -08:00
Mitchell Hashimoto
3bccb4f05e docs: correct default value of gtk-single-instance (#3793)
`desktop` is the default value of `gtk-single-instance`; `detect` is not
a valid value.
2024-12-28 12:51:44 -08:00
Matt Mirus
a8261ec9f6 chore: undo unintentional change
I think this must have snuck in due to my fork falling behind the
upstream.
2024-12-28 15:40:25 -05:00
Mitchell Hashimoto
1e937cf2f1 fix(gtk): fix segfault/bus error on ctrl+d (#3694)
Fixes https://github.com/ghostty-org/ghostty/issues/3135 as per the fix
described here
https://github.com/ghostty-org/ghostty/issues/3135#issuecomment-2564273739
2024-12-28 12:39:34 -08:00
Mitchell Hashimoto
5340aa6c96 Use source in the example for sourcing Zsh shell integration (#3680)
A few people were copying that snippet and were facing issues such as
"permission denied", and (after a subsequent `chmod`) "syntax error".

-----
From the [CONTRIBUTING.md]:

> Pull requests should be associated with a previously accepted issue.

I decided to ignore this for a single-word change, since creating a
discussion then waiting for it to be promoted to an issue seemed
pointless for such a minor change.

[CONTRIBUTING.md]:
https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md#pull-requests-implement-an-issue
2024-12-28 12:36:21 -08:00
Koray08
95ee6c1633 Replace 'w' with '\x15' 2024-12-28 22:35:44 +02:00
Matt Mirus
e8a2950324 Merge branch 'ghostty-org:main' into patch-1 2024-12-28 15:35:25 -05:00
Mitchell Hashimoto
2362a67f68 deinit buffer (#3736)
successor of #3262
2024-12-28 12:34:55 -08:00
Matt Mirus
e00233bebf docs: correct default value of gtk-single-instance
`desktop` is the default value of `gtk-single-instance`; `detect` is not a valid value.
2024-12-28 15:33:59 -05:00
Jeffrey C. Ollie
8ecb11a602 gtk: add option to not link against libX11 2024-12-28 13:40:17 -06:00
Maciej Bartczak
4ed8306b02 Add delay before updating the title 2024-12-28 17:18:15 +01:00
Felix Salcher
9632a2b956 deinit buffer 2024-12-28 16:51:16 +01:00
AP Darkly
02b34f44f6 fix probable typo in Config.zig
Based on both context and observed behavior, "now" was intended to be "not" in the paragraph describing the behavior of `focus-follows-mouse` is set to `true`.
2024-12-28 07:32:26 -05:00
Leigh Oliver
034f79cfa2 fix(gtk): fix segfault/bus error on ctrl+d 2024-12-28 10:55:13 +00:00
Kat
e8054c41f5 Use source in the example for sourcing Zsh shell integration 2024-12-28 09:01:41 +00:00
Koray08
0160f8a0d9 Add 'command delete' default to macOS 2024-12-28 10:41:52 +02:00
Mitchell Hashimoto
6cbd69da78 Update docs generators to include proper edit on github links (#3651)
Ref: https://github.com/ghostty-org/website/pull/197

The "Edit on Github" links currently on
[ghostty.org](https://ghostty.org/) link to the downstream MDX files.
This has lead to multiple folks editing the downstream MDX files.

Preview:

https://website-git-edit-on-github-link-override-ghostty.vercel.app/docs/config/reference#auto-update-channel
2024-12-27 21:05:27 -08:00
Brandon Romano
16e4529f69 Update docs generators to include proper edit on github links
Ref: https://github.com/ghostty-org/website/pull/197
2024-12-27 20:59:50 -08:00
Rohit-Bevinahally
2555f09d88 modify cmd+9 behaviour 2024-12-27 20:14:28 -08:00
Mitchell Hashimoto
bee2188014 apprt/gtk: color popovers when window-theme=ghostty (#3569)
This looks better than the regular dark color. It also happens to match
what Ptyxis does. It does not support non-libadwaita builds.

Before:

![image](https://github.com/user-attachments/assets/8c400bdf-05b3-4629-925d-fd8ce9554ae7)

After:

![image](https://github.com/user-attachments/assets/d958eb6a-102d-4d91-970b-fcaca7f2386c)

It will look even better whenever we fix the separator colors 😄
2024-12-27 13:39:41 -08:00
Tristan Partin
bf46ab8d2d apprt/gtk: color popovers when window-theme=ghostty
This looks better than the regular dark color. It also happens to match
what Ptyxis does. It does not support non-libadwaita builds.

Signed-off-by: Tristan Partin <tristan@partin.io>
2024-12-27 14:32:02 -06:00
Mitchell Hashimoto
590c2929e7 Fix typo in config docs (#3564)
This was originally fixed in ghostty-org/website#152, but was
accidentally reverted in
[ghostty-org/website#99795d7882a5ee47437454c7c106c2874e0406dc](99795d7882).

P.S., you might want an PR template to discourage folks from making
unsolicited PRs like this :)
P.P.S., you can write issue templates as yaml files to stop folks from
ignoring them (required fields)
2024-12-27 12:08:44 -08:00
Eli
27a5a50aa0 fix: typo
Original fix: ghostty-org/website#152
Reverted: ghostty-org/website#99795d7882a5ee47437454c7c106c2874e0406dc.
2024-12-27 14:02:25 -06:00
Mitchell Hashimoto
c8dca6c9a8 Fix building with -Dflatpak=true (#3440)
While running a Ghostty instance built with this option currently
crashes under Flatpak, at least it ensures we're able to build it again.
2024-12-27 11:58:39 -08:00
Mitchell Hashimoto
571d9b015d Fix zsh shell integration docs (#3332)
- There is no need to quote variables in zsh.
- The shell integration file is not executable; we should `source` it
instead.
2024-12-27 11:54:07 -08:00
Mitchell Hashimoto
66dbc48e6b fix elvish integration: remove erroneous call to "type" (#3386)
An exception is raised from the elvish integration module when
`TERMINFO` is set:

```
Exception: exec: "type": executable file not found in $PATH
  ghostty-integration.elv:120:60-71:   if (and (not $no-sudo) (not-eq "" $E:TERMINFO) (eq file (type -t sudo))) {
  ghostty-integration.elv:38:1-123:1:
```

`type` is a builtin in bash and [in
fish](https://fishshell.com/docs/current/cmds/type.html) but it does not
exist in elvish. I suspect it is here as an accidental copy/paste from
the ghostty [fish
integration](https://github.com/ghostty-org/ghostty/blob/main/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish#L71).

Maybe we can use the elvish
[`has-external`](https://elv.sh/ref/builtin.html#has-external) function
instead (or we could remove that check altogether).

Edit: I think this is in a merge-able state (and it would fix that
error!), but I have just converted this PR to a draft since I can see
other problems with the script. I'll give it a more thorough treatment
later and amend this PR (or also happy to merge this and do other fixes
in separate PRs).
2024-12-27 11:53:54 -08:00
Mitchell Hashimoto
1622263519 cli(list_themes): ignore .DS_Store (#3425)
macOS will create `.DS_Store` files in any directory it opens in Finder.
The `+list_themes` command would then list this file as a theme, and
attempt to preview it. `.DS_Store` is a binary file, and is silently
failing in the theme preview...I am on Linux and when I put a small
binary file in my user themes directory, I get a segfault. There is
something about the specific contents in `.DS_Store` that does not cause
this segfault, but lets us silently fail. We should investigate this
further - the issue is in `Config.loadFile` I believe.

In either case, we need to ignore `.DS_Store` so that it is not listed
as a theme.
2024-12-27 11:53:04 -08:00
Mitchell Hashimoto
93b6bfdefe Update doc inform toggle_quick_terminal macOS only (#3464)
From the 'CONTRIBUTING.md':
"Pull requests should be associated with a previously accepted issue. If
you open a pull request for something that wasn't previously discussed,
it may be closed or remain stale for an indefinite period of time. I'm
not saying it will never be accepted, but the odds are stacked against
you."

I understand this, and I make a PR without an issue because I feel like
this is actually binary.

On discord I've been informed the quick terminal is macOS only, and in
the documentation I don't think this is expressed, please correct me if
wrong and close this.

If it's correct and the documentation should contain it, then here's my
PR adding that information on the bottom of the section.
If the location of the added information does not fit the style
guidelines I can change it.
2024-12-27 11:52:32 -08:00
xaviduds
96753aa7e0 Update doc inform toggle_quick_terminal macOS only 2024-12-27 11:52:20 -08:00
Mitchell Hashimoto
09470ede55 gtk: equalize on double clicking the split handle (#3557) 2024-12-27 11:50:15 -08:00
LuK1337
66ed72f486 gtk: equalize on double clicking the split handle 2024-12-27 20:45:13 +01:00
Qwerasd
322f166ca5 coretext: exclude bitmap fonts from discovery
We do not currently support bitmap fonts in a real capacity, and they
often are missing some tables which we currently rely on for metrics,
and we don't handle the metrics calculations failing gracefully right
now.
2024-12-27 14:06:46 -05:00
Yorick Peterse
50f7632d81 Fix building with -Dflatpak=true
While running a Ghostty instance built with this option currently
crashes under Flatpak, at least it ensures we're able to build it again.
2024-12-27 16:27:19 +01:00
Tim Culverhouse
c2792a1811 cli(list_themes): ignore .DS_Store
macOS will create `.DS_Store` files in any directory it opens in Finder.
The `+list_themes` command would then list this file as a theme, and
attempt to preview it. `.DS_Store` is a binary file, and is silently
failing in the theme preview...I am on Linux and when I put a small
binary file in my user themes directory, I get a segfault. There is
something about the specific contents in `.DS_Store` that does not cause
this segfault, but lets us silently fail. We should investigate this
further - the issue is in `Config.loadFile` I believe.

In either case, we need to ignore `.DS_Store` so that it is not listed
as a theme.

Fixes: #3378
2024-12-27 09:00:08 -06:00
Daniel Patterson
a4daabb28a Rename goto_split top/bottom directions to up/down. 2024-12-27 14:56:48 +00:00
Ankur Kothari
c320635c29 fix use of bash builtin in elvish integration
`type` is a bash builtin and should not be used in elvish.

```
Exception: exec: "type": executable file not found in $PATH
  ghostty-integration.elv:120:60-71:   if (and (not $no-sudo) (not-eq "" $E:TERMINFO) (eq file (type -t sudo))) {
  ghostty-integration.elv:38:1-123:1:
```

We can use the elvish `has-external` function instead.
2024-12-27 23:10:06 +11:00
XiaoYan Li
a295c5e884 Fix zsh shell integration docs
- There is no need to quote variables in zsh.
- The shell integration file is not executable; we should `source` it instead.
2024-12-27 15:56:14 +08:00