Last active
August 29, 2015 14:25
-
-
Save maximzasorin/d8cefc2aa4672a1f55e4 to your computer and use it in GitHub Desktop.
Set dark theme for one Chromium’s window, but not for Ctrl+N windows.
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
#!/bin/sh | |
chromium-browser "$@" & | |
pid=$! | |
wid=$(wmctrl -lp | grep $pid | cut -c 1-10) | |
WINREP="" | |
while [ ! "`echo $WINREP | grep -l 'Chromium'`" ] | |
do | |
WINREP=$(xwininfo -id $wid) | |
wid=$(wmctrl -lp | grep $pid | cut -c 1-10) | |
if ! [ -z "$wid" ] | |
then | |
xprop -f GTK_THEME 8u -set GTK_THEME "dark" -id $wid | |
xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT "dark" -id $wid | |
fi | |
sleep 0.01 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment