m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
7.17k stars 526 forks source link

About switching themes #148

Closed sdjxxfz closed 2 years ago

sdjxxfz commented 2 years ago

The system default is black theme, which causes all websites to become black theme, can you provide the function to switch to white theme?

m1k1o commented 2 years ago

This was introduced to firefox in this commit: https://github.com/m1k1o/neko/commit/b9675a1c8711fb0eb41a46e436c24b3b85ce1176

And in chromium it is forced here with --force-dark-mode: https://github.com/m1k1o/neko/blob/ba3368a3eb6bad6287ee1a4b908b4921dc3099df/.docker/chromium/supervisord.conf#L3

You can revert/remove it if you like tight theme. Having switch is non-trivial, because it affects inital browser configuration and arguments, that cannot be modified from go server itself.

yesBad commented 2 years ago

--force-dark-mode: https://github.com/m1k1o/neko/blob/ba3368a3eb6bad6287ee1a4b908b4921dc3099df/.docker/google-chrome/supervisord.conf#L3

sdjxxfz commented 2 years ago

Just saw it, thank you

sdjxxfz commented 2 years ago

I tried my best to find this file in my docker container /etc/neko/supervisord.conf but the content in it is way different from given above. What should I do?

m1k1o commented 2 years ago

Its in /etc/neko/supervisord/chromium.conf or different browser name. https://github.com/m1k1o/neko/blob/ba3368a3eb6bad6287ee1a4b908b4921dc3099df/.docker/chromium/Dockerfile#L32

sdjxxfz commented 2 years ago

it works! Thank you very much for you help and such a good project!