From 017547ff0a1dad869133c81d184a4a94f76b8f87 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 27 Jul 2017 10:40:28 +1000 Subject: [PATCH] args: Added -b to set custom background color --- .pylintrc | 1 + pywal/__main__.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.pylintrc b/.pylintrc index 10e9185..d8263a8 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,5 +1,6 @@ [BASIC] good-names=i3 +disable=R0912 [SIMILARITIES] ignore-imports=yes diff --git a/pywal/__main__.py b/pywal/__main__.py index 0935916..98cafe4 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -33,6 +33,9 @@ def get_args(args): help="Set terminal background transparency. \ *Only works in URxvt*") + arg.add_argument("-b", metavar="background", + help="Custom background color to use.") + arg.add_argument("-c", action="store_true", help="Delete all cached colorschemes.") @@ -100,6 +103,10 @@ def process_args(args): if args.f: colors_plain = colors.file(args.f) + if args.b: + colors_plain["special"]["background"] = args.b + colors_plain["colors"]["color0"] = args.b + if args.i or args.f: sequences.send(colors_plain, args.t)