Mitchell Hashimoto
ec7ab5b6a4
apprt/gtk: always set app ID, use G_APPLICATION_NON_UNIQUE instead
...
This makes the icon and title work on Wayland while retaining the
gtk-single-instance functionality.
2023-09-21 10:57:10 -07:00
Mitchell Hashimoto
2889271ee0
Merge pull request #507 from rockorager/osc_utf8
...
osc: allow 0x20-0xFF in osc_put
2023-09-21 09:58:51 -07:00
Mitchell Hashimoto
ea16fcf255
Merge pull request #512 from mitchellh/mouse-report
...
core: send proper reporting code for alt not super
2023-09-21 08:59:14 -07:00
Mitchell Hashimoto
b7055e2026
core: send proper reporting code for alt not super
2023-09-21 08:49:14 -07:00
Mitchell Hashimoto
92e98d34b5
terminal: CSI E and F
2023-09-21 08:21:32 -07:00
Tim Culverhouse
5e800df277
osc: allow 0x20-0xFF in osc_put
...
The osc_string state of the parser limited accepted bytes to 0x7F. When
parsing a utf-8 encoded string as part of an OSC string, the parser
would encounter an error and abort the OSC parsing, allowing any
remaining bytes to be leaked (possibly) as printable characters to the
terminal window.
Allow any byte in the range 0x20 - 0xFF to be accepted by osc_put. Add
test cases which conflict with the 'anywhere' transitions (IE the utf8
sequence includes C1 control codes which might transition to another
state).
2023-09-21 03:08:41 -05:00
Tim Culverhouse
2d769b03ae
terminal: use larger buffer for xtversion response
...
Commit fbe030d85a80 ("terminal: respond to XTVERSION query") introduced
responding to XTVERSION queries. The implementation uses the
.write_small method, which has a limit of 38 bytes. This works well if
your branch is named "main", since the branch is part of the
version_string variable. If you start using longer branch names, you can
quickly run into the limit.
The XTVERSION response is:
"\x1bP>|ghostty d.d.d-<branch>+<12-digit-hash>\x07"
Which has an overhead of 32 bytes, meaning the natural branch limit is 6
bytes (6 characters, assuming you use ASCII branch names). Github has a
limit of 256 chars, so let's set a max XTVERSION buffer of 256+32 = 288
Fixes: fbe030d85a80 ("terminal: respond to XTVERSION query")
2023-09-21 03:04:23 -05:00
Mitchell Hashimoto
8963c3b299
config: window-theme, enum support for get
2023-09-20 21:30:57 -07:00
Tim Culverhouse
fbe030d85a
terminal: respond to XTVERSION query
...
XTVERSION (CSI > 0 q) is used by some libraries to identify the terminal
+ version. Respond to this query with `ghostty {version_string}`. There
is no formal format for this response. A roundup of a few tested
terminals show two primary formats. This patch opts to save one byte and
use the `name SP version` semantics.
foot: foot(version)
xterm: XTerm(version)
contour: contour version
wezterm: wezterm version
Reference: https://github.com/dankamongmen/notcurses/blob/master/TERMINALS.md#notes-for-terminal-authors
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2023-09-20 19:06:28 -05:00
Mitchell Hashimoto
9ad27924a6
input: correct xterm encoding for modified F1-F4
...
Fixes #499
2023-09-20 14:33:55 -07:00
Mitchell Hashimoto
59267c4c4d
termio/exec: remove GHOSTTY_MAC_APP on Mac
2023-09-20 14:25:48 -07:00
Mitchell Hashimoto
ea4bc95f43
os: appendEnv
2023-09-20 13:02:06 -07:00
Mitchell Hashimoto
718c8d7ac8
main: disable stderr logging by default for lib
2023-09-20 12:38:26 -07:00
Mitchell Hashimoto
7059b4f74d
apprt/embedded: ghostty_cli_main
2023-09-20 12:35:52 -07:00
Mitchell Hashimoto
1f7d567f29
apprt/gtk: use gtk_keyval_to_lower to get unshifted
...
map_keycode was not respecting the keyboard layout!
2023-09-19 17:44:18 -07:00
Mitchell Hashimoto
ff74f27b99
macos: send caps lock state to UCKeyTranslate
2023-09-19 15:42:36 -07:00
Mitchell Hashimoto
62a35417ab
input: kitty alternates and text should not include control characters
2023-09-19 15:18:00 -07:00
Mitchell Hashimoto
7748390a7e
apprt/gtk: async clipboard
2023-09-19 10:53:45 -07:00
Mitchell Hashimoto
5a02635d2c
macos: async style clipboard reading
2023-09-19 10:36:17 -07:00
Mitchell Hashimoto
b30feeb596
core: move clipboard to async process
2023-09-19 10:18:17 -07:00
Mitchell Hashimoto
eeba3057f9
terminal: CSI G must reset pending wrap state
...
Fixes #479
2023-09-18 22:14:04 -07:00
Mitchell Hashimoto
063a66ea6c
terminal: allow mixed semicolon/colon CSI m commands
...
Fixes #487
2023-09-18 21:45:19 -07:00
Mitchell Hashimoto
90b5fdeede
ci: don't run gtk tests in CI
2023-09-18 15:46:57 -07:00
Mitchell Hashimoto
ed0a2ecfc4
apprt/gtk: window actions should use currently active surface
2023-09-18 15:33:11 -07:00
Mitchell Hashimoto
f3662354e5
apprt/gtk: about window
2023-09-18 15:16:35 -07:00
Mitchell Hashimoto
bf665b7c63
apprt/gtk: reset accelerators initially
2023-09-18 15:03:36 -07:00
Mitchell Hashimoto
844945e7f9
apprt/gtk: add reload config
2023-09-18 15:00:54 -07:00
Mitchell Hashimoto
c3a72b9188
apprt/gtk: add new tab button in header
2023-09-18 14:55:37 -07:00
Mitchell Hashimoto
7996be25a8
apprt/gtk: new window, tab
2023-09-18 14:51:19 -07:00
Mitchell Hashimoto
71ca254be8
apprt/gtk: window actions
2023-09-18 14:41:52 -07:00
Mitchell Hashimoto
dcf615022e
apprt/gtk: key file for logic related to keys
2023-09-18 14:27:05 -07:00
Mitchell Hashimoto
394ab3017f
apprt/gtk: initial app menu
2023-09-18 12:54:19 -07:00
Mitchell Hashimoto
4606d56dc0
apprt/gtk: config errors is not an application window
2023-09-18 11:24:19 -07:00
Mitchell Hashimoto
008738df56
core: only prevent repeat mouse events for motion
...
Fixes #485
2023-09-18 09:15:26 -07:00
Mitchell Hashimoto
6df01b87c1
apprt/gtk: if errors fixed, hide window
2023-09-17 22:34:34 -07:00
Mitchell Hashimoto
80e02c6c9f
apprt/gtk: update config error contents on reload
2023-09-17 22:31:52 -07:00
Mitchell Hashimoto
92465f57ea
apprt/gtk: grab focus of config window when reloading
2023-09-17 22:28:58 -07:00
Mitchell Hashimoto
f82fd56933
apprt/gtk: hook up buttons
2023-09-17 22:09:44 -07:00
Mitchell Hashimoto
40315afe72
apprt/gtk: extract config errors window into views
2023-09-17 22:03:43 -07:00
Mitchell Hashimoto
fe15e7d5fd
apprt/gtk: add View to help with auto-layout views
2023-09-17 21:59:25 -07:00
Mitchell Hashimoto
bd3b5d5332
apprt/gtk: working on config errors window
2023-09-17 21:37:57 -07:00
Mitchell Hashimoto
dbd8add23e
core: don't send release events for key bindings
...
Fixes #482
2023-09-17 14:31:15 -07:00
Mitchell Hashimoto
ef7e0f7fdb
core: mouse reports should always send on release even if outside
...
Fixes #481
2023-09-17 14:22:40 -07:00
SoraTenshi
ddb9be0971
Remove custom CAPI function
...
and use the already existing get_config function
2023-09-17 11:57:01 -07:00
SoraTenshi
4c1cf5efe3
fixup! macos: allow to hide decorations
2023-09-17 11:57:00 -07:00
SoraTenshi
ed8b5bc283
macos: allow to hide decorations
2023-09-17 11:57:00 -07:00
Mitchell Hashimoto
36c9d607b2
core: do not send repeat mouse events if cell didn't change
2023-09-17 11:49:25 -07:00
Mitchell Hashimoto
ab4acf0d00
core: send mouse motion events if motion tracking and button pressed
2023-09-17 11:45:53 -07:00
Mitchell Hashimoto
d6b827cce7
core: all SGR mouse report modes can tell button differences
...
Fixes #478
2023-09-17 10:24:51 -07:00
Mitchell Hashimoto
dd85f6c41d
core: do not emit mouse report events if position is outside surface
2023-09-17 09:56:26 -07:00