2964 Commits

Author SHA1 Message Date
Mitchell Hashimoto
cec45de842 config: note gtk bug 2023-09-30 21:48:22 -07:00
Mitchell Hashimoto
769e7df675 apprt/gtk: implement default window size 2023-09-30 21:41:17 -07:00
Mitchell Hashimoto
a1a8aeb104 initial window size needs to take into account window chrome 2023-09-30 21:35:50 -07:00
Mitchell Hashimoto
cc8e1cd936 macos: support initial window size 2023-09-30 20:47:31 -07:00
Mitchell Hashimoto
8cb96a28c1 config: increase eval branches for new configs 2023-09-30 20:15:07 -07:00
Mitchell Hashimoto
604eeceb03 apprt/glfw: support window-width, window-height configurations 2023-09-30 20:10:08 -07:00
Mitchell Hashimoto
3c0700c6b0 os: launchFromDesktop works even if the artifact is a lib
Fixes #598
2023-09-30 19:09:52 -07:00
Mitchell Hashimoto
268259112b Merge pull request #597 from nfisher1226/linux_text_pointer
Set the mouse pointer to "text" (an I-beam) when it is over the gl_area
2023-09-30 15:46:33 -07:00
Mitchell Hashimoto
abf43ddfcc apprt/gtk: change default cursor to text 2023-09-30 15:46:03 -07:00
Nathan Fisher
614a9775c6 Set the mouse pointer to "text" (an I-beam) when it is over the gl_area
which the terminal embeds into for the Gtk interface. Addresses https://github.com/mitchellh/ghostty/issues/596
2023-09-30 18:26:40 -04:00
Mitchell Hashimoto
5320f1bd11 Merge pull request #595 from mitchellh/gtk-single
apprt/gtk: gtk-single-instance defaults to true only if desktop env
2023-09-30 08:54:33 -07:00
Mitchell Hashimoto
6c69f0ef63 apprt/gtk: gtk-single-instance defaults to true only if desktop env
Fixes #473

A new config value for `gtk-single-instance = desktop` is now valid.
This value uses GTK single instance mode only if it detects Ghostty was
launched from a desktop environment (i.e. clicking on the icon) through
the `.desktop` Freedesktop file. Otherwise, it disables single instance.

This enables Ghostty to work well with the CLI and accept all the
typical CLI flags. It will make Ghostty launch slower from the CLI but I
think this is an acceptable tradeoff.
2023-09-30 08:46:39 -07:00
Mitchell Hashimoto
8b8217132b Merge pull request #594 from mitchellh/gtk-prev-tab
apprt/gtk: ctrl+page-up/down for prev/next tab, does not consume input if no tabs
2023-09-29 22:22:57 -07:00
Mitchell Hashimoto
8f82f8cad6 apprt/embedded: adapt to new binding API 2023-09-29 22:13:34 -07:00
Mitchell Hashimoto
56b0cb51d5 apprt/gtk: previous_tab/next_tab action do not consume if there are no tabs 2023-09-29 22:12:38 -07:00
Mitchell Hashimoto
a85c508892 apprt/gtk: add ctrl+page-up/down as prev/next tab 2023-09-29 22:04:30 -07:00
Mitchell Hashimoto
659fa2cc66 config: keybinding clone must clone all members 2023-09-29 22:04:17 -07:00
Mitchell Hashimoto
521a2d15bb Merge pull request #593 from mitchellh/unconsumed-keys
Can configure keybinds to not consume input, a fix for clear screen and form feed
2023-09-29 21:52:03 -07:00
Mitchell Hashimoto
abc3838546 termio: clear screen always sends form feed (0x0C)
Fixes #555
2023-09-29 21:42:58 -07:00
Mitchell Hashimoto
3569073ff5 core: handle unconsumed bindings in key callbacks 2023-09-29 21:37:30 -07:00
Mitchell Hashimoto
47ee1e7355 input: Binding string can be unconsumed with "unconsumed:" prefix 2023-09-29 21:34:23 -07:00
Mitchell Hashimoto
9d0e7ab138 input: binding set can track unconsumed triggers 2023-09-29 20:18:41 -07:00
Mitchell Hashimoto
f9962a04ef recomment line 2023-09-29 20:01:26 -07:00
Mitchell Hashimoto
ecb1d19890 input: fix regression with ascii mapping to a keypad key 2023-09-29 20:00:50 -07:00
Mitchell Hashimoto
d90aba20fe Merge pull request #592 from mitchellh/gtk-desktop
apprt/gtk: default working-directory to home if launched from desktop
2023-09-29 16:03:20 -07:00
Mitchell Hashimoto
d03083c7f5 apprt/gtk: default working-directory to home if launched from desktop
Fixes #573
2023-09-29 15:52:45 -07:00
Mitchell Hashimoto
e12cc5f831 Merge pull request #591 from nfisher1226/desktop_categories
Add Categories entry to .desktop file so Linux desktops have a better
2023-09-29 15:30:28 -07:00
Nathan Fisher
865b43cd4d Add Categories entry to .desktop file so Linux desktops have a better
chance of placing the menu entry into an appropriate category
2023-09-29 18:24:48 -04:00
Mitchell Hashimoto
53a31da4a3 Merge pull request #589 from moderation/main
vendor: update harfbuzz
2023-09-29 15:20:58 -07:00
Mitchell Hashimoto
4de658aa2d Merge pull request #590 from rockorager/clear-sel
selection: only clear when keypress has utf8
2023-09-29 15:17:48 -07:00
Tim Culverhouse
488e6670c2 selection: only clear when keypress has utf8
Currently, the selection on a surface is cleared on any keypress that
generates a control sequence. For applications that enable kitty, this
can mean that every keypress clears the current selection thereby making
it impossible to copy text, since it will be cleared as soon as Control
is pressed. This can be very confusing to terminal users: some
applications I can shift+highlight and copy+paste, some I can't - and
unless I know the implementation of the application I won't know
why...very frustrating.

Only clear the selection when there is printable text, otherwise retain
the selection. From my testing, this makes text selection feel the same
between applications using kitty keyboard and applications that don't.
2023-09-29 16:07:21 -05:00
moderation
0df2d78093 vendor: update harfbuzz.
Signed-off-by: moderation <michael@sooper.org>
2023-09-29 14:05:42 -07:00
Mitchell Hashimoto
3bfcb010ef Merge pull request #588 from mitchellh/corrupt-lang
os: we need to copy the old lang pointer before we unsetenv
2023-09-29 13:20:31 -07:00
Mitchell Hashimoto
d878d16779 os: unset lang completely setlocale fails 2023-09-29 13:11:07 -07:00
Mitchell Hashimoto
38a7c2270b os: we need to copy the old lang pointer before we unsetenv 2023-09-29 12:56:43 -07:00
Mitchell Hashimoto
071a53bb33 Merge pull request #585 from mikdusan/fullscreen
macos: adjust fullscreen frame height for notch
2023-09-29 12:06:52 -07:00
Mitchell Hashimoto
f386f12e8a macos: safeAreaInsets.top includes menu 2023-09-29 12:05:24 -07:00
Michael Dusan
1f30e4e2ed macos: adjust fullscreen frame height for notch
The macOS desktop menu-bar grows in total height by adding extra padding
to deal with the physical notch found on various MacBook displays.

When config `macos-non-native-fullscreen = visible-menu` we apply
`safeAreaInsets.top` to reduce frame height.
2023-09-29 12:00:11 -07:00
Mitchell Hashimoto
1f5518cd83 Merge pull request #587 from mitchellh/patrickf/document-font-config
Improve docs on font configuration
2023-09-29 11:57:44 -07:00
Mitchell Hashimoto
7bbe669641 Merge pull request #578 from rockorager/dev
Kitty keyboard improvements
2023-09-29 11:56:34 -07:00
Mitchell Hashimoto
a2e2889f2b input: make Key ascii functions comptime-generated 2023-09-29 11:54:05 -07:00
Patrick Fong
741606a7ab fix grammar 2023-09-29 11:44:32 -07:00
Patrick Fong
d832507644 improve docs on font config 2023-09-29 11:42:49 -07:00
Mitchell Hashimoto
12f355ebe0 Merge branch 'esc-utf8' 2023-09-29 08:39:01 -07:00
Mitchell Hashimoto
a8aef28a02 Merge pull request #581 from mitchellh/curtbushko/initial-windows-build
Inital windows CI support
2023-09-29 08:37:48 -07:00
Tim Culverhouse
11cb6824cd input: don't ESC prefix non-ascii characters
User input withe Alt modifier is typically ESC prefixed. Escape
prefixing a non-ascii character can cause bugs in some applications. For
example in bash, emitting an Alt+ф allows the user to backspace one
character into the prompt. This can be repeated multiple times.

When a character is outside the ASCII range (exclusive of 0x7F, this is
handled as a control sequence), print the character as is, with no
prefix.
2023-09-29 08:35:21 -07:00
Curt Bushko
71d14f5dff create script and dump logs 2023-09-29 10:41:28 -04:00
Tim Culverhouse
fb649e689d input(kitty): fix reporting of alternate keys
Fix reporting of alternate keys when using the kitty protocol. Alternate
keyboard layouts were failing to report the "base layout" key. This
implementation now matches kitty's output 1:1, and has some added unit
tests for cyrillic characters.

This also fixes a bug where a caps_lock modified key would report the
shifted key as well. The protocol explicitly requires that shifted keys
are only reported if the shift modifier is true.
2023-09-29 06:37:08 -05:00
Tim Culverhouse
4f2d67d8f3 gtk(input): fix value used for lowercase lower_unicode
When converting keyval to the unshifted version, gdk_keyval_to_lower
returns a keyval type, not a unicode value. Convert this to unicode
before assigning to keyval_unicode_unshifted.

This fixes a bug where the incorrect keycode is sent in alternate
layouts with kitty keyboard on linux.
2023-09-29 06:36:03 -05:00
Mitchell Hashimoto
3ef67fe025 Merge pull request #580 from mitchellh/scroll-offset-mess
terminal: scroll region scroll up copied the wrong length of data under the right circumstance
2023-09-28 21:54:28 -07:00