forked from Shinonome/caelestia-cli
feat: impl wallpaper
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import json
|
||||
from argparse import Namespace
|
||||
|
||||
from caelestia.utils.wallpaper import get_colours_for_wall, get_wallpaper, set_random, set_wallpaper
|
||||
|
||||
|
||||
class Command:
|
||||
args: Namespace
|
||||
@@ -8,4 +11,11 @@ class Command:
|
||||
self.args = args
|
||||
|
||||
def run(self) -> None:
|
||||
pass
|
||||
if self.args.print:
|
||||
print(json.dumps(get_colours_for_wall(self.args.print, self.args.no_smart)))
|
||||
elif self.args.file:
|
||||
set_wallpaper(self.args.file, self.args.no_smart)
|
||||
elif self.args.random:
|
||||
set_random(self.args)
|
||||
else:
|
||||
print(get_wallpaper())
|
||||
|
||||
Reference in New Issue
Block a user