3816 Commits

Author SHA1 Message Date
Mitchell Hashimoto
9be9f11586 Merge pull request #854 from rockorager/palette-fix
terminal: initialize active palette with configured palette
2023-11-10 06:42:22 -08:00
Tim Culverhouse
2525382b27 terminal: initialize active palette with configured palette
PR #850 introduced several color palette OSC setting and querying
sequencing. In doing so, an active palette was introduced to enable
resetting back to the default (configured) palette. The active palette
was not initialized with the configured palette, thus any configured
theme by the terminal was not set at launch.

This behavior can be confirmed thanks to PR #852, which resets the
active palette on configuration reload. To observe the behavior:

1. Set the configured palette to something other than the default
2. Open ghostty. Observe the color palette
3. Reload the configuration
4. Press enter for a new shell prompt. Note the palette has changed

This patch sets the configured palette as the active palette at
initialization.
2023-11-10 08:08:49 -06:00
Mitchell Hashimoto
5514d0a0c2 Merge pull request #852 from gpanders/palette-reset
core: update active palette on config reload
2023-11-09 17:18:58 -08:00
Gregory Anders
998d7668e9 core: update active palette on config reload
When the config is changed, update the active palette in addition to the
default palette, but only those colors which have not been changed with
OSC 4.
2023-11-09 19:06:58 -06:00
Mitchell Hashimoto
db868df50c Merge pull request #841 from pjz/cfgpath
config: make config-file names resolve relative to the config dir
2023-11-09 16:55:37 -08:00
Mitchell Hashimoto
a9761728e9 config: comments 2023-11-09 16:52:57 -08:00
Mitchell Hashimoto
85fea9d5ee config: resolve file paths relative to their loaded file 2023-11-09 15:53:15 -08:00
Mitchell Hashimoto
61f37e5049 Merge pull request #850 from gpanders/osc4
Fully implement OSC 4, 10, 11, 12, 104, 110, 111, and 112
2023-11-09 15:16:08 -08:00
Mitchell Hashimoto
53a5734d09 terminal: change mask from u256 to StaticBitSet 2023-11-09 15:14:33 -08:00
Mitchell Hashimoto
64eb8c0d0f Merge pull request #835 from Raiden1411/feat/glfw
glfw: add `fullscreen` and `toggleFullscreen` support
2023-11-09 15:00:33 -08:00
Mitchell Hashimoto
126f02187a apprt/glfw: minor stylistic things 2023-11-09 15:00:16 -08:00
Gregory Anders
171292a063 core: implement OSC 12 and OSC 112 to query/set/reset cursor color 2023-11-09 16:21:07 -06:00
Gregory Anders
33753f59c8 core: implement OSC 104, 110, and 111 to reset colors 2023-11-09 16:17:21 -06:00
Gregory Anders
1c0b79c40f core: separate default colors from modifiable colors
Default colors are those set by the user in the config file, or an
actual default value if unset. The actual colors are modifiable and can
be changed using the OSC 4, 10, and 11 sequences.
2023-11-09 14:08:14 -06:00
Gregory Anders
49feaedef6 core: move color parsing functions into RGB namespace 2023-11-09 14:06:06 -06:00
Mitchell Hashimoto
c2086c4d18 Merge pull request #851 from mitchellh/gtk-tab-width
apprt/gtk: ensure equal tab width, truncate with ellipses
2023-11-09 11:16:04 -08:00
Mitchell Hashimoto
8c59d1176e apprt/gtk: ensure equal tab width, truncate with ellipses
Fixes #607
2023-11-09 11:12:55 -08:00
Mitchell Hashimoto
a4ca581219 font: load valid union field for loaded deferred fonts 2023-11-09 11:06:58 -08:00
Gregory Anders
006e93bd08 core: implement setting colors with OSC 4, 10, and 11 2023-11-09 11:59:20 -06:00
Gregory Anders
3b7e21df26 termio: update foreground and background color on config change 2023-11-09 11:49:16 -06:00
Gregory Anders
f397353282 core: implement querying with OSC 4 2023-11-09 11:49:06 -06:00
Mitchell Hashimoto
6bf9c05f2a Merge pull request #847 from mitchellh/font-preso
font: if VS15/16 not specified, prefer any presentation in explicitly requested font
2023-11-08 22:12:32 -08:00
Mitchell Hashimoto
3d8dd0783a font: if VS15/16 not specified, prefer any presentation in explicit font
Fixes #845

Quick background: Emoji codepoints are either default text or default
graphical ("Emoji") presentation. An example of a default text emoji
is ❤. You have to add VS16 to this emoji to get: ❤️. Some font are
default graphical and require VS15 to force text.

A font face can only advertise text vs emoji presentation for the entire
font face. Some font faces (i.e. Cozette) include both text glyphs and
emoji glyphs, but since they can only advertise as one, advertise as
"text".

As a result, if a user types an emoji such as 👽, it will fallback to
another font to try to find a font that satisfies the "graphical"
presentation requirement. But Cozette supports 👽, its just advertised
as "text"!

Normally, this behavior is what you want. However, if a user explicitly
requests their font-family to be a font that contains a mix of test and
emoji, they _probably_ want those emoji to be used regardless of default
presentation. This is similar to a rich text editor (like TextEdit on
Mac): if you explicitly select "Cozette" as your font, the alien emoji
shows up using the text-based Cozette glyph.

This commit changes our presentation handling behavior to do the
following:

  * If no explicit variation selector (VS15/VS16) is specified,
    any matching codepoint in an explicitly loaded font (i.e. via
    `font-family`) will be used.

  * If an explicit variation selector is specified or our explicitly
    loaded fonts don't contain the codepoint, fallback fonts will be
    searched but require an exact match on presentation.

  * If no fallback is found with an exact match, any font with any
    presentation can match the codepoint.

This commit should generally not change the behavior of Emoji or VS15/16
handling for almost all users. The only users impacted by this commit
are specifically users who are using fonts with a mix of emoji and text.
2023-11-08 21:55:20 -08:00
Mitchell Hashimoto
4a89d4a8b9 Merge pull request #846 from gpanders/terminfo-focus
terminfo: add entries for focus reporting
2023-11-08 13:42:59 -08:00
Gregory Anders
1aef1f0049 terminfo: add entries for focus reporting
These sequences have been used "informally" forever, and until recently
mode 1004 was included in Xterm's XM (enable mouse reporting) sequence.
But as of ncurses 6.4 patch 20231028, focus reporting mode is removed
from XM and added to new fe and fd capabilities. Xterm also includes
definitions for the actual focus events ("kxIN" and "kxOUT"), so include
those too.
2023-11-08 15:05:34 -06:00
Patrick Fong
42c6381683 reorder goals by order of importance 2023-11-08 09:46:31 -08:00
Mitchell Hashimoto
244cc6b457 Merge pull request #842 from NgoHuy/fix-#727
Add keymap for some kp_*
2023-11-08 09:38:09 -08:00
Mitchell Hashimoto
0c695f3510 apprt/gtk: add comment about key aliases 2023-11-08 09:37:53 -08:00
Mitchell Hashimoto
1011cb3f1c Merge pull request #844 from gpanders/tab-label-constraints
macos: ensure tab labels are always visible
2023-11-08 09:22:14 -08:00
Paul Jimenez
b8bfb66ad8 config: support nested/recursive config-file keys 2023-11-08 09:57:34 -05:00
Gregory Anders
dffb5e9f15 macos: ensure tab labels are always visible
This tells AppKit to give the tab labels higher priority than the tab
titles. When the tabs become small, this causes the tab title text to be
truncated instead of dropping the tab label.

Fixes: https://github.com/mitchellh/ghostty/issues/843
2023-11-08 08:48:20 -06:00
Severus
3497fec7df Add keymap for KP_*
We miss some kp_* like: kp_home, kp_end, kp_up, kp_down, kp_page_up, kp_page_down, kp_left, kp_right.
Then we map those keys in gtk runtime.
2023-11-08 14:43:00 +07:00
Paul Jimenez
3113f9d8af config: make config-file names resolve relative to the config dir 2023-11-08 02:19:12 -05:00
Mitchell Hashimoto
e542215c21 macos: update xib version from xcode 2023-11-07 19:26:52 -08:00
Mitchell Hashimoto
d0666e523f config: packed struct fields can clone directly via copy 2023-11-07 17:09:03 -08:00
Mitchell Hashimoto
bb39bab5dc Merge pull request #839 from rockorager/no-cursor
shell-integration: implement "no-cursor" option
2023-11-07 17:07:09 -08:00
Mitchell Hashimoto
18c852d47c config: switch shell-integration-features 2023-11-07 17:05:09 -08:00
Mitchell Hashimoto
8cd3b65d0a config: packed struct of bools supported as config field 2023-11-07 15:59:56 -08:00
Mitchell Hashimoto
1a92b97c52 Merge pull request #838 from gpanders/equalize-splits
macos: add key binding for equalizing split sizes
2023-11-07 15:27:04 -08:00
Mitchell Hashimoto
d482fed7f2 simplify some swift 2023-11-07 15:26:41 -08:00
Tim Culverhouse
4fac674016 shell-integration: implement "no-cursor" option
Implement a "no-cursor" option for shell integration. This option acts
like "detect" but doesn't set the cursor shape.
2023-11-07 16:31:07 -06:00
Gregory Anders
cd01340cce macos: add key binding for equalizing split sizes 2023-11-07 16:23:28 -06:00
Patrick Fong
cd4e4d9e30 Prettier version should match Nix's 2023-11-07 13:47:11 -08:00
Mitchell Hashimoto
36dd5ef4ee Merge pull request #837 from mitchellh/utf8proc-kill
replace utf8proc with ziglyph
2023-11-07 13:26:12 -08:00
Mitchell Hashimoto
4781a83e4a replace utf8proc with ziglyph 2023-11-07 13:17:56 -08:00
Patrick Fong
1f6d35fcb5 pushes boundaries, not can push boundaries 2023-11-07 12:09:19 -08:00
Patrick Fong
e131fefbe5 shorten text that is hyperlinked 2023-11-07 12:05:57 -08:00
Patrick Fong
6fc41695d9 list terminal inspector as key feature 2023-11-07 12:05:00 -08:00
Patrick Fong
ca961894f2 link to roadmap and status 2023-11-07 11:41:22 -08:00
Patrick Fong
22bb2444e8 rewrite about 2023-11-07 11:34:16 -08:00