diff options
| author | dylan araps <dylan.araps@gmail.com> | 2017-07-20 12:57:57 +1000 |
|---|---|---|
| committer | dylan araps <dylan.araps@gmail.com> | 2017-07-20 12:57:57 +1000 |
| commit | b8d6049aa89ae560efd03c2bdd3b372edd5392db (patch) | |
| tree | fc7669a92f209e227b320610162fc8702740098f /pywal/wal.py | |
| parent | 93b8c3a6d131a468d3347b061be947c754294260 (diff) | |
api: Move api funtions to wal.py
Diffstat (limited to 'pywal/wal.py')
| -rw-r--r-- | pywal/wal.py | 41 |
1 files changed, 41 insertions, 0 deletions
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) |
