Match the terminal's colours: auto from its background, and a terminal theme
auto now reads the background through OpenTUI's palette detector (OSC 11) and falls back to dark. The new terminal theme builds the palette from the detected background, foreground and ANSI colours, and shows in settings.
This commit is contained in:
1 parent
c1a7376aa8
commit
f18fc9c68d
7 files changed
+143
-12
No files matched your search
@@ -128,6 +128,17 @@ describe("palette and pickers", () => {
|
||||
expect(app.hints()).toStartWith("j/k threads");
|
||||
});
|
||||
|
||||
test("settings offer the terminal's own colours", async () => {
|
||||
const app = await open({ config: { theme: "light" } });
|
||||
await app.press("k", { ctrl: true });
|
||||
await app.type("settings");
|
||||
await app.press("return");
|
||||
const row = app.find("Colours");
|
||||
expect(app.frame()).toMatch(/Colours\s+light/);
|
||||
await app.click(row.x, row.y);
|
||||
expect(app.frame()).toMatch(/Colours\s+the terminal's own colours/);
|
||||
});
|
||||
|
||||
test(". opens the thread's actions, and choosing one runs it", async () => {
|
||||
const app = await open();
|
||||
await app.press(".");
|
||||
|
||||
Reference in new issue
Block a user