1914 Commits

Author SHA1 Message Date
Mitchell Hashimoto
01cb1ad90e apprt/gtk: cursor state should be on surface 2023-09-14 11:22:54 -07:00
Thorsten Ball
d96d60445a Fix compilation issues with GTK cursor support 2023-09-14 20:19:53 +02:00
Mitchell Hashimoto
cb2931cb27 rename cursor shape to mouse shape for OSC 22 2023-09-14 11:12:17 -07:00
Mitchell Hashimoto
674575e598 apprt/gtk: support set cursor shape 2023-09-14 10:55:05 -07:00
Mitchell Hashimoto
3356146bb4 macos: support cursor style 2023-09-14 10:40:40 -07:00
Mitchell Hashimoto
31a61613e9 apprt/glfw: support setting cursor shape 2023-09-14 10:23:11 -07:00
Mitchell Hashimoto
7734bab8c4 terminal: cursor shape parsing, hook up to apprt callback 2023-09-14 10:12:38 -07:00
Mitchell Hashimoto
ab8569b4bd terminal: parse OSC 22 2023-09-14 09:36:23 -07:00
Jonathan Marler
a2e881ff4e windows: initial support for zig build test
Makes progress getting "zig build test" to work on windows.  Mostly
fixed issues around build configuration and added some branches throughout
the Zig code to return/throw errors for unimplemented parts.

I also added an initial implementation for getting the home dir.
2023-09-14 03:15:40 -06:00
Mitchell Hashimoto
b9dba629c1 config: default cursor style has to be block
It appears there are programs that assume this.
2023-09-13 19:01:05 -07:00
Mitchell Hashimoto
c3bf054dd4 apprt/embedded: call core app reload config so changes go to all threads 2023-09-13 19:01:05 -07:00
Mitchell Hashimoto
b4d2818522 typo in loading emoji font for linux 2023-09-13 15:28:08 -07:00
Mitchell Hashimoto
d381cefb8f bring back built-in emoji font for Linux 2023-09-13 15:27:01 -07:00
Mitchell Hashimoto
5e75752d7d core: do not preload Apple Emoji, our fallback search can find it 2023-09-13 14:42:56 -07:00
Mitchell Hashimoto
3c7ba634d2 font: remove excess debugging code 2023-09-13 14:41:43 -07:00
Mitchell Hashimoto
e459f0f94b core: do not do emoji font fallback on Linux
Our font discovery mechanism is capable of finding this.
2023-09-13 14:41:01 -07:00
Mitchell Hashimoto
a2236d1ceb font: fallback search must verify presentation 2023-09-13 14:27:04 -07:00
Mitchell Hashimoto
678bd0de0c core: surface should not use app mailbox
The surface runs on the same thread as the app so if we use the app
mailbox then we risk filling the queue before it can drain. The surface
should use the app directly.

This commit just changes all the calls to use the app directly. We may
also want to coalesce certain changes to avoid too much CPU but I defer
that to a future change.
2023-09-13 08:34:09 -07:00
Mitchell Hashimoto
fc90a4a052 apprt/gtk: do not ask for confirm window close if all surfaces idle 2023-09-11 15:53:20 -07:00
Mitchell Hashimoto
868b66ce74 apprt/gtk: integrate app needsConfirmQuit 2023-09-11 15:47:37 -07:00
Mitchell Hashimoto
56ccadd7f1 core: app needsConfirmQuit to streamline quitting if no active sessions 2023-09-11 15:44:08 -07:00
Mitchell Hashimoto
2f0905b60c macos: reload config MUST go through Zig core 2023-09-11 15:20:31 -07:00
Mitchell Hashimoto
b7f4c1d707 config: unify some error types for now 2023-09-11 13:55:06 -07:00
Mitchell Hashimoto
711e3a5043 macos: add reload configuration to the Ghostty menu bar 2023-09-11 13:49:20 -07:00
Mitchell Hashimoto
f93d7a8942 Merge pull request #428 from mitchellh/config-errs
Track and log configuration errors, non-fatal
2023-09-11 10:00:33 -07:00
Mitchell Hashimoto
22f3fea98f config: turn invalid config-file values into errors in the list 2023-09-11 09:46:27 -07:00
Mitchell Hashimoto
f0ee2fb454 macos: log configuration errors 2023-09-11 09:39:58 -07:00
Mitchell Hashimoto
9be46fa80a apprt/gtk: log configuration errors 2023-09-11 09:18:03 -07:00
Mitchell Hashimoto
e5123330ce config: add ErrorList file 2023-09-11 09:17:29 -07:00
Mitchell Hashimoto
4ee9531ce3 apprt/glfw: log configuration errors 2023-09-11 09:16:56 -07:00
Mitchell Hashimoto
a359641d07 config: store unknown errors in list too 2023-09-11 09:14:27 -07:00
Mitchell Hashimoto
75e8d8f0da config: arg parser supports custom types with error tracking 2023-09-11 09:10:31 -07:00
Mitchell Hashimoto
58a43f1980 config: store some basic errors on parse 2023-09-11 09:10:26 -07:00
Mitchell Hashimoto
cc13f0fe49 config: cannot set underscore-prefixed fields 2023-09-11 09:10:22 -07:00
Mitchell Hashimoto
10989ae7b0 renderer: implement underline cursor 2023-09-10 22:05:47 -07:00
Mitchell Hashimoto
24af24a086 terminal: CSI q requires a space intermediate 2023-09-10 22:01:17 -07:00
Mitchell Hashimoto
2820db55be config: add C API ghostty_config_get to read configuration values 2023-09-10 18:45:02 -07:00
Mitchell Hashimoto
b14ba8c022 config: extract into dedicated dir, split into files 2023-09-10 16:17:19 -07:00
Mitchell Hashimoto
8b26e93cb5 renderer: update some code comments 2023-09-10 12:18:38 -07:00
Mitchell Hashimoto
afacc2ca9e renderer: cursor style unit tests 2023-09-09 20:48:56 -07:00
Mitchell Hashimoto
8d96c2beed termio/exec: changing default cursor config updates at runtime 2023-09-09 20:40:38 -07:00
Mitchell Hashimoto
160b1eeb5a termio/exec: ensure initial cursor blink mode is set to config 2023-09-09 20:40:22 -07:00
Mitchell Hashimoto
3583a0c1ca renderer/opengl: new cursor apis 2023-09-09 20:37:56 -07:00
Mitchell Hashimoto
d9cfd00e9f Big Cursor State Refactor
This makes a few major changes:

  - cursor style on terminal is single source of stylistic truth
  - cursor style is split between style and style request
  - cursor blinking is handled by the renderer thread
  - cursor style/visibility is no longer stored as persistent state on
    renderers
  - cursor style computation is extracted to be shared by all renderers
  - mode 12 "cursor_blinking" is now source of truth on whether blinking
    is enabled or not
  - CSI q and mode 12 are synced like xterm
2023-09-09 20:19:37 -07:00
Mitchell Hashimoto
f31bde48fc macos: add prev/next tab custom binding support 2023-09-09 13:00:23 -07:00
Mitchell Hashimoto
a6c40d0417 renderer: always show cursor if window is not focused
Fixes #400

This ensures the hollow box is shown even if the cursor is not in a
blinking state when unfocus happens. We still hide the cursor even on
unfocus if the terminal mode explictly asks for a hidden cursor.
2023-09-06 11:23:42 -07:00
Thorsten Ball
cac5b00d94 gtk: add gtk-single-instance setting to allow disabling of it
This is based on our conversation on Discord and adds a setting for GTK
that allows disabling the GTK single-instance mode.

If this is off, it's possible to start multiple applications from the
same release binary.

Tested like this:

```
$ zig build -Dapp-runtime=gtk -Doptimize=ReleaseFast && ./zig-out/bin/ghostty --gtk-single-instance=false

[... starts new application ...]
```

and

```
$ zig build -Dapp-runtime=gtk -Doptimize=ReleaseFast && ./zig-out/bin/ghostty --gtk-single-instance=true
info: ghostty version=0.1.0-main+42a22893
info: runtime=apprt.Runtime.gtk
info: font_backend=font.main.Backend.fontconfig_freetype
info: dependency harfbuzz=8.0.0
info: dependency fontconfig=21400
info: renderer=renderer.OpenGL
info: libxev backend=main.Backend.io_uring
info(os): LANG is not valid according to libc, will use en_US.UTF-8
info: reading configuration file path=/home/mrnugget/.config/ghostty/config
info(config): default shell source=env value=/usr/bin/zsh

(process:49045): GLib-GIO-WARNING **: 13:55:56.116: Your application did not unregister from D-Bus before destruction. Consider using g_application_run().

[exits]
```
2023-09-05 13:59:07 +02:00
Mitchell Hashimoto
f8335c10d8 terminal: disable noisy logs 2023-09-03 14:02:55 -07:00
Mitchell Hashimoto
cdf81b610d terminal: mark prompt continuation lines, end prompt clear at first
prompt
2023-09-03 14:00:56 -07:00
Mitchell Hashimoto
de3d0b4243 terminal: parse semantic prompt "k" (kind) parameter 2023-09-03 13:47:06 -07:00