[PR #9845] [CLOSED] A "_random_" color scheme option. Any new window chooses randomly from those in settings.schemes. #27791

Open
opened 2026-01-31 09:24:15 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9845
Author: @hessedoneen
Created: 4/15/2021
Status: Closed

Base: mainHead: issue-9422


📝 Commits (5)

  • 587e70e Comment indicating where implementing issue
  • 1dea742 trying to find where error handling
  • efa6160 just added L to all strings
  • b2f1ec7 unfound color scheme warning still up?
  • 9472143 removing all warnings in file does not stop popup

📊 Changes

4 files changed (+81 additions, -42 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+10 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+51 -42)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+7 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalSettings.cpp (+13 -0)

📄 Description

Summary of the Pull Request

If the user sets schema = "_random", then every new terminal window they open will have a random color scheme applied. This color scheme is chosen from existing schemes in settings.schemes (as compared to colors/fonts being randomly generated).

Detailed Description of the Pull Request / Additional comments

Pull request will pass all of the following tests:

  1. "_random" chooses from both default and user added schemes (also ensure last or first never gets ignored)
  2. "_random" will work even if there are only default schemes
  3. "_random" will work no matter how many (or which) default schemes there are (will not hard code in Campbell/Vintage/Tango or anything)
  4. If someone tries to add a new scheme named "_random" then their new random scheme will take precedence (following current convention where if you make a new "Campbell" scheme, then the new scheme will show up instead.

Validation Steps Performed

N/A yet


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9845 **Author:** [@hessedoneen](https://github.com/hessedoneen) **Created:** 4/15/2021 **Status:** ❌ Closed **Base:** `main` ← **Head:** `issue-9422` --- ### 📝 Commits (5) - [`587e70e`](https://github.com/microsoft/terminal/commit/587e70e838b616f4152330a08980096afdaebef0) Comment indicating where implementing issue - [`1dea742`](https://github.com/microsoft/terminal/commit/1dea742433f070a09f952cef379e4e8c92f1194d) trying to find where error handling - [`efa6160`](https://github.com/microsoft/terminal/commit/efa6160baa2d0d452e346aed3b7abb177c8a920e) just added L to all strings - [`b2f1ec7`](https://github.com/microsoft/terminal/commit/b2f1ec7c061c3155a38b68f6d0429e87c1b9416f) unfound color scheme warning still up? - [`9472143`](https://github.com/microsoft/terminal/commit/947214349b930348dc078bb1111c2d513756a380) removing all warnings in file does not stop popup ### 📊 Changes **4 files changed** (+81 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+10 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+51 -42) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+7 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettings.cpp` (+13 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request If the user sets schema = "\_random", then every new terminal window they open will have a random color scheme applied. This color scheme is chosen from existing schemes in settings.schemes (as compared to colors/fonts being randomly generated). <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Pull request will pass all of the following tests: 1. "\_random" chooses from both default and user added schemes (also ensure last or first never gets ignored) 2. "\_random" will work even if there are only default schemes 3. "\_random" will work no matter how many (or which) default schemes there are (will not hard code in Campbell/Vintage/Tango or anything) 4. If someone tries to add a new scheme named "\_random" then their new random scheme will take precedence (following current convention where if you make a new "Campbell" scheme, then the new scheme will show up instead. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed N/A yet <!-- Please review the items on the PR checklist before submitting ## PR Checklist * [X] Closes #9422 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #9422 --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:15 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27791