-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cinnamon Dynamic Wallpaper v.1.2 (#470)
- Loading branch information
Showing
96 changed files
with
187 additions
and
87 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/extension.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../5.4/extension.js |
1 change: 1 addition & 0 deletions
1
cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/icon.png
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../5.4/icons/icon.png |
1 change: 1 addition & 0 deletions
1
cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/icons
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../5.4/icons/ |
1 change: 1 addition & 0 deletions
1
...ic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/image-configurator/data
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../5.4/image-configurator/data/ |
1 change: 1 addition & 0 deletions
1
.../files/cinnamon-dynamic-wallpaper@TobiZog/4.8/image-configurator/image-configurator.glade
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../5.4/image-configurator/image-configurator.glade |
6 changes: 6 additions & 0 deletions
6
...Zog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/image-configurator/image-configurator.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import os | ||
import windowHandler | ||
|
||
if __name__ == "__main__": | ||
wh = windowHandler.WindowHandler(os.path.expanduser("~") + "/.cinnamon/configs/cinnamon-dynamic-wallpaper@TobiZog/[email protected]") | ||
wh.showMainWindow() |
1 change: 1 addition & 0 deletions
1
...@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/image-configurator/windowHandler.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../5.4/image-configurator/windowHandler.py |
1 change: 1 addition & 0 deletions
1
cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/images
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../5.4/images/ |
1 change: 1 addition & 0 deletions
1
cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/scripts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../5.4/scripts/ |
1 change: 1 addition & 0 deletions
1
...namic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/4.8/settings-schema.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../5.4/settings-schema.json |
This file contains 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
1 change: 1 addition & 0 deletions
1
cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/5.4/icon.png
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
icons/icon.png |
File renamed without changes
6 changes: 6 additions & 0 deletions
6
...aper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/5.4/image-configurator/data/enum.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from enum import Enum | ||
|
||
class Source(Enum): | ||
SELECTED = 0 # Load previous selected images | ||
EXTRACT = 1 # Use a custom image set from a heic file | ||
SET = 2 # Use an included image set |
This file contains 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
6 changes: 6 additions & 0 deletions
6
...Zog/files/cinnamon-dynamic-wallpaper@TobiZog/5.4/image-configurator/image-configurator.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import os | ||
import windowHandler | ||
|
||
if __name__ == "__main__": | ||
wh = windowHandler.WindowHandler(os.path.expanduser("~") + "/.config/cinnamon/spices/cinnamon-dynamic-wallpaper@TobiZog/[email protected]") | ||
wh.showMainWindow() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import gi, os, glob, json, shutil, enum, threading, subprocess | ||
import gi, os, glob, json, shutil, threading, subprocess | ||
from data.enum import Source | ||
|
||
gi.require_version("Gtk", "3.0") | ||
from gi.repository import Gtk, GdkPixbuf | ||
|
||
PROJECT_DIR = os.path.dirname(os.path.dirname(__file__)) + "/" | ||
UI_PATH = PROJECT_DIR + "image-configurator/" + "image-configurator.glade" | ||
CONFIGURATOR_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
PROJECT_DIR = os.path.dirname(CONFIGURATOR_DIR) + "/" | ||
UI_PATH = CONFIGURATOR_DIR + "/" + "image-configurator.glade" | ||
|
||
IMAGE_DIR = PROJECT_DIR + "images/" | ||
IMAGE_EXTRACT_DIR = IMAGE_DIR + "extracted/" | ||
IMAGE_SETS_DIR = IMAGE_DIR + "included_image_sets/" | ||
IMAGE_SELECTED_DIR = IMAGE_DIR + "selected/" | ||
|
||
class Source(enum.Enum): | ||
SELECTED = 0 # Load previous selected images | ||
EXTRACT = 1 # Use a custom image set from a heic file | ||
SET = 2 # Use an included image set | ||
|
||
class WindowHandler: | ||
def __init__(self, pref_path: str) -> None: | ||
|
||
class ImageConfigurator: | ||
def __init__(self) -> None: | ||
########### Class variables ########### | ||
self.pref_path = pref_path | ||
|
||
self.pref_vars = [ | ||
"etr_img_morning_twilight", | ||
"etr_img_sunrise", | ||
|
@@ -106,20 +106,6 @@ def __init__(self) -> None: | |
|
||
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/[email protected]" | ||
else: | ||
self.pref_path = os.path.expanduser("~") + \ | ||
"/.config/cinnamon/spices/cinnamon-dynamic-wallpaper@TobiZog/[email protected]" | ||
|
||
# Load preferences | ||
self.loadFromSettings() | ||
|
||
|
@@ -139,6 +125,7 @@ def showMainWindow(self): | |
def loadFromSettings(self): | ||
""" Load preferences from the Cinnamon preference file | ||
""" | ||
#try: | ||
# Load the settings | ||
with open(self.pref_path, "r") as pref_file: | ||
pref_data = json.load(pref_file) | ||
|
@@ -173,6 +160,8 @@ def loadFromSettings(self): | |
self.cb_previews[i].set_active(j) | ||
else: | ||
self.image_source = Source.SET | ||
#except: | ||
# pass | ||
|
||
|
||
def writeToSettings(self): | ||
|
@@ -375,9 +364,4 @@ def onApply(self, *args): | |
def onDestroy(self, *args): | ||
""" UI signal if the window is closed by the user | ||
""" | ||
Gtk.main_quit() | ||
|
||
|
||
if __name__ == "__main__": | ||
ic = ImageConfigurator() | ||
ic.showMainWindow() | ||
Gtk.main_quit() |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Oops, something went wrong.