Change theme from Command Line?


#1

I want to create a bash script to change my themes from dark to light and vice versa but I can’t figure out how to change themes from the command line.

I’ve tried apm config edit which just hangs and doesn’t do anything. And the following all return undefined: app config get themes, apm config get core, apm config get *, apm config get "*", apm config get '*'

I realize I could do some fancy stuff (with grep or something) with the config.cson file but I’m guessing there’s an easier way?

Alternatively, is there a keybinding I could set up? I prefer not to use a package for this.


Also - how do I even view my config that shows in config.cson with an apm command?

Or is apm literally only for packages?


#2

apm config will only affect APM’s config. Its use is the same as npm config.

If you want to change a CSON file, the easiest way is to write a Node script that includes coffeescript to be able to read CSON into a JS object, which you will modify in the normal fashion, then use coffeescript to translate the output and write the file.


#3

¿How about having a script swap out config files with one another?


#4

The same device (a Node script) would be most appropriate for that, and you would have to have your alternative config.cson files organized somewhere they won’t get accidentally deleted.