Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5628dfc4b0 | |||
| fef2a534cc | |||
| 44a7bb1f8f | |||
| 52402aaaf4 |
@@ -1,3 +1,7 @@
|
||||
# Version 1.1
|
||||
- Compatibility with Cinnamon 5.4 and 5.8
|
||||
- Two new image sets
|
||||
|
||||
# Version 1.0
|
||||
- Offline sun time calculation
|
||||
- Online location estimation or manual input
|
||||
|
||||
@@ -10,11 +10,21 @@ Based on a location, this extension calculates the periods of a day and switches
|
||||
- 9 day periods
|
||||
- HEIF converter
|
||||
- Image configuration assistent with simple one-click setup for image choose
|
||||
- Online location estimation
|
||||
- Online location estimation or offline with manual latitude and longitude input
|
||||
- Offline sun angles estimation
|
||||
|
||||
### Tested Cinnamon versions
|
||||
- 5.6
|
||||
- 5.4 (Mint 21)
|
||||
- 5.6 (Mint 21.1)
|
||||
- 5.8 (Mint 21.2)
|
||||
|
||||
### Technology
|
||||
- Using `JavaScript` for
|
||||
- Sun angle estimation
|
||||
- Location estimation
|
||||
- Change of the desktop wallpapers
|
||||
- `Python` displays the Image Configurator
|
||||
- Image Configurator UI was written with `Glade`
|
||||
|
||||
## Installation
|
||||
### From the repo
|
||||
@@ -23,6 +33,8 @@ Based on a location, this extension calculates the periods of a day and switches
|
||||
3. Copy the folder `cinnamon-dynamic-wallpaper@TobiZog` to `~/.local/share/cinnamon/extensions/`
|
||||
|
||||
### From Built-in Extension Manager
|
||||

|
||||
|
||||
1. Open "Extensions" in Linux Mint or any other distribution with Cinnamon as Desktop Environment
|
||||
2. Click on "Download"
|
||||
3. Search and download it
|
||||
@@ -46,6 +58,10 @@ The image sets are from https://github.com/adi1090x/dynamic-wallpaper
|
||||
| ------ | ----- | ------ |
|
||||
|  |  |  |
|
||||
|
||||
| Lakeside | Mountains | Sahara |
|
||||
| Cliffs | Gradient | Lakeside |
|
||||
| -------- | --------- | ------ |
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|
||||
| Mountains | Sahara |
|
||||
| --------- | ------ |
|
||||
|  |  |
|
||||
@@ -1,4 +1,4 @@
|
||||
import gi, os, glob, json, shutil, enum, threading
|
||||
import gi, os, glob, json, shutil, enum, threading, subprocess
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk, GdkPixbuf
|
||||
@@ -11,9 +11,6 @@ IMAGE_EXTRACT_DIR = IMAGE_DIR + "extracted/"
|
||||
IMAGE_SETS_DIR = IMAGE_DIR + "included_image_sets/"
|
||||
IMAGE_SELECTED_DIR = IMAGE_DIR + "selected/"
|
||||
|
||||
PREF_PATH = os.path.expanduser("~") + \
|
||||
"/.config/cinnamon/spices/cinnamon-dynamic-wallpaper@TobiZog/cinnamon-dynamic-wallpaper@TobiZog.json"
|
||||
|
||||
class Source(enum.Enum):
|
||||
SELECTED = 0 # Load previous selected images
|
||||
EXTRACT = 1 # Use a custom image set from a heic file
|
||||
@@ -39,6 +36,8 @@ class ImageConfigurator:
|
||||
"aurora",
|
||||
"beach",
|
||||
"bitday",
|
||||
"cliffs",
|
||||
"gradient",
|
||||
"lakeside",
|
||||
"mountains",
|
||||
"sahara"
|
||||
@@ -108,6 +107,19 @@ class ImageConfigurator:
|
||||
self.image_source = Source.SELECTED
|
||||
|
||||
|
||||
# Check for Cinnamon version
|
||||
# With version 5.6+, the folder of the configuration file was changed
|
||||
version = subprocess.check_output(["cinnamon", "--version"])
|
||||
version = version.decode()
|
||||
version = version[version.find(" "):version.rfind("\n")].strip()
|
||||
|
||||
if version.startswith("5.4"):
|
||||
self.pref_path = os.path.expanduser("~") + \
|
||||
"/.cinnamon/configs/cinnamon-dynamic-wallpaper@TobiZog/cinnamon-dynamic-wallpaper@TobiZog.json"
|
||||
else:
|
||||
self.pref_path = os.path.expanduser("~") + \
|
||||
"/.config/cinnamon/spices/cinnamon-dynamic-wallpaper@TobiZog/cinnamon-dynamic-wallpaper@TobiZog.json"
|
||||
|
||||
# Load preferences
|
||||
self.loadFromSettings()
|
||||
|
||||
@@ -128,7 +140,7 @@ class ImageConfigurator:
|
||||
""" Load preferences from the Cinnamon preference file
|
||||
"""
|
||||
# Load the settings
|
||||
with open(PREF_PATH, "r") as pref_file:
|
||||
with open(self.pref_path, "r") as pref_file:
|
||||
pref_data = json.load(pref_file)
|
||||
|
||||
|
||||
@@ -167,7 +179,7 @@ class ImageConfigurator:
|
||||
""" Save preferences to the Cinnamon preference file
|
||||
"""
|
||||
# Load the settings
|
||||
with open(PREF_PATH, "r") as pref_file:
|
||||
with open(self.pref_path, "r") as pref_file:
|
||||
pref_data = json.load(pref_file)
|
||||
|
||||
|
||||
@@ -185,7 +197,7 @@ class ImageConfigurator:
|
||||
|
||||
|
||||
# Write the settings
|
||||
with open(PREF_PATH, "w") as pref_file:
|
||||
with open(self.pref_path, "w") as pref_file:
|
||||
json.dump(pref_data, pref_file, separators=(',', ':'), indent=4)
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
@@ -0,0 +1 @@
|
||||
4.jpg
|
||||
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 238 KiB |
|
After Width: | Height: | Size: 241 KiB |
|
After Width: | Height: | Size: 293 KiB |
|
After Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 163 KiB |
@@ -2,9 +2,11 @@
|
||||
"uuid": "cinnamon-dynamic-wallpaper@TobiZog",
|
||||
"name": "Cinnamon Dynamic Wallpaper",
|
||||
"description": "Cinnamon extension for dynamic desktop backgrounds based on time and location",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"cinnamon-version": [
|
||||
"5.6"
|
||||
"5.4",
|
||||
"5.6",
|
||||
"5.8"
|
||||
],
|
||||
"max-instances": 1,
|
||||
"url": "https://github.com/TobiZog/cinnamon-dynamic-wallpaper"
|
||||
|
||||
BIN
res/download-manager.png
Normal file
|
After Width: | Height: | Size: 44 KiB |