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

touche unconditionally overwrites existing touchegg.conf without warning. #48

Closed
dreirund opened this issue Oct 18, 2021 · 4 comments
Closed

Comments

@dreirund
Copy link

dreirund commented Oct 18, 2021

Describe the bug

When I change anything in touche, an existing touchegg.conf is overwritten without warning. Entries not understood by touche are lost.

Expected behaviour

Ask before overwriting an existing configuration file; keep non-understood entries or ask what to do with them; offer a side-by-side-view mode of original file and file that touche would write.

Actual behaviour

When I change anything in touche, an existing touchegg.conf is overwritten without warning. Entries not understood by touche are lost.

Logs

  • Touché version: 2.0.0
  • Touchégg version: 2.0.11
  • Operating System: Ubuntu, Fedora, Arch Linux...: Artix GNU/Linux
  • Desktop Environment: Gnome, KDE, Xfce...: No full Desktop environment. Just plain window manager (xfwm4) and taskbar (xfce4-taskbar), software to autostart started via ~/.xinitrc.
  • Installation method: Flatpak, Debian package...: Arch Linux AUR package touchegg-nosystemd.
@JoseExposito
Copy link
Owner

Hi and thanks for your bug report,

By design, Touché keeps only valid configuration in the config file. What's the use case for this feature? What kind of non working configuration do you want to keep in your configuration file?

@dreirund
Copy link
Author

dreirund commented Oct 19, 2021

First of all, I might have different touchegg version (touchegg 1 still supports two finger scroll, so I have reason to use it). Not thinking any harm, touche does just make the touchegg 1 config file useless.

Next, I want to keep comments in the config file for clarity and sorting.

Does touche really support everything that touchegg 2 understands from the touchegg.conf? Because of the intrusive behaviour of touche I immediately stopped using it, so I cannot say for sure if all the features I use now for touchegg would be supported by touche.

For my present touhegg.conf, I cannot test, because touche fails to start with my touchegg.conf (but touchegg --debug --client itself works fine and does not write complaining messages to stdout or stderr). This is an indication that there is something that touche does not understand but touchegg does.

I attach my present touchegg.cong: touchegg.conf.txt, and here is the terminal output of touche with that config file:

(com.github.joseexposito.touche:22701): Gtk-WARNING **: 10:57:40.714: Unknown key gtk-button-images in /[...]/.config/gtk-4.0/settings.ini

(com.github.joseexposito.touche:22701): Gtk-WARNING **: 10:57:40.714: Unknown key gtk-menu-images in /[...]/.config/gtk-4.0/settings.ini

(com.github.joseexposito.touche:22701): Gtk-WARNING **: 10:57:40.714: Unknown key gtk-toolbar-style in /[...]/.config/gtk-4.0/settings.ini
Gjs-Message: 10:57:40.853: JS LOG: Reading configuration file "/[...]/.config/touchegg/touchegg.conf"

(com.github.joseexposito.touche:22701): Gjs-CRITICAL **: 10:57:40.870: JS ERROR: Error: Unexpected close tag
Line: 101
Column: 15
Char: >
error@webpack:///../node_modules/sax/lib/sax.js?:684:10
strictFail@webpack:///../node_modules/sax/lib/sax.js?:711:12
closeTag@webpack:///../node_modules/sax/lib/sax.js?:913:19
write@webpack:///../node_modules/sax/lib/sax.js?:1549:21
module.exports@webpack:///../node_modules/xml-js/lib/xml2js.js?:411:12
loadConfig@webpack:///../src/config/xml-config.js?:89:66
loadFromFile@webpack:///../src/config/model.js?:103:57
showMainView@webpack:///../src/app-window.js?:84:59
_init@webpack:///../src/app-window.js?:61:12
main/<@webpack:///../src/index.js?:53:22
main@webpack:///../src/index.js?:58:22
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
@/usr/bin/touche:11:17

([...] is my homedir which I have censored to not disclose my username.)

(Removing the touchegg.cong makes touche start.)

Software versions:

  • touchegg --version: Touchégg v2.0.11.
  • pacman -Qi touche | grep '^Version': Version : 2.0.0-1

touchegg.conf.txt

@JoseExposito
Copy link
Owner

JoseExposito commented Oct 20, 2021

The issue is that "&" is not valid XML, in lines 80, 94 and 101:

<command>xfdashboard &</command>

The same config generated with Touché, instead of doing it manually, should generate:

<command>xfdashboard &amp;</command>

And hopefully, it should work fine.

Keeping XML comments it's kind of complex at the moment, so I'd have to say no to this one. It's a lot of work for a minimal improvement.

@dreirund
Copy link
Author

dreirund commented Oct 20, 2021

The issue is that "&" is not valid XML,

thanks.

Then I make the feature request that Touché does print to stderr what it cannot correctly parse and quits with a non-zero exitcode (instead of beeing stuck with not-specific messages).

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

2 participants