Closed rediffusion closed 4 years ago
Hey @rediffusion ! 😄👋🏼
At the first launch it will ask you what kind of themes you would like to preload: both, ligth or dark. (I contributed to that distinction, because i like the dark ones and in previous version it would load all of them). You're actually right: at first glance it's not very clear... (we'll fix it 👍🏼)
This popup will only appear the first time (if you need it a later time, you can call Random Theme: Copy All Installed Theme in settings
.
Not sure it's a typo or not, but the rigth file is : settings.json
and you can reach it from the settings page:
There you can specify the themeList:
You can also set a workspace themeList creating/writing inside ".vscode/settings.json" a themeList.
Don't forget to look at the Switch Mode
option.😉
Have you found a bug ?
p.s. the popup will only appear if at startup it detects that the themeList is empty. Can you read any suspicious warns/errors in the DevTools ?
@Denis-net Hello mate 👏
Anyway, it's not working! Here are my entries in Settings.json file:
"randomThemeSwitcher.themeList": ["Noctis Minimus", "Ayu One", "Dracula Soft", "eppz!"],
"randomThemeSwitcher.switchMode": "startup",
Should I use such entries?
"workbench.colorTheme": "Noctis Minimus",
...with it or without entries, "Theme Random Swither" isn't working when I close
the IDE and reopen
it!
Regards!
hmmm, very strange. (I only found "Ayu One Dark" but even with "Ayu One" the others still work) Try to set ".vscode/settings.json" inside a workspace (open a folder with vscode and add your keys there), then try to reopen it and see if something has changed. Even with that, does the app still popup the first picker ? What happens when you select an entry in the picker ? What encoding are you using ?
It looks like a problem with the app accessing the configuration. Nothing in the devtools ? Have you tried to remove all the keys, set a theme and then select in the command palette: "Add current theme to settings" ?
@Denis-net
At starting the IDE I use vs-dark
then press ESC.
In this folder, I have the same entries, I don't see any point in rewriting anything. 😕
%APPDATA%\Code\User\settings.json
Even with that the app still popup you the first picker?
Not seen anymore any popup.
What happens when you select an entry in the picker?
Nothing special just some field with prompt (if you... enter or ESC bla bla bla) --> Screencast.
Nothing in the devtools?
Where is it?
Have you tried to remove all the keys, set a theme and then select in the command palette: "Add current theme to settings" ?
Yes with no luck 😕
P.S. ••• if I use only this key "workbench.colorTheme": "Ayu One",
then popup always popups when I reopening the IDE. Which theme I insert is no matter, I see this mad**** popup every time...
I forgot that there is also that part😅:
I see the encoding is UTF-8 so no problem with it.
Where is it?
Here: VS Code is a Chrome in disguise (based on Chromium).😜
"workbench.colorTheme" is the standard VS Code key for changing the theme, "randomThemeSwitcher.themeList" is the key that will be examined at startup and belongs only to the extension.
Try to press Enter
to the question.
Ok, le's try another way:
Please, try to open a powershell terminal and run this code :
code --list-extensions | % { "code --install-extension $_" }
then send me back the result.
In this way i'll try to emulate your environment in a VM and see what's going wrong. Maybe could be an extension called in some way that raise exceptions or something like that, I don't know yet. The more information we got the faster a solution can be found.👍🏼
Deal, here you go:
code --install-extension trfr2h5mxe6eyejgts4uaakmutbhor5ric2zlvrh5yxuswlt326a.webassembly code --install-extension be5invis.vscode-custom-css code --install-extension blackmist.LinkCheckMD code --install-extension DavidAnson.vscode-markdownlint code --install-extension Denis-net.vscode-ahk-manager code --install-extension docsmsft.docs-article-templates code --install-extension docsmsft.docs-authoring-pack code --install-extension docsmsft.docs-images code --install-extension docsmsft.docs-markdown code --install-extension docsmsft.docs-metadata code --install-extension docsmsft.docs-preview code --install-extension docsmsft.docs-yaml code --install-extension donjayamanne.jquerysnippets code --install-extension DotJoshJohnson.xml code --install-extension dracula-theme.theme-dracula code --install-extension eppz.eppz-code code --install-extension esbenp.prettier-vscode code --install-extension formulahendry.code-runner code --install-extension gerane.Theme-FlatlandMonokai code --install-extension jakebathman.mysql-syntax code --install-extension jebbs.plantuml code --install-extension joshpeng.theme-onedark-sublime code --install-extension jprestidge.theme-material-theme code --install-extension liviuschera.noctis code --install-extension mathiasfrohlich.Kotlin code --install-extension mgmcdermott.vscode-language-babel code --install-extension michelemelluso.code-beautifier code --install-extension monokai.theme-monokai-pro-vscode code --install-extension ms-python.anaconda-extension-pack code --install-extension ms-python.python code --install-extension ms-vscode.typescript-javascript-grammar code --install-extension oscarcs.dart-syntax-highlighting-only code --install-extension rbbit.typescript-hero code --install-extension redhat.vscode-yaml code --install-extension SanaAjani.taskrunnercode code --install-extension sldobri.bunker code --install-extension slevesque.vscode-autohotkey code --install-extension spences10.vba code --install-extension streetsidesoftware.code-spell-checker code --install-extension teabyii.ayu code --install-extension techer.open-in-browser code --install-extension zanza00.random-theme-switcher code --install-extension zhuangtongfa.material-theme
Thanks;
Windows on VM had to update itself...🙄😅😂
I restored almost all the extensions, except one. When the popup appeared, i selected "both" and then i pressed "Esc": This is what I saw immediately next.
Two suspicious things:
After the second startup the extension didn't open the popup.
Pheraps could be the unpacked extension that cause the issue, not sure, but worked on the VM (I also updated VSC and retried again)
I tried your setting and it worked too (but as i thought "Ayu One" isn't recognized)
And this is after relaunching VSC
The only thing left is the manually installed extension.
The one that don't appear here.
Try to temporarily remove it and try again.
I tried to install two .vsix extensions, but the extension still works 😭
The strange thing is that even in .vsix extensions i can read their id.
So What is this : code --install-extension trfr2h5mxe6eyejgts4uaakmutbhor5ric2zlvrh5yxuswlt326a.webassembly
?
Could you send me your settings.json ? (in order to have the nearest environment possible.)
If you hit Ctrl+K Ctrl+Shift+T
("Switch to a Random Theme") nothing happens ?
code --install-extension trfr2h5mxe6eyejgts4uaakmutbhor5ric2zlvrh5yxuswlt326a.webassembly
Syntax Highlighting for .wasm files.
Could you send me your settings.json ?
If you hit Ctrl+K Ctrl+Shift+T("Switch to a Random Theme") nothing happens ?
This combinations aren't binding.
Nothing's working anyway, bro.
I found it !!! 🎉🎊
There are two main errors plus one horrible issue:
1) you have an issue with missing colons:
"editor.fontSize": 16
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
After the fontSize value (16) there must be a , i.e.:
"editor.fontSize": 16,
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
The same for:
"ahk.defaultArgs": "/r"
"ahk.onArgs.run": true,
after "/r":
"ahk.defaultArgs": "/r",
"ahk.onArgs.run": true,
Otherwise you will provide an unanalyzable file and VSC won't even be able to update it.
2) not sure is an error (don't think so) but settings.json should not be with comments (I think it still works, but given that a program will parse it, better to keep it simple😉
The other thing is more sneaky:
The "<?>" means that the letter even though are correctly (except space) displayed aren't valid. So if you try to fix the colons you'll see that the workbench.colorTheme changes upon startup, but the theme stays the same. If you hover the cursor over the squiggles, you'll read "Theme is unknown or not installed". This will also happen if you restart vscode or change theme with the binding: (btw, why can't you see the binding? how is it possible to disable extension suggested bindings ?)
To fix i suggest you to one or both the following things:
This should fix your issue.
Using HEX: You can see that spaces are causing issues. (I have used the pencil and compared the two versions of "Noctis Minimus" and I used a Sticky for better align the two strings);
I'm glad it worked !🎉🎊 Enjoy !😄
There are two main errors plus one horrible issue:
I've corrected all the comas!
settings.json should not be with comments
It's simple for me to find what I need without it I'm like a blind cat.
The other thing is more sneaky:
Yes, I do a mistake when I copied entires to .json file directly as you said before. ✌️
Corrected all the comas!
All I left was this key "workbench.colorTheme": "eppz!",
and yours was removed.
Restarted the IDE. Screencast switching themes.
Then I saw these entries at the very end of the keys (without any interference on my part):
// Autohotkey Manager:
"ahk.defaultArgs": "/r",
"ahk.onArgs.run": true,
"ahk.onSave.run": true,
"ahk.displaySwitchButton": true,
"randomThemeSwitcher.themeList": [
"Ayu One",
"Dracula Soft",
"eppz!",
"Flatland Monokai",
"Sublime Material Theme - Dark",
"Noctis Minimus",
"Dobri Next -A07- Oxford",
"One Dark Pro"
]
}
btw, why can't you see the binding?
With bindings problem also was fixed, YAY! 🎈🔫
@Denis-net
🙈 It's me again. The question is, how do you set the theme daily? Used these keys with no result:
"randomThemeSwitcher.switchMode": "daily",
"randomThemeSwitcher.lastSwitchDay": 1
After restarting the IDE theme changes like he's shuffling cards. Tested and works only these:
manual typings
What's wrong with me again? 😕
With you ? Nothing
With the extension ? I forgot an argument, so the lastSwitchDay
could be read but cannot be written😅.
I opened a PR in order to fix this issue. 👍🏼
I forgot: Happy new year ! 🥂🍾🎉🎊
10x, you're very attentive. Merry Christmas bro.
P.S. I found this extension that can be very useful in spotting this kind of issues.
Cheers !
I'm closing this because it's now part of the extension. But stay tuned because new features are coming ! 😉👍🏼 (I have also added a linter that will spot invalid theme names for you)
I have the «VS Code» latest version. Every time I open the «VS Code» this menu pop-up:
If I want to change some theme I need to open
User-Settings
.json file then in this line insert theme name:I've tried to put this in
package.json
file with no luck:"randomThemeSwitcher.themeList": [ "Andromeda Italic", "Cobalt2", "Dracula", "Tomorrow Night Blue", "Ayu Dark", "One Monokai", "Night Owl" ]
How could I change the theme with your super plugin!? With regards! ✌️