touchegg icon indicating copy to clipboard operation
touchegg copied to clipboard

A --config option

Open jzbor opened this issue 2 years ago • 5 comments

It would be really nice to have a --config option to specify configurations located somewhere else than the default config file. My personal use case for this would be different configs for different DEs/WMs on a single machine, but I can imagine there are lots of other use cases like testing etc.

Here is an example:

touchegg --config  .config/touchegg/touchegg-cinnamon.conf

Let me know what you think of it...

jzbor avatar Jul 14 '21 12:07 jzbor

The main issue I see is that Touché and GNOME Shell X11Gestures won't know which config should they use.

Also, how are you going to launch Touchégg on startup? Because the .desktop file path (usually /etc/xdg/autostart) is also common to all DE/WMs.

JoseExposito avatar Jul 15 '21 06:07 JoseExposito

I don't think it's an issue if Touche and GNOME Shell X11Gestures don't work with any config other than the default. They could use it to their advantage though, creating a separate config (e.g. ~/.config/touchegg/touchegg-touche.conf). Of course that would also require them to ship an additional desktop file with their config path as parameter.

Right now I mostly use a WM, which starts touchegg via shell command, so no desktop file required. Of course that only goes for customized WMs. For DEs (in my case Cinnamon) it's fine just to create your own desktop file if required. It's not hard to do and I also have created other desktop files for other personal scripts or daemons, etc. AFAIK most of the DEs support putting your own desktop files in ~/.local/share/applications/ or ~/.config/autostart/.

EDIT: I think you can also disable autostart desktop files in some DEs, so that way you can disable the default config...

jzbor avatar Jul 15 '21 09:07 jzbor

Right now I mostly use a WM, which starts touchegg via shell command [...] AFAIK most of the DEs support putting your own desktop files in ~/.local/share/applications/ or ~/.config/autostart/.

Yes, the issue is that, if you use 2 DEs, both of them will look into those folders and /etc. So, in order to switch between desktop file you'll have to use a small bash script or similar.

My point is, if you are already using a shell command to start Touchégg, why not creating a symbolic link so ~/.config/touchegg/touchegg.conf points to the right config instead of using a --config option?

I believe it won't make a huge difference on your side and the script should be pretty simple to put together. Let me know if that works for you.

JoseExposito avatar Jul 15 '21 15:07 JoseExposito

For my use case specifically it definitely makes sense, cause in my cases I am switching between DE and WM with one using a desktop file and one running from command line. Also having a script that symlinks the ~/.config/touchegg/touchegg.conf file is not only uglier in my opinion, but also doesn't allow me to have a real default configuration anymore. Another reason, why it makes sense imo is for testing new configs, but then again of course you could just copy around files for that.

Most other programs and daemons have that option even though they provide a desktop file. I agree, that it still might not work perfect with multiple DEs, because they depend on desktop files, but at least for window managers it is really a nice feature.

Anyway - I see why it might not be that easy to integrate into your argParser. I assume you do this as a private side-project, so I can understand, why you wouldn't want to waste too much time on a feature like this. I am unfortunately completely unfamiliar with CPP, but maybe I'll try anyways. Maybe you can keep the issue open as low-priority or backlog or something...

jzbor avatar Jul 15 '21 17:07 jzbor

I really second that request.

Regarding configuration GUIs not beeing able to know which config file to use: You could just have an "open" dialogue, where you select the file, and have a default preset.

Regarding

I don't think it's an issue if Touche and GNOME Shell X11Gestures don't work with any config other than the default. They could use it to their advantage though, creating a separate config (e.g. ~/.config/touchegg/touchegg-touche.conf).

That i would really like, because for now, it is really annoying that touche does silently overwrite my hand-made touchegg.conf, thereby removing everything it does not understand (and let it be comments), see Issue #48 for touche: "touche unconditionally overwrites existing touchegg.conf without warning.".

dreirund avatar Oct 19 '21 08:10 dreirund