From 8c79f8dc155ba696572be30ee8c2ddfc577ae418 Mon Sep 17 00:00:00 2001 From: Ben Collerson Date: Tue, 10 Oct 2023 16:42:46 +1000 Subject: [PATCH 1/3] check client is mapped before setting border color For some reason brave configured for as a wayland client triggers this code on startup and segfaults. Checking if the client is mapped fixes this, like with the previous fix for urgent border colour. References: 887fde65a3010905aa10f373cfcfe540cfc1781e Fixes: 72a7d78a1a7926a207539eb50f44b2e1eb089d49 --- dwl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 4cfa4db..a7d41b0 100644 --- a/dwl.c +++ b/dwl.c @@ -2593,7 +2593,8 @@ urgent(struct wl_listener *listener, void *data) if (!c || c == focustop(selmon)) return; - client_set_border_color(c, urgentcolor); + if (client_is_mapped(c)) + client_set_border_color(c, urgentcolor); c->isurgent = 1; printstatus(); } From 7085057f6d75a259a399e6e0e65291804d7ceb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Wed, 11 Oct 2023 19:58:18 -0600 Subject: [PATCH 2/3] update README.md these things were changed in the code but not in the readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1ac5b4b..aa4591b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ given the base on which it is built. Implemented default features are: monitoring - Provide information to external status bars via stdout/stdin - Urgency hints via xdg-activate protocol -- Support screen lockers via input-inhibitor protocol +- Support screen lockers via ext-session-lock-v1 protocol - Various Wayland protocols - XWayland support as provided by wlroots (can be enabled in `config.mk`) - Zero flickering - Wayland users naturally expect that "every frame is perfect" @@ -83,6 +83,7 @@ When dwl is run with no arguments, it will launch the server and begin handling any shortcuts configured in `config.h`. There is no status bar or other decoration initially; these are instead clients that can be run within the Wayland session. +Do note that the background color is black. If you would like to run a script or command automatically at startup, you can specify the command using the `-s` option. This command will be executed as a @@ -106,7 +107,7 @@ automatically, you will need to configure it prior to launching `dwl`, e.g.: ### Status information -Information about selected layouts, current window title, and +Information about selected layouts, current window title, app-id, and selected/occupied/urgent tags is written to the stdin of the `-s` command (see the `printstatus()` function for details). This information can be used to populate an external status bar with a script that parses the information. From ab87410023a139c124bccb2817e567a7fa4fabab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Wed, 11 Oct 2023 19:52:26 -0600 Subject: [PATCH 3/3] clarify the dependencies needed by dwl Note that previous df131cdb78c6e3e79c3fafa522f0e4f6b43d2ab4 libX11 headers were also required for building (but not for runtime) Also, I want to apologize to the packagers for do not list *all* the required dependencies before. --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa4591b..62ae872 100644 --- a/README.md +++ b/README.md @@ -50,14 +50,28 @@ Feature *non-goals* for the main codebase include: ## Building dwl -dwl has only two dependencies: `wlroots` and `wayland-protocols`. +dwl has the following dependencies: +``` +libinput +wayland +wlroots (compiled with the libinput backend) +xkbcommon +wayland-protocols (compile-time only) +pkg-config (compile-time only) +``` +If you enable X11 support: +``` +libxcb +libxcb-wm +wlroots (compiled with X11 support) +Xwayland (runtime only) +``` Simply install these (and their `-devel` versions if your distro has separate development packages) and run `make`. If you wish to build against a Git version of wlroots, check out the [wlroots-next branch]. -To enable XWayland, you should also install xorg-xwayland and uncomment its flag -in `config.mk`. +To enable XWayland, you should uncomment its flags in `config.mk`. ## Configuration