Closed HugoNikanor closed 3 years ago
This looks like a workaround for something, iirc termite supports reloading of the config file.
@jelly This is separate from reloading config files. It instead allows the user to supplement an additional config file which can override default. I do agree that this might be a bit of a workaround-ish solution.
This should be documented in the man page in case this gets merged.
I added a note in the appropriate man page.
However, I would still like to see some further thoughts on a feature like this.
@polyzen I also like that approach, but @thestinger was was apparently against without giving a reason.
This is already possible with the present -c option. termite(1):
-c, --config=CONFIG Specify a path to an alternative config file to use.
If it's something else you are asking for - please elaborate.
@ifohancroft I'm well aware of the -c
flag. My use case for this is to have multiple really similar configs (which I can choose between with the -c
flag) and then some minor amendments I can load with the -C
flag. I currently use it to create a new instance with a different font but all other settings intact.
@HugoNikanor I am sorry. I misunderstood your use case. I get now what you are trying to do and I think the idea is cool. I am not sure about the implementation though. I am thinking a cooler or more elegant way would be to either present what's in the config, also as a runtime option that takes precedence over the config or maybe modifying how -c works, so instead of just loading what's provided by -c, it also loads the default config file and what's present in both the default one and in the -c one, the -c one overrides it.
@ifohancroft Your second idea sounds like making the -c
flag act as my -C
flag. I would like to think that it's a bad idea, since I excpect -c /dev/null
to load default setting. That however doesn't work with the error /dev/null parsing failed: Not a regular file
. So it could be an idea.
Regarding your first idea. Do you mean something along the lines of -o options.font='Fira Mono 8'
?
@HugoNikanor Why would you expect -c /dev/null to load the default setting? Instead of passing /dev/null to -c, wouldn't it be better to just not specify -c? I mean, after all termite by default is looking in a specific dir for the default config file.
As for the first idea. Your idea to combine them under a single option is nice. Like -o options.font='Fire Mono 8'. I was thinking more like separate options: --font='Fire Mono 8' --color0='#000000', etc
The "default" with -c /dev/null
would be termites built in defaults,
NOT the users defaults. The idea being that /dev/null
is an empty
file, so no config would be loaded.
Individual flags for all options could work, but it becomes a problem
as soon as we have the same key in multiple sections, and it would
require a constant maintenance of another source of configs. -o
flags would allow parsing depending on what's allowed in our config
file.
-- Hugo Hörnquist On Tue, Oct 08, 2019 at 09:45:54AM -0700, IFo Hancroft wrote:
@HugoNikanor Why would you expect -c /dev/null to load the default setting? Instead of passing /dev/null to -c, wouldn't it be better to just not specify -c? I mean, after all termite by default is looking in a specific dir for the default config file.
As for the first idea. Your idea to combine them under a single option is nice. Like -o options.font='Fire Mono 8'. I was thinking more like separate options: --font='Fire Mono 8' --color0='#000000', etc
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/thestinger/termite/pull/671#issuecomment-539601945
This sounds a bit of an overkill. Also, I think Termite doesn't have built-in defaults and reads them from the config file. I think it would be sufficient to just read the default config, also of course, the current - c option to load an alternative config instead and options when running it like --color0, --color1, etc to override just the specified. The same can still be achieved this way.
Termite is obsolete. Please use Alacritty instead. See https://github.com/thestinger/termite#termite-is-obsoleted-by-alacritty for more details.
Allows '-C' flag to specify a config file which should take priority over already set config. Ideally multiple config files should be able to be loaded in this way. See this as more of a proof of concept.
I personally wants this to easily switch fonts without copying my whole config.