Comments (2)
does anyone have an answer for this? This app does not work in Linux Mint Cinnamon 20.3.
from automathemely.
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.
from automathemely.
Related Issues (20)
- theme not changing automatically in ubuntu 18.04 with unity DE HOT 12
- Installation script not installing scheduler desktop file for autostarting of the scheduler on login HOT 1
- updsuntimes.py gets the wrong execution folder HOT 2
- One or more of the script files was/were not found HOT 2
- Program won't open HOT 5
- ERROR: gnome shell user extension is not available, when system hibernate or wakeup HOT 2
- Does not support MATE desktop HOT 2
- Sugesstion: changing theme in Albert Spotlight, Signal and Caprine
- VS Code integration. HOT 2
- Someone please upgrade this tool for Ubuntu 20.04 / Python 3.8 HOT 10
- ImportError: cannot import name 'Location' from 'astral' HOT 4
- Sunset / Sunrise theme changes only applied at boot
- Can't uninstall HOT 4
- Can't run HOT 12
- AutomaThemely does not open on Manjaro 20.2 HOT 2
- Downloaded latest verion no-deps for Linux Mint 19 (based on Ubuntu 18) and can't run HOT 2
- Could not install with Python 3.8 in Linux Mint 20.3
- The application does not start
- ModuleNotFoundError: No module named 'pytz'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automathemely.