mirror of
https://github.com/anufrievroman/waypaper.git
synced 2024-08-17 04:00:23 +03:00
Merge 050eba6e34
into 3cb3ef6a79
This commit is contained in:
commit
bfa12c25ae
@ -3,6 +3,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import json
|
||||||
|
|
||||||
from waypaper.aboutdata import AboutData
|
from waypaper.aboutdata import AboutData
|
||||||
from waypaper.app import App
|
from waypaper.app import App
|
||||||
@ -43,6 +44,7 @@ parser.add_argument("--restore", help=txt.msg_arg_rest, action="store_true")
|
|||||||
parser.add_argument("--random", help=txt.msg_arg_rand, action="store_true")
|
parser.add_argument("--random", help=txt.msg_arg_rand, action="store_true")
|
||||||
parser.add_argument("--fill", help=txt.msg_arg_fill, choices=FILL_OPTIONS)
|
parser.add_argument("--fill", help=txt.msg_arg_fill, choices=FILL_OPTIONS)
|
||||||
parser.add_argument("--backend", help=txt.msg_arg_back, choices=BACKEND_OPTIONS)
|
parser.add_argument("--backend", help=txt.msg_arg_back, choices=BACKEND_OPTIONS)
|
||||||
|
parser.add_argument("--list", help=txt.msg_arg_list, action='store_true')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@ -71,6 +73,12 @@ def run():
|
|||||||
if args.version:
|
if args.version:
|
||||||
print(f"{about.applicationName()} v.{about.applicationVersion()}")
|
print(f"{about.applicationName()} v.{about.applicationVersion()}")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
if args.list:
|
||||||
|
# Get the wallpapers and monitors and create a list of dictionaries
|
||||||
|
wallpapers_and_monitors = list(map(lambda x: {"monitor": x[0], "wallpaper": x[1]} ,zip(cf.monitors,cf.wallpapers_str.split(','))))
|
||||||
|
print(json.dumps(wallpapers_and_monitors))
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
# Start GUI:
|
# Start GUI:
|
||||||
app = App(txt)
|
app = App(txt)
|
||||||
|
Loading…
Reference in New Issue
Block a user