VivaldiMods icon indicating copy to clipboard operation
VivaldiMods copied to clipboard

How to configure the path in linux?

Open Sparklytical opened this issue 5 years ago • 8 comments

Since using /opt/vivaldi-snapshot/resources/vivaldi this as application path does not work

Sparklytical avatar Apr 25 '20 15:04 Sparklytical

In what way does it not work? Do you get any error messages?

LonMcGregor avatar Apr 25 '20 17:04 LonMcGregor

@LonMcGregor The problem is that we (Linux users) have the Viv install dir the same as you have in the x.xx.xxxx.x (version) dir, i.e., these two are "equal":

  • Linux: /opt/vivaldi-snapshot/resources/vivaldi/
  • Windows: C:\Users\me\AppData\Local\Vivaldi\Application\3.0.1874.27\resources\vivaldi\

…and you detect the folder in the script (because who would want to change the config every update), thus it cannot work if the version dir is missing (and the same if the config goes even to the resources/vivaldi dir).

//EDIT: clarification and \Application\

ghost avatar Apr 25 '20 21:04 ghost

Another thing that came to my thought is that the user-added files don't get overwritten upon update.

But as I can see, you remove them, anyway.

ghost avatar Apr 26 '20 06:04 ghost

Traceback (most recent call last):
  File "custom.py", line 38, in <module>
    RESOURCE_DIRECTORY = get_app_resource_dir()
  File "custom.py", line 34, in get_app_resource_dir
    newest_vivaldi = os.path.join(CONFIG['application_path'], matches[0], 'resources', 'vivaldi')
IndexError: list index out of range

Sparklytical avatar Apr 26 '20 06:04 Sparklytical

I'll look into that

LonMcGregor avatar Apr 26 '20 09:04 LonMcGregor

I've pushed a potential fix, let me know if it works or not

LonMcGregor avatar Apr 26 '20 09:04 LonMcGregor

using path asshell "application_path": "/opt/vivaldi-snapshot/", worked. One suggestion, how about you try mixing it with Jdhooks? Since it also has an option to directly switch mods off inside the settings panel? one will not need to edit the mods again inside config.json file.

Sparklytical avatar Apr 26 '20 10:04 Sparklytical

I haven't looked at that before - could be interesting

LonMcGregor avatar Apr 26 '20 10:04 LonMcGregor