I seem to remember that before, there was a global gmt.conf, somewhere on the filesystem, that you could make changes to, and the changes would be reflected in all gmt plots created.
This seems to not be the case anymore. So, if I want to, say, have GMT_THEME=minimal as default, and applied to all plots, where would I put this?
Gmt first looks in the current directory, then home directory, for a gmt.conf file. So a local file will override it but if you have nothing in the local directory then the home directory one should be read.
execute gmt set every single time, for every plot to get a gmt.conf in the local dir (which I very frequently do) and
do not want a gmt.conf laying around in my home directory
What are my alternatives?
I could see a use in being able to define e.g. an environment variable, GMT_CONF, where one could store the path to a gmt.conf that is customized. Then I can store my gmt.conf in some kind of .dotfolder, hidden from view.
Actually, that is what I often do as well, in addition to gmt set.
What about
also accepting .gmt.conf (i.e. invisible dotfile, as opposed to gmt.conf) in $HOME? Having a visible file in ~ that will be machine read 99.9% of the time is too intrusive in my opinion, and/or
create an environment variable, as mentioned above?
You can also put your gmt.conf in the GMT user directory ~/.gmt where it is hidden with all the other junk. Perhaps that is better. In modern mode each session will be initiated with those settings unless you pass -C to gmt begin.
Having some trouble doing this.
See script below with comments
# do this in ~
cd ~
# make gmt.conf in ~/.gmt with GMT_THEME=minimal
gmt defaults | sed 's/classic/minimal/g' > ~/.gmt/gmt.conf
# gmt defaults now reads ~/.gmt/gmt.conf since GMT_THEME is set to minimal
gmt defaults | grep minimal
GMT_THEME = minimal
# I expect a minimal themed plot, but getting classic
gmt pscoast -RNO -W -Bxafg -Byafg -B+t"Title"+s"Subtitle" -JM10c -png gmt-conf-test
Better, but now run into an issue that the frame is classic (but text seems to be is correct with minimal-theme font);
# do this in ~
cd ~
# make gmt.conf in ~/.gmt with GMT_THEME=minimal
gmt defaults | sed 's/classic/minimal/g' > ~/.gmt/gmt.conf
# gmt defaults now reads ~/.gmt/gmt.conf since GMT_THEME is set to minimal
gmt defaults | grep minimal
# I expect a minimal themed plot, but getting classic
gmt begin gmt-conf-test png
gmt pscoast -RNO -W -Bxafg -Byafg -B+t"Title"+s"Subtitle" -JM10c
gmt end show