summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan araps <dylan.araps@gmail.com>2017-07-20 10:42:31 +1000
committerdylan araps <dylan.araps@gmail.com>2017-07-20 10:42:31 +1000
commit9587854303e66cba93738dac026e438cd3318673 (patch)
treee247ec22d3ee3c508196fc73c313293963a128f1
parent9c871ec567504c2566c4ce9f3d382f544cb62b57 (diff)
general: Start work on a proper api.
-rw-r--r--pywal/__init__.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/pywal/__init__.py b/pywal/__init__.py
index 006f780..853433d 100644
--- a/pywal/__init__.py
+++ b/pywal/__init__.py
@@ -3,3 +3,34 @@ 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)