Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A --config option #510

Open
jzbor opened this issue Jul 14, 2021 · 5 comments
Open

A --config option #510

jzbor opened this issue Jul 14, 2021 · 5 comments

Comments

@jzbor
Copy link

jzbor commented Jul 14, 2021

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...

@JoseExposito
Copy link
Owner

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.

@jzbor
Copy link
Author

jzbor commented Jul 15, 2021

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...

@JoseExposito
Copy link
Owner

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.

@jzbor
Copy link
Author

jzbor commented Jul 15, 2021

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...

@dreirund
Copy link

dreirund commented Oct 19, 2021

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.".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants