Skip to content

Instantly share code, notes, and snippets.

@azak-azkaran
Forked from Skehmatics/day-mode
Last active September 24, 2018 20:16
Show Gist options
  • Save azak-azkaran/9a20958b536a96ba6a274153b8b763fa to your computer and use it in GitHub Desktop.
Save azak-azkaran/9a20958b536a96ba6a274153b8b763fa to your computer and use it in GitHub Desktop.
day night switch for gnome
#!/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
#!/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
#!/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}')
#!/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