mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 03:13:47 +01:00
theme: Don't use oomox by default. -g now does the inverse.
This commit is contained in:
parent
a671152ff5
commit
c0fd6deff2
@ -46,7 +46,7 @@ def get_args(args):
|
||||
help="Which colorscheme file to use.")
|
||||
|
||||
arg.add_argument("-g", action="store_true",
|
||||
help="Skip generating oomox theme.")
|
||||
help="Generate an oomox theme.")
|
||||
|
||||
arg.add_argument("-n", action="store_true",
|
||||
help="Skip setting the wallpaper.")
|
||||
@ -146,8 +146,8 @@ def process_args(args):
|
||||
if args.o:
|
||||
util.disown([args.o])
|
||||
|
||||
if not args.e and not args.g:
|
||||
reload.oomox()
|
||||
if not args.e:
|
||||
reload.oomox(args.g)
|
||||
reload.gtk()
|
||||
|
||||
|
||||
|
@ -28,16 +28,22 @@ def xrdb(xrdb_files=None):
|
||||
subprocess.run(["xrdb", "-merge", "-nocpp", file])
|
||||
|
||||
|
||||
def oomox():
|
||||
def oomox(gen_theme):
|
||||
"""Call oomox to generate a theme."""
|
||||
if gen_theme:
|
||||
if not shutil.which("oomox-cli"):
|
||||
print("gtk: oomox not found, skipping...")
|
||||
return
|
||||
|
||||
oomox_file = os.path.join(CACHE_DIR, "colors-oomox")
|
||||
|
||||
if shutil.which("oomox-cli"):
|
||||
print("reload: Waiting for oomox...")
|
||||
print("reload: Use -g to skip running oomox.")
|
||||
subprocess.run(["oomox-cli", "-o", "wal", oomox_file],
|
||||
stdout=subprocess.DEVNULL)
|
||||
|
||||
else:
|
||||
print("gtk: Use -g to generate an oomox theme.")
|
||||
|
||||
|
||||
def gtk():
|
||||
"""Reload GTK theme on the fly."""
|
||||
|
Loading…
Reference in New Issue
Block a user