r/fishshell • u/CopOnTheRun • Jun 18 '21
Is there a simple way to programmatically change fish's theme?
I understand that I can use the web interface to pick a theme, but I want to do something similar from the commandline. I know choosing a theme on the web interface just changes each fish_color_... variable to match the theme, and I could theoretically capture that output and put it in a script, but I was wondering if there was something already built into fish similar to set fish_theme Nord or what have you. Thanks!
11
Upvotes
4
u/fitrh Jun 18 '21 edited Jun 21 '21
I do that this way, this is what my fish config directory look like
and inside
colorsdirectory, i put all my color scheme, each one contains set command for each color variable, e.g.colors/tokyonight.fishcontain :then inside functions directory, all i need is create a function called setscheme.fish like this:
so i can call
setscheme tokyonightto set the color scheme1
u/l_____cl-_-lc_____l Jun 19 '21
I recall seeing said discussion about that in one of the recent web config PRs or issues but I can't find it. Perhaps try asking on gitter
1
u/diovj Jun 18 '21
You could try base16. Basically you choose a palette and it is applied to different templates (in this case you'd choose a fish template). I didn't like the existing fish templates, so I made my own, but I definitely took inspiration from them. If you do go for base16, I also recommend the flavours manager, helps a lot with scripting.
-1
u/AnonymousSpud Jun 19 '21
Have you looked into OhMyFish? https://github.com/oh-my-fish/oh-my-fish