From ae26713c9ce780a97f3ee74afdb47a0c5b569ed4 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Tue, 15 Jul 2025 14:45:22 +0200 Subject: main: change background color to #a3a3a3 This is a port of the change I made to i3lock a couple of years ago, see: https://github.com/i3/i3lock/pull/300/commits FFFFFF can cause varying degrees of uncomfortableness to users like me, especially during night time. Uncomfortableness can mean "migraines" or being woken up if the electric wiring is suboptimal, causing a desktop to wake up (the latter of which is why I opened the i3lock PR, despite the effort associated with changing defaults). However, the choice of a color that is not solid white helps users tell whether their computer is turned off or not. Light gray (#a3a3a3) is a compromise that is bright, but not "flashbang levels" of bright. This compromise was met after a long discussion with the i3lock developers, and, given the similarities between i3lock and swaylock, this change could be sensible for swaylock as well. --- main.c | 4 ++-- swaylock.1.scd | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 4461304..cce8f4b 100644 --- a/main.c +++ b/main.c @@ -397,7 +397,7 @@ static void load_image(char *arg, struct swaylock_state *state) { } static void set_default_colors(struct swaylock_colors *colors) { - colors->background = 0xFFFFFFFF; + colors->background = 0xA3A3A3FF; colors->bs_highlight = 0xDB3300FF; colors->key_highlight = 0x33DB00FF; colors->caps_lock_bs_highlight = 0xDB3300FF; @@ -546,7 +546,7 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, " -C, --config " "Path to the config file.\n" " -c, --color " - "Turn the screen into the given color instead of white.\n" + "Turn the screen into the given color instead of light gray.\n" " -d, --debug " "Enable debugging output.\n" " -e, --ignore-empty-password " diff --git a/swaylock.1.scd b/swaylock.1.scd index 33ec5a0..418ab55 100644 --- a/swaylock.1.scd +++ b/swaylock.1.scd @@ -80,9 +80,9 @@ Locks your Wayland session. Same as --scaling=tile. *-c, --color* - Turn the screen into the given color instead of white. If -i is used, this - sets the background of the image to the given color. Defaults to white - (FFFFFF). + Turn the screen into the given color instead of light gray. If -i is used, + this sets the background of the image to the given color. Defaults to light + gray (A3A3A3). *--bs-hl-color* Sets the color of backspace highlight segments. -- cgit v1.2.3