From eabc06e7eb9e5cb08c8177f49753dedc505076b4 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Sun, 17 Dec 2023 10:54:46 -0500 Subject: 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.) --- swaybg.1.scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'swaybg.1.scd') 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* -- cgit v1.2.3