[Feature Request] Toggle Dark Reader from command line
See original GitHub issueIs your feature request related to a problem? Please describe.
I am working on a script for automatically switching between light/dark themes across all my applications. This script saves me tons of time since I usually switch to a light theme, then back to a dark theme, at least twice per day, in several applications.
It would be amazing if I could toggle the Dark Reader plugin (on/off) from the command line in Linux, so it could be included in my global theme switching script.
Describe the solution you’d like
With my limited knowledge of extension development, I can imagine two possible solutions:
- Have an editable config file inside the extension directory that I could modify using (for example)
sed
, and make the extension poll that file regularly - Provide an extension URL that I could open in my browser that would enable or disable the extension. This would be a less clean solution, as a new tab would need to be opened in the browser to toggle the extension, which means the browser would be focused
Additional context
I really love this extension and have been an avid user for years. From today forward I am also a monthly contributor 🙂
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Help – Dark Reader
Toggle site button adds the current site into the ignore list (or removes it from there). · Use Invert listed only if you...
Read more >darkreader - npm
Dark Reader is an open-source MIT-licensed browser extension designed to analyze web pages. Dark Reader will generate a dark mode that aims to ......
Read more >Chromium - ArchWiki
Chromium is an open-source graphical web browser based on the Blink rendering engine. It is the basis for the proprietary Google Chrome ...
Read more >How to automatically toggle the Dark Reader Chrome plugin?
Click on 'dev tools' (as shown above). This will open a small window. Click on 'preview new design' (as shown below). Note that...
Read more >firefox disable dark mode
How to Enable Dark Mode on Microsoft's Edge Browser on Windows 10, ... Open the terminal window from application manager or use the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d love to see this happen too.
I’ve written darkman, which switched desktop theme to dark mode at sundown and back at sunrise.
I’d love to be able to signal darkreader somehow and tell it to switch modes.
There’s work being done to expose a D-Bus service at an OS level. I believe it is possible for a Firefox add-on to listen to host D-Bus signals using
nativeMessaging
. Would a PR for that be acceptable?Yes, because we use a
passive
system into the PR, that just setup a listening port and let other extension send messages to it. I didn’t add any nativeMessaging support, because we as Dark Reader need to make the first message to a nativeMessagehost
, this can be done by having a list in Dark Reader that users to add nativeMessage and let Dark Reader deal with sending ahello world
message to let the native application know it can go send options etc. However this also require intervals to reguarly check if anyinactive
native applications are finallyawake
. It requires some good logic and I prefer to implement this in another PR after the external connections is polish so I know what theguidelines
are and how the logic definitely looks like.