summaryrefslogtreecommitdiff
path: root/pywal
diff options
context:
space:
mode:
Diffstat (limited to 'pywal')
-rw-r--r--pywal/__init__.py39
-rw-r--r--pywal/wal.py41
2 files changed, 48 insertions, 32 deletions
diff --git a/pywal/__init__.py b/pywal/__init__.py
index 853433d..02dbe37 100644
--- a/pywal/__init__.py
+++ b/pywal/__init__.py
@@ -2,35 +2,10 @@
wal - Generate and change colorschemes on the fly.
Created by Dylan Araps.
"""
-from pywal.settings import __version__ # noqa: F401
-from pywal import magic
-from pywal import reload
-from pywal import sequences
-from pywal import wallpaper
-
-
-def create_palette(img):
- """Create a palette and return it as a dict."""
- colors = magic.gen_colors(img)
- colors = magic.sort_colors(img, colors)
- return colors
-
-
-def send_sequences(colors, vte):
- """Send the sequences."""
- sequences.send_sequences(colors, vte)
-
-
-def reload_env():
- """Reload the environment."""
- reload.reload_env()
-
-
-def set_wallpaper(img):
- """Set the wallpaper."""
- wallpaper.set_wallpaper(img)
-
-
-# def reload_colors(vte):
-# """Reload the colors."""
-# sequences.reload_colors(vte)
+# flake8: noqa: F401
+from pywal.settings import __version__
+from pywal.wal import create_palette
+from pywal.wal import get_image
+from pywal.wal import reload_env
+from pywal.wal import send_sequences
+from pywal.wal import set_wallpaper
diff --git a/pywal/wal.py b/pywal/wal.py
new file mode 100644
index 0000000..db8dccd
--- /dev/null
+++ b/pywal/wal.py
@@ -0,0 +1,41 @@
+"""
+wal - Generate and change colorschemes on the fly.
+Created by Dylan Araps.
+"""
+from pywal import image
+from pywal import magic
+from pywal import reload
+from pywal import sequences
+from pywal import wallpaper
+
+
+def get_image(img):
+ """Validate image input."""
+ return image.get_image(img)
+
+
+def create_palette(img):
+ """Create a palette and return it as a dict."""
+ colors = magic.gen_colors(img)
+ colors = magic.sort_colors(img, colors)
+ return colors
+
+
+def send_sequences(colors, vte):
+ """Send the sequences."""
+ sequences.send_sequences(colors, vte)
+
+
+def reload_env():
+ """Reload the environment."""
+ reload.reload_env()
+
+
+def set_wallpaper(img):
+ """Set the wallpaper."""
+ wallpaper.set_wallpaper(img)
+
+
+# def reload_colors(vte):
+# """Reload the colors."""
+# sequences.reload_colors(vte)