<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ghostty.git/src/termio/stream_handler.zig, branch 1.1.x</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/'/>
<entry>
<title>termio: prevent responses to non-query OSC 21 sequences</title>
<updated>2025-03-23T21:18:13+00:00</updated>
<author>
<name>Tim Culverhouse</name>
<email>tim@timculverhouse.com</email>
</author>
<published>2025-02-15T00:55:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=196bc55757f4d32dd58fb133dda2253d891511e4'/>
<id>196bc55757f4d32dd58fb133dda2253d891511e4</id>
<content type='text'>
The Ghostty implementation of OSC 21 (Kitty color protocol) currently
responds to *all* OSC 21 sequences. It should not respond to a set, nor
a reset command. Fix the implementation so that we only respond if a
query was received.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Ghostty implementation of OSC 21 (Kitty color protocol) currently
responds to *all* OSC 21 sequences. It should not respond to a set, nor
a reset command. Fix the implementation so that we only respond if a
query was received.
</pre>
</div>
</content>
</entry>
<entry>
<title>renderer: track if fg/bg/cursor color is explicitly set by an OSC</title>
<updated>2024-12-27T02:18:45+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2024-12-27T00:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=eef9664ef831c8fb3a0b259a2325cef01a774e23'/>
<id>eef9664ef831c8fb3a0b259a2325cef01a774e23</id>
<content type='text'>
The renderer must track if the foreground, background, and cursor colors
are explicitly set by an OSC so that changes are not overridden when the
config file is reloaded.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The renderer must track if the foreground, background, and cursor colors
are explicitly set by an OSC so that changes are not overridden when the
config file is reloaded.
</pre>
</div>
</content>
</entry>
<entry>
<title>termio: fixes to kitty color reporting</title>
<updated>2024-11-26T15:01:31+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2024-11-26T14:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=2cbc2833d10046333b698d1caa601bc7ef85de98'/>
<id>2cbc2833d10046333b698d1caa601bc7ef85de98</id>
<content type='text'>
The kitty color report response is an OSC, not a CSI, so change `[` to
`]`. Colors which are unset should be reported with `{key}=`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kitty color report response is an OSC, not a CSI, so change `[` to
`]`. Colors which are unset should be reported with `{key}=`.
</pre>
</div>
</content>
</entry>
<entry>
<title>termio: track whether fg/bg color is explicitly set</title>
<updated>2024-11-24T01:48:24+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2024-11-23T23:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=4042041b61314d165187b2651b47b335a6e3badb'/>
<id>4042041b61314d165187b2651b47b335a6e3badb</id>
<content type='text'>
Make the foreground_color and background_color fields in the Terminal
struct optional values so that we can determine if a foreground or
background color was explicitly set with an OSC 10 or OSC 11 sequence.
This makes the logic a bit simpler to reason about (i.e.
`foreground_color` is now always "the color set by an OSC 10 sequence"
while `default_foreground_color` is always "the color set by the config
file") and also fixes an issue where an OSC 10 or OSC 11 query would not
report the correct color after a config update changed the foreground or
background color.

The `cursor_color` field was already optional, with the same semantics
(it is only non-null when explicitly set with an OSC 12) so this brings
all three of these fields into alignment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the foreground_color and background_color fields in the Terminal
struct optional values so that we can determine if a foreground or
background color was explicitly set with an OSC 10 or OSC 11 sequence.
This makes the logic a bit simpler to reason about (i.e.
`foreground_color` is now always "the color set by an OSC 10 sequence"
while `default_foreground_color` is always "the color set by the config
file") and also fixes an issue where an OSC 10 or OSC 11 query would not
report the correct color after a config update changed the foreground or
background color.

The `cursor_color` field was already optional, with the same semantics
(it is only non-null when explicitly set with an OSC 12) so this brings
all three of these fields into alignment.
</pre>
</div>
</content>
</entry>
<entry>
<title>mode 2031 should send updates on any color palette change</title>
<updated>2024-11-22T21:14:12+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2024-11-22T21:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=1c6adf4065ccc019aa803dbf53c732097cacff49'/>
<id>1c6adf4065ccc019aa803dbf53c732097cacff49</id>
<content type='text'>
Related #2755

From the mode 2031 spec[1]:

&gt; Send CSI ? 2031 h to the terminal to enable unsolicited DSR (device status
&gt; report) messages for color palette updates and CSI ? 2031 l respectively to
&gt; disable it again.
&gt;
&gt; The sent out DSR looks equivalent to the already above mentioned. This
&gt; notification is not just sent when dark/light mode has been changed by the
&gt; operating system / desktop, but also if the user explicitly changed color
&gt; scheme, e.g. by configuration.

My reading of this paired with the original discussion is that this is
meant to be sent out for anything that could possibly change terminal
colors.

Previous to this commit, we only sent out the DSR when the actual system
light/dark mode changed. This commit changes it to send out the DSR on
any operation that _may_ change the terminal colors.

[1]: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/#example-source-code
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related #2755

From the mode 2031 spec[1]:

&gt; Send CSI ? 2031 h to the terminal to enable unsolicited DSR (device status
&gt; report) messages for color palette updates and CSI ? 2031 l respectively to
&gt; disable it again.
&gt;
&gt; The sent out DSR looks equivalent to the already above mentioned. This
&gt; notification is not just sent when dark/light mode has been changed by the
&gt; operating system / desktop, but also if the user explicitly changed color
&gt; scheme, e.g. by configuration.

My reading of this paired with the original discussion is that this is
meant to be sent out for anything that could possibly change terminal
colors.

Previous to this commit, we only sent out the DSR when the actual system
light/dark mode changed. This commit changes it to send out the DSR on
any operation that _may_ change the terminal colors.

[1]: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/#example-source-code
</pre>
</div>
</content>
</entry>
<entry>
<title>termio: change all sizes to the new size type</title>
<updated>2024-11-14T21:31:10+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2024-11-14T21:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=90c59f2462d4a2e43456b865646ac6b25d243380'/>
<id>90c59f2462d4a2e43456b865646ac6b25d243380</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>terminal: OSC7 with empty URL resets the pwd to nil</title>
<updated>2024-11-13T21:43:49+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2024-11-13T21:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=e225eb9eff5dfa7138ebe3a0778dd5e89fc0ca94'/>
<id>e225eb9eff5dfa7138ebe3a0778dd5e89fc0ca94</id>
<content type='text'>
When an empty string is given to OSC7, the pwd is reset to nil (as if
the terminal never received a pwd report to begin with). This is
analogous to how OSC0/2 reset the title to nil when given an empty
string.

This is practically useful for macOS because it allows our proxy icon to
also be reset instead of being stuck on the last known path.

This breaks from any known terminal behavior. As far as I can find, this
is totally unspecified so we're somewhat free to do what we want. I
don't think any terminal programs depend on this behavior, so I think
it's safe to change it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an empty string is given to OSC7, the pwd is reset to nil (as if
the terminal never received a pwd report to begin with). This is
analogous to how OSC0/2 reset the title to nil when given an empty
string.

This is practically useful for macOS because it allows our proxy icon to
also be reset instead of being stuck on the last known path.

This breaks from any known terminal behavior. As far as I can find, this
is totally unspecified so we're somewhat free to do what we want. I
don't think any terminal programs depend on this behavior, so I think
it's safe to change it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #2662 from ghostty-org/push-zzpqurznxmlq</title>
<updated>2024-11-13T21:37:04+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2024-11-13T21:37:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=edfef1c8dfcb5ad350f51235465af3cc2628924a'/>
<id>edfef1c8dfcb5ad350f51235465af3cc2628924a</id>
<content type='text'>
pwd changed apprt action, macOS app sets proxy icon based on this</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pwd changed apprt action, macOS app sets proxy icon based on this</pre>
</div>
</content>
</entry>
<entry>
<title>apprt: support a pwd change action</title>
<updated>2024-11-13T20:29:30+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2024-11-13T20:28:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=3ca246ceb931fd39c9b8112a46e188eb3f5028ec'/>
<id>3ca246ceb931fd39c9b8112a46e188eb3f5028ec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>termio: handle empty titles (OSC 0/2)</title>
<updated>2024-11-13T20:12:43+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2024-11-13T20:10:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=067a36d67c4deac14d8e973217bedf4129a8e7a9'/>
<id>067a36d67c4deac14d8e973217bedf4129a8e7a9</id>
<content type='text'>
Fixes #2651

First, our OSC parser didn't allow blank OSC 0 or 2 requests. This
should be allowed and this fixes that with a test.

Second, it seems many terminals (iTerm2, Kitty) treat setting a blank
title as resetting to whatever the default title is rather than
explicitly setting it as blank. If a program wants a title to be blank
they should send a single space. This commit follows this behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #2651

First, our OSC parser didn't allow blank OSC 0 or 2 requests. This
should be allowed and this fixes that with a test.

Second, it seems many terminals (iTerm2, Kitty) treat setting a blank
title as resetting to whatever the default title is rather than
explicitly setting it as blank. If a program wants a title to be blank
they should send a single space. This commit follows this behavior.
</pre>
</div>
</content>
</entry>
</feed>
