i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit ed7185dca8b01a33d238866854ac6ec3ad4e0114
parent 9f675b8a850031138c8408a54fd14769461c4e4b
Author: felipe stival <v0idpwn@gmail.com>
Date:   Fri,  2 Oct 2020 09:49:39 -0300

Throw error when trying to start on Wayland (#290)


Diffstat:
Mi3lock.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -1038,6 +1038,8 @@ int main(int argc, char *argv[]) {
         err(EXIT_FAILURE, "getpwuid() failed");
     if ((username = pw->pw_name) == NULL)
         errx(EXIT_FAILURE, "pw->pw_name is NULL.");
+    if (getenv("WAYLAND_DISPLAY") != NULL)
+        errx(EXIT_FAILURE, "i3lock is a program for X11 and does not work on Wayland. Try https://github.com/swaywm/swaylock instead");
 
     char *optstring = "hvnbdc:p:ui:teI:f";
     while ((o = getopt_long(argc, argv, optstring, longopts, &longoptind)) != -1) {