okraits/j4-make-config

[feature] get current theme

Closed this issue · 3 comments

Hello,

I use j4-make-config (great tool) in a couple of scripts, and I'd like the script to find the theme name of the current config before recalling j4-make-config (in order to run other stuffs associated to that theme (Xresources, vimrc, fehbg).

Could you add a function to get this information easily? eg

$ j4-make-config -c    #  or --current
solarized-dark

Thank you!

Since commit 0e330cf, j4-make-config stores the most recently used commandstring in the file $HOME/.j4-make-config.rc. So if you executed j4-make-config as this:

j4-make-config tango

You can then get the theme name with:

cut -d ' ' -f 2 $HOME/.j4-make-config.rc

Output then: tango

Is that what you want?

Yes! I had to change my script a bit, and use cut -d '' -f 3 , and it works :) Thank you very much!

You're welcome :)