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

Feature Request: Global Config for Every Tilda Instances #147

Open neizod opened 9 years ago

neizod commented 9 years ago

I usually doesn't need more than 2 instances of Tilda at once, but sometime I need more. Since I do customize a lot, It's kind of annoying to re-config with wizard window. I simply remember an instance number, close the wizard, and copy ~/.config/tilda/config_0 to the new instance. This way is not perfect since I need to look for some fields that need to be unique (key = "F<num>").

So I came up with an idea, why not make a global config file for every instances? Here's my proposed scheme:

File: ~/.config/tilda/global

tilda_config_version = "1.2.x"
font = "Dejavu Sans Mono 9"
x_pos = 0
... (and many more options) ...

File: ~/.config/tilda/config_0

tilda_config_version = "1.2.x"
key = "F1"

File: ~/.config/tilda/config_1

tilda_config_version = "1.2.x"
key = "F2"
x_pos = 683

Now, if Tilda instance number 0 is invoke, it will load config file from ~/.config/tilda/global first, then override every options that exist in ~/.config/tilda/global. The result is a terminal with Dejavu font appear on top-left of the screen

Same thing goes for instance number 1, but this time x_pos = 683 in ~/.config/tilda/config_1 will override x_pos = 0 in ~/.config/tilda/global. Here's the terminal will appear on top-center of the screen (assume the screen resolution is 1366x768).

Lastly, if a new instance of Tilda that have no config file yet -- instance number 2 here -- is invoke, a global config file will be loaded, and prompt user with the wizard like this:

 _______________________________
|________ Tilda 2 Config _______|                                          
|                               |
|    ... (other options) ...    |                                          
|                               |
| Font:  [  <inherit global>  ] |                                          
|                               |
|    ... (other options) ...    |
|_______________________________|

If user decide not to change any option, an empty config file1 ~/.config/tilda/config_2 will be created to suppress config wizard in the future.

But if there are changes -- for example, font change -- a config file ~/.config/tilda/config_2 would look like this:

tilda_config_version = "1.2.x"
font = "Liberation Mono 9"

What do you think?


note:

  1. don't know if real empty config file is valid since every instance need at lease one row: key = F<num>.
pik commented 9 years ago

The discussion here might be of interest: https://github.com/lanoxx/tilda/issues/125