This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.regex.Pattern; | |
// Based off HanSolo's Detector, with added support for GNOME, and removed support for macOS accent colors for Java 8 compatibility. Original: https://gist.github.com/HanSolo/7cf10b86efff8ca2845bf5ec2dd0fe1d | |
public class DarkModeDetector { | |
public enum OperatingSystem {WINDOWS, MACOS, LINUX, SOLARIS, NONE} | |
private static final String REGQUERY_UTIL = "reg query "; |