Write selected theme from +list-themes preview to disk.
#8145
Replies: 2 comments 5 replies
-
|
I feel like this isn't much better than the status quo since the user has to manually link a configuration file anyways. My suggestion would be to trigger a pop-up dialog asking the user if they would like the theme chooser to edit their config file automatically, or to open their $EDITOR so they can add the line themselves (maybe paste the line into the clipboard too so people can paste the line in one key). |
Beta Was this translation helpful? Give feedback.
-
|
I'd like something a little more unix: instead of directly modifying a file, write the theme name or path to stdout when the user exits the theme previewer. The instructions ("To apply this theme...") can be written to stderr. This arrangement makes it easier to use the theme finder in a script. User can take the output and write it to a file (satisfies @jcollie's use case), or they could use it differently. Personally I want to use it to launch a new Ghostty terminal with a specific theme without updating my global configuration: # Select a theme
theme=$(ghostty +list-themes)
# Launch a new Ghostty
nohup ghostty --theme="$theme" </dev/null >/dev/null 2>&1 &
disown
echo "Launched Ghostty with theme: $theme" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Add a keybind to the
+list-themespreview that would create/overwrite a file called~/.config/ghostty/config.theme.autoor something like that. Contents would be:Then the user could add
config-file = ?config.theme.autoto their config file to load the theme that they chose in the preview.Bonus points: allow the user to chose different light and dark themes.
Beta Was this translation helpful? Give feedback.
All reactions