Created
May 6, 2023 05:39
-
-
Save sansmoraxz/dd8dc5cbccb87cde2c89b1fe99fb2e02 to your computer and use it in GitHub Desktop.
Script for setting color mode at launch based on current theme
This file contains hidden or 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
#!/bin/bash | |
colorscheme=$(gsettings get org.gnome.desktop.interface color-scheme) | |
# start chrome in dark mode if dark theme | |
if [[ $colorscheme == *"dark"* ]]; then | |
/usr/bin/google-chrome-stable --enable-features=WebUIDarkMode --force-dark-mode "$@" | |
else | |
/usr/bin/google-chrome-stable "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment