2094 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto
2c5271ca82 Merge pull request #397 from mitchellh/mrn/gtk-window-decoration
gtk: allow hiding window decoration in configuration
2023-09-03 12:41:14 -07:00
Thorsten Ball
a1a48eb3f0 gtk: allow hiding window decoration in configuration
This is part of #319 by fixing it for GTK and introducing the
configuration option.

This adds `window-decoration = false` as a possible configuration
option. If set to `false`, then no window decorations are used.
2023-09-03 21:27:21 +02:00
SoraTenshi
6faed268e0 config: clean up cursor style configuration 2023-09-03 07:51:36 -07:00
Mitchell Hashimoto
4570356e57 turn zoom into a toggle rather than an explicit zoom/unzoom 2023-09-02 16:03:51 -07:00
Mitchell Hashimoto
519a97b782 core: add unzoom_split binding 2023-09-02 15:15:12 -07:00
Mitchell Hashimoto
50a1a52ae3 core: add zoom keybinding for splits 2023-09-02 14:52:43 -07:00
Mitchell Hashimoto
d338828b85 Merge pull request #387 from mitchellh/dpi
content scale change events should also impact viewport padding
2023-09-02 13:58:06 -07:00
Mitchell Hashimoto
aa04c79586 terminal: CSI P must shift all remaining columns to right of cursor
Fixes #388
2023-09-02 11:28:37 -07:00
Mitchell Hashimoto
22eb533473 content scale change events should also impact viewport padding
This calculates the new padding pixel values and propogates those
changes to the renderer.
2023-09-02 11:00:51 -07:00
Mitchell Hashimoto
6c7ccae848 Merge pull request #385 from mgeist/update-font-dpi
Update font DPI when the content scale is updated
2023-09-02 10:41:07 -07:00
Mat
9e5ced2600 use a const scoped block for font size 2023-09-02 13:39:29 -04:00
Mat
0d094f244e Update font DPI when the content scale is updated 2023-09-02 13:00:04 -04:00
Will Pragnell
86122624e0 macos: add visible-menu non-native-fullscreen option 2023-09-01 21:45:45 -07:00
Mitchell Hashimoto
a6007cab7a terminal: fix unimplemented origin mode check 2023-09-01 08:46:53 -07:00
Mitchell Hashimoto
3bd77259bf font: don't use intCast on index
This is a weird one. By using intCast on the `idx` I am periodically
getting a panic on index out of bounds where the index is larger than
FontIndex can possibly be. Very strange!

I tried to just remove intCasts and believe it or not that worked.
Previously, `cat /dev/urandom` would trigger the issue in seconds and
now I've had it running 20+ minutes without the issue.

The additional `if` check is just a safety mechanism
2023-08-31 21:16:56 -07:00
Mitchell Hashimoto
36756cc866 terminal: charset table should be len 256, not 255 2023-08-31 20:45:13 -07:00
Mitchell Hashimoto
f4fef559fb terminal: delete lines outside of scroll region should do nothing 2023-08-31 20:41:32 -07:00
Mitchell Hashimoto
65246327dd terminal: add more assertions 2023-08-31 19:45:22 -07:00
Mitchell Hashimoto
6c13627d51 terminal: delete chars (CSI P) tested, fixes many issues 2023-08-31 19:42:23 -07:00
Mitchell Hashimoto
0aebf1e406 terminal: CSI S allows for count greater than scroll region height 2023-08-31 17:52:22 -07:00