AutomaThemely icon indicating copy to clipboard operation
AutomaThemely copied to clipboard

Can't swtich theme on visual studio code

Open nrayamajhee opened this issue 7 years ago • 2 comments

I am using 'code' package on arch linux and this app doesn't seem to query the themes. Whenever I click the switcher, it gets disabled. I am guessing this may be the problem:

vscode_extensions_paths = ['/snap/vscode/current/usr/share/code/resources/app/extensions',
                                   '/usr/share/code/resources/app/extensions',
str(Path.home().joinpath('.vscode', 'extensions'))]

As in arch linux's 'code' package the extensions are located in /usr/lib/extensions. Similarly if you use the official Microsoft's linux binaries from 'visual-studio-code-bin' package, the extensions will be located in /opt/visual-studio-code/resources/app/extensions/'.

I tried to download and modify your code to see if this works, but I can't quite figure out how how to run this app on development mode.

nrayamajhee avatar Mar 01 '19 22:03 nrayamajhee

I actually didn't know about those, good find :) I will add it next version but in the meantime I think you can manually edit the files after installing it in /usr/local/lib/python3.6/dist-packages/automatemely

C2N14 avatar Mar 08 '19 18:03 C2N14

Thanks! I fixed a couple of things and now its working perfectly.

I am just posting this so that anyone who runs into this exact problem can fix it for now:

Here's the instruction to have it working on Arch linux using the AUR package and the open source vscode CODE - OSS. If you use a different version of vscode, just put the corresponding path and name.

  • Open /usr/lib/python3.7/site-packages/automathemely/autoth_tools/extratools.py with root permission.
  • Modify line 61 to /usr/lib/code/extensions,
  • Modify line 107 to target_file = Path.home().joinpath('.config', 'Code - OSS', 'User', 'settings.json')

nrayamajhee avatar Mar 17 '19 00:03 nrayamajhee