JoseExposito / touche

The desktop application to configure Touchégg
GNU General Public License v3.0
542 stars 26 forks source link

Can't save settings #27

Closed siddhantladdha closed 3 years ago

siddhantladdha commented 3 years ago

Describe the bug

Touché does not save changed settings. Similar to #16

Expected behaviour

I would either expect a save button to explicitly save settings but I can't find it anywhere. As I can't find it, I would expect Touché to save settings as they are changes.

Actual behaviour

When being closed and re-opened, settings are back to what is in the configuration file. Basically the touchegg.conf is not at all changed.

Logs

If required, include logs of the bug:

$ flatpak run com.github.joseexposito.touche
(com.github.joseexposito.touche:2): Gjs-CRITICAL **: 21:36:35.682: JS ERROR: Gio.IOErrorEnum: Error opening file “/home/analog/.config/touchegg/touchegg.conf”: Read-only file system
writeFile@webpack:///../src/config/xml-config.js?:246:40
saveConfig@webpack:///../src/config/xml-config.js?:191:15
saveToFile@webpack:///../src/config/model.js?:101:54
saveSettings@webpack:///../src/main-view/content/gesture-list-row.js?:157:56
_init/<@webpack:///../src/main-view/content/gesture-list-row.js?:89:12
main@webpack:///../src/index.js?:71:22
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
@/app/bin/com.github.joseexposito.touche:11:17

Attach Touchégg configuration, placed at ~/.config/touchegg/touchegg.conf, if you consider it relevant. Not sure about relevance, but here it is.

<touchégg>
  <settings>
    <property name="animation_delay">150</property>
    <property name="action_execute_threshold">20</property>
    <property name="color">auto</property>
    <property name="borderColor">auto</property>
  </settings>
  <application name="All">
    <gesture type="SWIPE" fingers="3" direction="UP">
      <action type="RUN_COMMAND">
        <command>qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "ExposeAll"</command>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="3" direction="DOWN">
      <action type="MINIMIZE_WINDOW">
        <animate>true</animate>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="3" direction="LEFT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Alt_L</modifiers>
        <keys>Shift_L+Tab</keys>
        <decreaseKeys>Tab</decreaseKeys>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="3" direction="RIGHT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Alt_L</modifiers>
        <keys>Tab</keys>
        <decreaseKeys>Shift_L+Tab</decreaseKeys>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="4" direction="LEFT">
      <action type="CHANGE_DESKTOP">
        <direction>auto</direction>
        <animate>true</animate>
        <animationPosition>auto</animationPosition>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="4" direction="RIGHT">
      <action type="CHANGE_DESKTOP">
        <direction>auto</direction>
        <animate>true</animate>
        <animationPosition>auto</animationPosition>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="4" direction="UP">
      <action type="RUN_COMMAND">
      <command>dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.show();'</command>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="4" direction="DOWN">
      <action type="RUN_COMMAND">
        <command>notify-send "Hello"</command>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SHOW_DESKTOP">
        <animate>true</animate>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="CLOSE_WINDOW">
        <animate>true</animate>
        <color>F84A53</color>
        <borderColor>F84A53</borderColor>
      </action>
    </gesture>

</application>
  <application name="chromium-browser">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>W</keys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+T</keys>
      </action>
    </gesture>
  </application>
  <application name="dolphin">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>W</keys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+T</keys>
      </action>
    </gesture>
  </application>
  <application name="firefox">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>W</keys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+T</keys>
      </action>
    </gesture>
  </application>
  <application name="google-chrome">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>W</keys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+T</keys>
      </action>
    </gesture>
  </application>
  <application name="gwenview">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>W</keys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>false</repeat>
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+T</keys>
      </action>
    </gesture>
  </application>
  <application name="konsole">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="OUT">
      <action type="SEND_KEYS">
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+N</keys>
        <repeat>false</repeat>
        <on>begin</on>
      </action>
    </gesture>
    <gesture type="PINCH" fingers="4" direction="IN">
      <action type="SEND_KEYS">
        <modifiers>Control_L</modifiers>
        <keys>Shift_L+W</keys>
        <repeat>false</repeat>
        <on>begin</on>
      </action>
    </gesture>
  </application>
</touchégg>

Note that in my case .config/touchegg -> ../open_files/dotfiles/touchegg/.config/touchegg is a soft link.

Your environment

JoseExposito commented 3 years ago

Hi! And thanks for creating a separate bug report.

Note that in my case .config/touchegg -> ../open_files/dotfiles/touchegg/.config/touchegg is a soft link.

That's the "issue". By default, Touché only has access to ~/.config, so it can not in the destination config file.

I'm not sure if Pop! OS has a UI to manage Flatpak apps permissions, but you'll need to add permissions to you home directory. This is how it looks in elementary OS:

Screenshot from 2021-06-21 17 44 37

There are other alternatives, like: https://www.omgubuntu.co.uk/2020/02/flatseal-manage-flatpak-permissions

siddhantladdha commented 3 years ago

Thank you! Flatseal works perfectly.