-
-
Save azak-azkaran/9a20958b536a96ba6a274153b8b763fa to your computer and use it in GitHub Desktop.
day night switch for gnome
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 | |
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat-Light' | |
/usr/bin/gsettings set org.gnome.desktop.wm.preferences theme 'Flat-Plat-Light' | |
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat-Light' | |
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file:///home/azak/Pictures/tokyo_street_by_arsenixc.jpg' | |
ln -fs /home/azak/.config/terminator/config_light /home/azak/.config/terminator/config | |
ln -fs /home/azak/.vimrc_light /home/azak/.vimrc | |
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 | |
TIME="$(date '+%H%M')" | |
echo "The current time is $TIME" | |
dbus-launch | |
CIVS="$(/home/azak/git/day-mode/find-twilight | cut -f1 -d\ )" | |
CIVE="$(/home/azak/git/day-mode/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 /home/azak/git/day-mode/day-mode | |
else | |
echo "Switching to Night mode" | |
RESP=exec /home/azak/git/day-mode/night-mode | |
fi | |
if [[ $RESP ]] ; then | |
echo "Switch failure" | |
else | |
echo "Switch sucess" | |
echo "set to: $DAY_MODE" | |
fi |
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 | |
echo $(/usr/bin/solunar -c Berlin --syslocal | grep 'Sunrise\|Sunset' | grep -Eo '[0-9]' | tr -d '\n' | grep -Eo '[0-9]{4,4}') |
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 | |
/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.wm.preferences theme 'Flat-Plat-Dark' | |
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file:///home/azak/Pictures/tokyo_street_night_by_arsenixc.jpg' | |
ln -fs /home/azak/.config/terminator/config_dark /home/azak/.config/terminator/config | |
ln -fs /home/azak/.vimrc_dark /home/azak/.vimrc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment