weisJ / auto-dark-mode

IDEA plugin to automatically apply system theme settings on macOS and Windows.
https://plugins.jetbrains.com/plugin/14076-auto-dark-mode
MIT License
53 stars 14 forks source link

Support for KDE #33

Closed 4l1fe closed 1 year ago

4l1fe commented 3 years ago

Installed plugin version 1.5.3-2020.3, Pycharm Community version 2020.3.3

java.lang.Throwable: java.lang.IllegalStateException: Monitoring is not supported.
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:159)
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:163)
    at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:71)
    at com.github.weisj.darkmode.platform.PluginLogger.error(PluginLogger.kt:44)
    at com.github.weisj.darkmode.AutoDarkMode.createMonitor(AutoDarkMode.kt:51)
    at com.github.weisj.darkmode.AutoDarkMode.access$createMonitor(AutoDarkMode.kt:43)
    at com.github.weisj.darkmode.AutoDarkMode$monitor$1.invoke(AutoDarkMode.kt:45)
    at com.github.weisj.darkmode.AutoDarkMode$monitor$1.invoke(AutoDarkMode.kt:43)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.github.weisj.darkmode.platform.settings.UtilKt.letValue(Util.kt:49)
    at com.github.weisj.darkmode.AutoDarkMode.start(AutoDarkMode.kt:56)
    at com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(AutoDarkModeStartupListener.kt:34)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:656)
    at com.intellij.util.messages.impl.MessageBusImpl.deliverMessage(MessageBusImpl.java:426)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:401)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:383)
    at com.intellij.util.messages.impl.MessageBusImpl.access$100(MessageBusImpl.java:33)
    at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:189)
    at com.sun.proxy.$Proxy31.appFrameCreated(Unknown Source)
    at com.intellij.idea.IdeStarter.main(IdeStarter.kt:104)
    at com.intellij.idea.ApplicationLoader$startApp$8.run(ApplicationLoader.kt:239)
    at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
    at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1085)
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
weisJ commented 3 years ago

What operating system are you using? If you are using Linux which desktop environment?

4l1fe commented 3 years ago

What operating system are you using? If you are using Linux which desktop environment?

Kubuntu

$ uname -a                                                                                                                                                                                
Linux onwer 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a                                                                                                                                                                          
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic
weisJ commented 3 years ago

This plugin currently only supports Gnome on linux. I'll probably adjust the error message to make this clear.

4l1fe commented 3 years ago

So problem is an unsupported desktop environment KDE? and it's not possible to use the plugin on it?

weisJ commented 3 years ago

Yes the plugin currently can't be used with KDE. I myself don't have the capacity to add the functionality for KDE. However I am open for PRs adding support for KDE. I think the implementation for Gnome can be followed closely substituting the appropriate KDE APIs instead.

4l1fe commented 3 years ago

Unfortunately i'm not a Kotlin/Java dev. Thanks for the answer.

gouvinb commented 3 years ago

I have same issue with:

Auto Dark Mode : 1.5.4-2021.1

IntelliJ IDEA 2021.1.1 Preview (Ultimate Edition)
Build #IU-211.7142.13, built on April 21, 2021
Runtime version: 11.0.10+9-b1341.41 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Linux 5.11.16-arch1-1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry: documentation.show.toolbar=true, ide.tooltip.initialDelay=201
Non-Bundled Plugins: com.github.weisj.darkmode (1.5.4-2021.1), com.intellij.nativeDebug (211.7142.13), com.intellij.plugins.macoskeymap (211.6432.7), com.markskelton.one-dark-theme (5.1.5), com.developerphil.adbidea (1.6.2)
Kotlin: 211-1.4.32-release-IJ7142.3
Current Desktop: sway
weisJ commented 3 years ago

I just want to note again that this is not a bug but expected behaviour. Sadly I can’t make it so the plugin is only available with Gnome otherwise I would. Jetbrains only allows plugins to specify the overall supported operating system for a plugin, which technically includes Linux for this one, but effectively only Gnome desktops are supported.

Again: I will gladly accept any PRs which add support for further desktop environments, but at the moment there aren’t any plans from my side to implement it myself.

weisJ commented 2 years ago

Please check whether the new version works for you :)

4l1fe commented 1 year ago

I ended up with a quick theme switcher,therefore close the issue.