922 Commits

Author SHA1 Message Date
Mitchell Hashimoto
4b8b5c5fc1 font: skeleton for box drawing and hook up to Group 2022-11-24 10:21:27 -08:00
Mitchell Hashimoto
ca97c63a65 font: detect box glyphs, start littering stuff to denote special fonts 2022-11-24 10:21:27 -08:00
Mitchell Hashimoto
84b1ae9a3c set IUTF8 on the pty
This is important on Mac since the pty by default on Mac does NOT have
this enabled. Without this, attempting to read/write UTF-8 characters
in the raw pty layer would sometimes turn into '?' even though ghostty
fully supports it.
2022-11-24 10:20:18 -08:00
Mitchell Hashimoto
70b017200a copying selection trims trailing whitespace
This is configurable with `clipboard-trim-trailing-spaces`.

This also fixes a bug where debug builds would crash when copying blank
lines. This never affected release builds.
2022-11-22 21:27:05 -08:00
Mitchell Hashimoto
03fdb38a96 moving the mouse too far between clicks will reset the click count 2022-11-22 20:59:15 -08:00
Mitchell Hashimoto
66078493e6 mac: get default click repeat interval from NSEvent 2022-11-22 11:20:00 -08:00
Mitchell Hashimoto
29b651ee46 configurable click interval with click-repeat-interval 2022-11-22 10:57:57 -08:00
Mitchell Hashimoto
cc4ba96970 hide imgui demo window 2022-11-22 10:57:09 -08:00
Mitchell Hashimoto
ad79a8585d Merge pull request #54 from mitchellh/multiclick
Double/Triple-click selects word and lines respectively
2022-11-22 10:18:12 -08:00
Mitchell Hashimoto
d1b565f4d4 hook up triple-click in UI to select lines 2022-11-22 10:07:52 -08:00
Mitchell Hashimoto
8b839ef4b6 screen selectLine and tests 2022-11-22 10:03:20 -08:00
Mitchell Hashimoto
04088abe5a fix regression around selecting word at end of screen 2022-11-22 09:41:07 -08:00
Mitchell Hashimoto
f9fed1f3a8 double-click drag selects word by word 2022-11-22 09:15:44 -08:00
Mitchell Hashimoto
9ae2df7bae Don't crash when fn key pressed on mac (workaround upstream issue) 2022-11-22 08:45:09 -08:00
Mitchell Hashimoto
a63815c5ba selectWord goes across soft-wrapped lines 2022-11-22 08:04:27 -08:00
Mitchell Hashimoto
f7c6ea63e1 screen selectWord starting functionality, not done at all 2022-11-21 21:34:38 -08:00
Mitchell Hashimoto
804d4534cd window detects double and triple clicks 2022-11-21 20:42:29 -08:00
Mitchell Hashimoto
acdbdfbe3f macOS should launch shell as a login shell 2022-11-21 15:57:51 -08:00
Mitchell Hashimoto
56de5846f4 OSC 52: Clipboard Control (#52)
This adds support for OSC 52 -- applications can read/write the clipboard. Due to the security risk of this, the default configuration allows for writing but _not reading_. This is configurable using two new settings: `clipboard-read` and `clipboard-write` (both booleans).
2022-11-21 15:12:00 -08:00
Mitchell Hashimoto
9b0fbde838 put some config in the devmode UI 2022-11-21 09:09:25 -08:00
Mitchell Hashimoto
b4f5107717 config files allow spaces around "=" 2022-11-21 08:22:04 -08:00
Mitchell Hashimoto
611760f98b ability to customize cursor color 2022-11-20 20:35:20 -08:00
Mitchell Hashimoto
2e74b7af9e ability to set selection fg/bg colors 2022-11-20 20:27:12 -08:00
Mitchell Hashimoto
c2e2f69989 change config write to be debug 2022-11-20 20:17:05 -08:00
Mitchell Hashimoto
a15afa8211 do not block channel send while draining channel 2022-11-20 20:16:40 -08:00
Mitchell Hashimoto
d213c1a939 fix selection regression caused by screen copy optimization 2022-11-20 20:05:07 -08:00
Mitchell Hashimoto
7c17497623 test that quoting config values is okay 2022-11-20 19:37:23 -08:00
Mitchell Hashimoto
23142e2ea6 config file allows and ignores empty lines, supports comments 2022-11-20 19:31:34 -08:00
Mitchell Hashimoto
01573819ea Configurable 256 Color Palette (#50)
The 256 color palette can now be configured with the `palette=N=HEX` format in the config. Example, Dracula:

```
foreground=#f8f8f2
background=#282a36
palette=0=#21222c
palette=8=#6272a4
palette=1=#ff5555
palette=9=#ff6e6e
palette=2=#50fa7b
palette=10=#69ff94
palette=3=#f1fa8c
palette=11=#ffffa5
palette=4=#bd93f9
palette=12=#d6acff
palette=5=#ff79c6
palette=13=#ff92df
palette=6=#8be9fd
palette=14=#a4ffff
palette=7=#f8f8f2
palette=15=#ffffff
```
2022-11-20 15:25:51 -08:00
Mitchell Hashimoto
89834c1412 manually focus next window on macOS <= 12
Closes #41
2022-11-20 09:31:57 -08:00
Mitchell Hashimoto
688ec71a74 don't change cursor to ibeam on macOS prior to Ventura
glfw crashes with our tab group usage (see comment)
2022-11-20 09:03:28 -08:00
Mitchell Hashimoto
30d62fc144 workaround for x86_64 ABI issue: https://github.com/ziglang/zig/issues/13598 2022-11-19 22:07:48 -08:00
Mitchell Hashimoto
02b6eb123e fix test name 2022-11-18 18:18:10 -08:00
Mitchell Hashimoto
dbf167d18a OSC parsing for get/set clipboard (OSC 52) -- not hooked up yet 2022-11-18 18:16:53 -08:00
Mitchell Hashimoto
3de68e1d7a fix memory leaks with metal resources and multi-window/tab 2022-11-18 14:25:02 -08:00
Mitchell Hashimoto
a714ee2702 fix memory leak when grapheme clusters of >4 codepoints are present 2022-11-18 14:15:14 -08:00
Mitchell Hashimoto
da5164a539 metal: implement two-pass render for bg 2022-11-18 13:54:45 -08:00
Mitchell Hashimoto
ed56d2c2ab opengl: render bg in a separate pass 2022-11-18 13:24:04 -08:00
Mitchell Hashimoto
f64795dc9d opengl: culling is not necessary 2022-11-18 10:10:16 -08:00
Mitchell Hashimoto
8071836a57 Always send mouse events 2022-11-17 16:18:17 -08:00
Mitchell Hashimoto
08bca077b2 search for unknown codepoints in any available font face
If an unknown codepoint is rendered, we now will query the OS for ANY
font that can satisfy the codepoint (rather than rendering `?`).
2022-11-17 16:09:33 -08:00
Mitchell Hashimoto
da2942e083 font: specific codepoint lookup in internals 2022-11-17 15:49:14 -08:00
Mitchell Hashimoto
8f9da82754 Embed nerd fonts into our default font 2022-11-17 14:16:50 -08:00
Mitchell Hashimoto
4521efb83d move screen resize to a renderer mailbox message 2022-11-17 13:55:04 -08:00
Mitchell Hashimoto
357ad43656 app: deinit darwin info 2022-11-16 21:20:04 -08:00
Mitchell Hashimoto
b4d5901225 update some docs 2022-11-16 21:18:37 -08:00
Mitchell Hashimoto
8ac90d33e6 new_tab action 2022-11-16 21:17:41 -08:00
Mitchell Hashimoto
c6f7eab601 hide tab bar if last window is destroyed 2022-11-16 21:04:55 -08:00
Mitchell Hashimoto
bb90104de3 enable Mac native tabbing 2022-11-16 21:04:54 -08:00
Mitchell Hashimoto
465b4df6ea fix tests for WNOHANG commit 2022-11-16 21:04:31 -08:00