-
-
Save looterz/e44d85ff3aea8301d3e2cca6f63fad4b to your computer and use it in GitHub Desktop.
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/bash | |
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me | |
PID=$(pgrep -u USER gnome-session-b) | |
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) | |
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat' | |
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat' | |
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH' | |
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)' |
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/bash | |
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me | |
PID=$(pgrep -o gnome-session -u "USER") | |
export DBUS_SESSION_BUS_ADDRESS=$(sudo grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) | |
TIME="$(date '+%H%M')" | |
echo "The current time is $TIME" | |
CIVS="$(/usr/local/bin/find-twilight | cut -f1 -d\ )" | |
CIVE="$(/usr/local/bin/find-twilight | cut -f2 -d\ )" | |
echo "Daylight starts at $CIVS ends at $CIVE" | |
if [ $TIME -ge $CIVS ] && [ $TIME -le $CIVE ] ; then | |
echo "Switching to Day mode" | |
RESP=exec /usr/local/bin/day-mode | |
else | |
echo "Switching to Night mode" | |
RESP=exec /usr/local/bin/night-mode | |
fi | |
if [[ $RESP ]] ; then | |
echo "Switch failure" | |
else | |
echo "Switch sucess" | |
fi |
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/bash | |
echo $(/usr/local/bin/solunar -c CITY --syslocal | grep 'Sunrise\|Sunset' | grep -Eo '[0-9]' | tr -d '\n' | grep -Eo '[0-9]{4,4}') |
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/bash | |
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me | |
PID=$(pgrep -u USER gnome-session) | |
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) | |
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat-Dark' | |
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat-Dark' | |
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH' | |
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(33,33,33)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment