C2N14 / AutomaThemely

Simple, set-and-forget python application for changing between desktop themes according to light and dark hours
GNU General Public License v3.0
205 stars 32 forks source link

Can't swtich theme on visual studio code #10

Open nrayamajhee opened 5 years ago

nrayamajhee commented 5 years ago

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.

C2N14 commented 5 years ago

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

nrayamajhee commented 5 years ago

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.