summaryrefslogtreecommitdiff
path: root/swaybg.1.scd
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2023-12-17 10:54:46 -0500
committerSimon Ser <contact@emersion.fr>2023-12-20 16:17:23 +0100
commiteabc06e7eb9e5cb08c8177f49753dedc505076b4 (patch)
treec4b8b8520fe82d1bf84ac421ad19df74b62090fa /swaybg.1.scd
parent435be14610a4b4538adc6a926160ed434ff630fa (diff)
downloadswaybg-eabc06e7eb9e5cb08c8177f49753dedc505076b4.tar.gz
swaybg-eabc06e7eb9e5cb08c8177f49753dedc505076b4.tar.bz2
Unify color validation and parsing functions
Before this change, parse_color() and is_valid_color() behaved slightly differently: parse_color() accepted both colors with and without alpha, with optional leading #, while is_valid_color() forbade alpha and required a leading # character. This commit merges the two functions into one simpler function that forbids alpha and allows an optional leading #. (Alpha values are forbidden because backgrounds should be opaque; a leading # is optional to make shell scripts easier to write.)
Diffstat (limited to '')
-rw-r--r--swaybg.1.scd2
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybg.1.scd b/swaybg.1.scd
index adf172f..4175225 100644
--- a/swaybg.1.scd
+++ b/swaybg.1.scd
@@ -16,7 +16,7 @@ these options.
# OPTIONS
-*-c, --color* <#rrggbb>
+*-c, --color* <[#]rrggbb>
Set the background color.
*-h, --help*