Mitchell Hashimoto
f3996ff0f8
apprt: primary clipboard awareness (selection clipboard)
2023-08-09 13:41:22 -07:00
Mitchell Hashimoto
e33f6c71de
update libxev to fix split writes on large writes (i.e. big paste)
...
Fixes #258
This was an upstream bug in libxev where partial the queueWrite
mechanism would not correctly handle partial write results:
https://github.com/mitchellh/libxev/pull/60
2023-08-09 08:18:43 -07:00
Mitchell Hashimoto
a8380e937d
scroll top, bot, page up, page down binding actions
2023-08-09 07:24:11 -07:00
Mitchell Hashimoto
6b45d931c3
plumb through the resources dir to termio
2023-08-08 09:29:38 -07:00
Mitchell Hashimoto
c0f5c0ef41
termio/exec: poll() needs a negative timeout to block 🤡
2023-08-08 09:14:08 -07:00
Mitchell Hashimoto
e2e876bfa1
termio/exec: make sure that process is dead before killing read thread
2023-08-07 21:13:33 -07:00
Mitchell Hashimoto
b5bb3b3739
termio/exec: if read thread gets 0 bytes then break the tight loop
2023-08-07 21:10:11 -07:00
Mitchell Hashimoto
816cad07b9
termio/exec: set pty fd to non-blocking, try to read as long as possible
2023-08-07 20:55:01 -07:00
Mitchell Hashimoto
f40a90e7aa
termio: use a pipe to notify the reader thread to quit
...
Simultaneously reading and closing a fd is UB. We need to ensure that we
quit, then close.
2023-08-07 20:41:34 -07:00
Mitchell Hashimoto
23935c3563
change sentinel value for resources dir, its different on Linux
2023-08-07 16:16:44 -07:00
Mitchell Hashimoto
ebbf42eec6
search for resources dir relative to executing binary on Linux ( #245 )
...
* search for resources dir relative to executing binary on Linux
From Andrew in #241 :
This works in all 3 of the possible scenarios I can think of on Linux:
* `zig build` with default prefix into `zig-out`
* `zig build -p ~/local` (my choice when compiling from source)
* ghostty packaged for a linux distribution into /usr/bin and /share
* update README
2023-08-07 16:08:27 -07:00
Mitchell Hashimoto
5c6d3c7df2
terminal: implement insert mode (mode = 4)
2023-08-07 07:44:13 -07:00
Mitchell Hashimoto
85e32f9a15
renderer: hide cursor is state explicit asks for invisible cursor
...
This was a regression. The previous logic would always show the cursor
if we were using a non-blinking cursor. But, if the terminal state is
explicitly requesting an invisible cursor (mode 25) then we need to hide
the cursor.
2023-08-06 09:55:13 -07:00
Mitchell Hashimoto
321be2d5ad
termio: respect GHOSTTY_RESOURCES_DIR
2023-08-05 21:38:32 -07:00
Mitchell Hashimoto
fb2f635c91
termio/exec: default window title to the pwd if not reported
...
We rely on the shell to report the window title. If the shell doesn't
report the window title then we default to the pwd.
2023-08-04 11:07:59 -07:00
Mitchell Hashimoto
02d0619f87
change "auto" to "detect" for shell integration
2023-07-06 18:05:01 -07:00
Mitchell Hashimoto
8239f09d9d
allow configuring shell integration injection
2023-07-06 18:04:12 -07:00
Mitchell Hashimoto
ad62e3ac1b
fish shell integration
2023-07-06 16:10:30 -07:00
Mitchell Hashimoto
ae206b2f89
termio: fish shell integration injection
2023-07-06 14:14:55 -07:00
Mitchell Hashimoto
59fb3a55e3
termio/exec: refactor resources dir lookup to prep for shell integ
2023-07-06 13:42:06 -07:00
Mitchell Hashimoto
9f86c48fd8
keybinding jump_to_prompt for semantic prompts
2023-07-06 10:30:29 -07:00
Mitchell Hashimoto
2f935d2c5c
clear_screen uses FF (0x0C) if cursor is at prompt
2023-07-05 14:16:34 -07:00
Mitchell Hashimoto
738c4dff4c
clear_screen keybinding works even when not at shell prompt
...
Instead of sending formfeed (0x0C), clear_screen actually does a
terminal emulator level clear instead. This MOSTLY matches the behavior
of iTerm and Terminal.app, with some differences:
1. I do not clear _below_ the cursor. I feel like the use case for
this feature is primarily to clear above the cursor. Happy to be
wrong here but I want it proven to me!
2. I do not clear in alternate screen mode. Clearing alt screens
breaks rendering in Vim, less, etc. and it feels like the wrong
behavior.
2023-07-05 14:01:01 -07:00
Mitchell Hashimoto
314f9287b1
Update Zig ( #164 )
...
* update zig
* pkg/fontconfig: clean up @as
* pkg/freetype,harfbuzz: clean up @as
* pkg/imgui: clean up @as
* pkg/macos: clean up @as
* pkg/pixman,utf8proc: clean up @as
* clean up @as
* lots more @as cleanup
* undo flatpak changes
* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
56f8e39e5b
Update zig, mach, fmt
2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
03fd649b5e
terminal: CHT/CBT
2023-06-25 09:53:58 -07:00
Mitchell Hashimoto
b2cd2e06de
use stdlib selfExePath
2023-06-24 12:12:49 -07:00
Mitchell Hashimoto
9c8f784386
termio: sets TERMINFO if we can find the terminfo dir
2023-06-24 12:10:10 -07:00
Mitchell Hashimoto
28a22fc07f
various tests to ensure we parse curly underlines correctly
2023-06-20 09:24:07 -07:00
Mitchell Hashimoto
866de88ee6
termio/exec: check cwd validity
2023-05-31 19:17:08 -07:00
Mitchell Hashimoto
e59b2f7fca
terminal: track pwd reported via OSC 7
2023-05-31 18:54:24 -07:00
Mitchell Hashimoto
414f2e52a5
terminal: semantic prompt aware resize
2023-05-31 16:16:00 -07:00
Mitchell Hashimoto
de00892f8e
termio/exec: handle semantic prompt events
2023-05-27 15:48:31 -07:00
Mitchell Hashimoto
3689f1fe39
apprt/gtk: only show exit confirmation if process is alive
2023-03-25 16:36:12 -07:00
Mitchell Hashimoto
b1af02941a
terminal: implement focus event mode 1004
...
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-FocusIn_FocusOut
2023-03-20 15:20:14 -07:00
Mitchell Hashimoto
ce10d875b6
Merge pull request #117 from mitchellh/config-stuff
...
Reloadable Configuration
2023-03-19 12:32:23 -07:00
Mitchell Hashimoto
b0b3b0af2d
update config messages use pointers now to make messages small again
2023-03-19 10:48:42 -07:00
Mitchell Hashimoto
638e05454f
termio: allow write req pool to grow if needed
...
This may be necessary if large amounts of data is being written (i.e. a
large clipboard paste). The pool is never shrunk again for now but once
the writes go through the buffer items will of course be reused so its
unlikely to need to continue growing.
2023-03-19 10:27:08 -07:00
Mitchell Hashimoto
6f4e913182
termio/exec: comment about what we're updating
2023-03-19 10:11:32 -07:00
Mitchell Hashimoto
8f0be3ad9e
termio: use DerivedConfig
2023-03-19 10:09:17 -07:00
Mitchell Hashimoto
91c9655475
remove unused function, make apprt surface close mandatory
2023-03-18 19:33:08 -07:00
Mitchell Hashimoto
6b61a2449a
termio: no need to close pty primary when process exits
2023-03-18 19:30:01 -07:00
Mitchell Hashimoto
d83bf5aeb4
termio: close surface on process exit
2023-03-18 19:21:28 -07:00
Mitchell Hashimoto
872c1211f5
pty: deinit should close child end
2023-03-18 19:15:29 -07:00
Mitchell Hashimoto
679f07605e
termio: detect child process exit
2023-03-18 18:58:34 -07:00
Mitchell Hashimoto
1b88f7e9ab
support mouse alt scroll (mode 1007)
...
This enables less and other older legacy programs to get mouse scroll
events
2023-03-17 19:10:08 -07:00
Mitchell Hashimoto
89d07fcd83
clear_history binding, default Cmd+K
2023-03-03 09:27:47 -08:00
Mitchell Hashimoto
38060978e2
termio/exec: don't pass pointer to stack var
2023-02-28 11:07:03 -08:00
Mitchell Hashimoto
a8025f6ec2
termio: env should not freed because arena gets it
2023-02-27 11:55:04 -08:00
Mitchell Hashimoto
83a1d783b1
termio: implement kill command for flatpak
2023-02-27 11:44:18 -08:00