args: Added -b to set custom background color

This commit is contained in:
Dylan Araps 2017-07-27 10:40:28 +10:00
parent 238d07ce41
commit 017547ff0a
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
[BASIC]
good-names=i3
disable=R0912
[SIMILARITIES]
ignore-imports=yes

View File

@ -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)