Open dima2306 opened 3 years ago
does anyone have an answer for this? This app does not work in Linux Mint Cinnamon 20.3.
does anyone have an answer for this? This app does not work in Linux Mint Cinnamon 20.3.
I think the project is abandoned. So I have a script here, not written by me but I customized it a little bit for my needs.
#!/bin/bash
#
# Original author ralplpcr
# Link https://forums.linuxmint.com/viewtopic.php?p=1948373&sid=b4916fc19121791f8ec9cc2f72c0e230#p1948373
#
/usr/bin/notify-send -t 1000 "Changing theme..."
# First obtain a location code from: https://weather.codes/search/
# Enter your city name only in the search, and choose the weather code closest to you
# Insert your location. For example USNC0558 is a location code for Raleigh, North Carolina
location="GGXX0004"
tmpfile=/tmp/$location.out
# Obtain sunrise and sunset raw data from weather.com
wget -q "https://weather.com/weather/today/l/$location" -O "$tmpfile"
SUNR=$(grep SunriseSunset "$tmpfile" | grep -oE '((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))' | head -1)
SUNS=$(grep SunriseSunset "$tmpfile" | grep -oE '((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))' | tail -1)
# Strictly speaking, the below 3 variables are not needed - only used to show time in readable format
sr=$(date --date="$SUNR" +%R)
ss=$(date --date="$SUNS" +%R)
ct=$(date +"%R")
# These 3 variables *are* needed to calculate whether we're past sunrise or sunset
sunrise=$(date --date="$SUNR" +%s)
sunset=$(date --date="$SUNS" +%s)
now=$(date +"%s")
# Output current time, sunrise & sunset for your location (OPTIONAL)
echo "Sunrise for location $location: $sr"
echo "Sunset for location $location: $ss"
echo "Current time: $ct"
# Check if current time is past sunrise & set theme accordingly
if [[ "$now" > "$sunrise" ]] && [[ "$now" < "$sunset" ]]; then
/usr/bin/notify-send -t 5000 "Past Sunrise - setting daytime theme"
gsettings set org.cinnamon.theme name "Mojave-light"
gsettings set org.cinnamon.desktop.interface gtk-theme "Mojave-light"
gsettings set org.cinnamon.desktop.wm.preferences theme "Mojave-light"
gsettings set org.cinnamon.desktop.interface icon-theme 'McMojave-circle-purple'
# Now do the same for evening/night theme
elif [[ "$now" > "$sunset" ]]; then
/usr/bin/notify-send -t 5000 "Past Sunset - setting evening theme"
gsettings set org.cinnamon.theme name "Mojave-dark"
gsettings set org.cinnamon.desktop.interface gtk-theme "Mojave-dark"
gsettings set org.cinnamon.desktop.wm.preferences theme "Mojave-dark"
gsettings set org.cinnamon.desktop.interface icon-theme 'McMojave-circle-brown-dark'
fi
# if [[ "$ct" > "20:30" ]] || [[ "$ct" < "05:00" ]]; then
# redshift -c ~/.config/redshift.conf &> /dev/null
# else
# redshift -x &> /dev/null
# fi
Change location to yours. Also, you can run in cron for the automation process of run the script manually when you want.
Here's my setup: Cinnamon 5.0.5 Python 3.9.6 System Fedora 34
python3.6-automathemely-1.3-1.noarch.rpm
has issues as it complains that python3-pytz is no installed. But I have...and other required python packages are also installed:
So what else does the package need? Am I missing something?
Also tried
python3.6-no_deps-automathemely-1.3-1.noarch.rpm
ofc it installs but doesn't start and work... So, I'm kinda stuck.