feat: detect first-run terminal theme#5385
Conversation
|
I think this query should live in
Suggested shape:
That way late terminal replies are still removed from the input stream without needing a long-lived |
|
Oh, and please also test this in other terminals. I can't merge this before it's not tested in at least Kitty, Alacritty, Ghostty, Terminal.app, iTerm2, Windows Terminal, and Ubuntu's default terminal |
|
And we should rename |
02ddb13 to
9323edb
Compare
|
Thank you so much for the review, this was super helpful. I've pushed a new attempt now trying to address your suggestions, and have tested on all the mentioned terminals on macOS. Will get someone to test on a Windows machine and a Ubuntu machine. |
|
I had to move RgbColor from pi-coding-agent to pi-tui - hope you agree with that being in this commit. |
9323edb to
5a8316a
Compare
|
Looking good! Once we have Windows Terminal and Ubuntu tested, you can merge this. |
Sure, I'd like to help out! However, I have some other commitments at the moment and will need about 2–3 days to get to this. If this issue is urgent, you might want to look for someone else to assist in the meantime. |
|
hey, stupid question from the side lines: Wouldn't it be simpler to have just one default pi theme, that uses the ANSI color 16 index palette, so that it gets its colors from the terminal? I attached my personal theme as reference. It seamlessly switches dark/light, whenever my terminal (wezterm) changes its palette. I am curious, there must be trade-offs here, that I am not aware of. |
Thanks for the quick response! So far I haven't found anyone else to do it, so I'm totally fine waiting a few days! |
Hey @windedge did you have a chance to test this yet? 🤩 |
We want users to get the first Pi theme to match their terminal (light/dark), so detect that by querying the terminal with OSC, and persist it to settings.
To test, check out the branch, set your terminal to a light or dark theme, and do
PI_CODING_AGENT_DIR=$(mktemp -d) ./pi-test.sh(this works on macOS, should work on Ubuntu, and on a Windows machine with WSL). Then to verify go to/settingsand search forthemeto see what the detected theme was for the fresh Pi config.Tested on