lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.28k stars 161 forks source link

Add command-line option to use specific config file #251

Closed weyfonk closed 7 years ago

weyfonk commented 8 years ago

This is an attempt at providing a command-line option to use a custom config file when launching Tilda.

A new option can be called, either as -g or as --config-file and followed by a path, to specify a configuration file to use for a Tilda instance. If there is no file at the specified path, the default config file for the current instance is used.

Note that the -c flag suggested in TODO.md has been discarded as it is already used for --command, hence -g is used here instead, which of course can be changed.

This is obviously still experimental. Possible issues arise when several instances are launched using the same config file, causing keybindings to conflict between instances. A way to avoid this would be to keep track of which instance uses which config file, to make such a file unavailable for further instances. OTOH, sharing a config (or parts thereof) between instances could probably be useful in some cases. Anyway, I thought submitting this could be a nice way to gather feedback and ideas on what kind of behaviour we would like to see here.

thamma commented 7 years ago

Thank you very much for this contribution! A pity that this pull request is yet to be merged to master… I compiled tilda with your patch on my own and your feature works like a charm!

pik commented 7 years ago

Maybe -C instead of -g the later doesn't seem all that obvious (just a thought)?

thamma commented 7 years ago

That's why:

Usage:
  tilda [OPTION...]
...
  -c, --command              Run a command at startup
...
  -C, --config               Show Configuration Wizard