From e0f531d5087cbd1223577c77262ec7476c157088 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 12 Mar 2025 16:27:47 +0800 Subject: fix: crash when open some x11 app --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index ec4ca86..395b81d 100644 --- a/dwl.c +++ b/dwl.c @@ -3148,7 +3148,7 @@ sethints(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_hints); struct wlr_surface *surface = client_surface(c); - if (c == focustop(selmon)) + if (c == focustop(selmon) || !c->surface.xwayland->hints) return; c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints); -- cgit v1.2.3 From 4456f4536a483c127909151a84d7b62da4f40e8b Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 12 Mar 2025 16:17:44 +0800 Subject: fix: shouldn't configure uninitialized layer_surface --- dwl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dwl.c b/dwl.c index 395b81d..4816159 100644 --- a/dwl.c +++ b/dwl.c @@ -551,6 +551,9 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int wl_list_for_each(l, list, link) { struct wlr_layer_surface_v1 *layer_surface = l->layer_surface; + if (!layer_surface->initialized) + continue; + if (exclusive != (layer_surface->current.exclusive_zone > 0)) continue; -- cgit v1.2.3 From faa56cc9b9718e1b195a02682836fe040963eb7d Mon Sep 17 00:00:00 2001 From: fauxmight Date: Thu, 24 Apr 2025 04:28:44 +0000 Subject: Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1bcc36e..b8e3a3a 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,11 @@ philosophy. Like dwm, dwl is: ## Getting Started: ### Latest semi-stable [release] -This is probably where you want to start. This builds against the dependent -packages' versions currently shipping in major distributions. If your -distribution's wlroots version is older, use an earlier dwl [release] or [0.x -branch]. +This is probably where you want to start. This builds against the [wlroots] +versions currently shipping in major distributions. If your +distribution's `wlroots` version is older, use an earlier dwl [release]. +The `wlroots` version against which a given `dwl` release builds is specified +with each release on the [release] page ### Development branch [main] Active development progresses on the `main` branch. The `main` branch is built @@ -181,6 +182,7 @@ inspiration, and to the various contributors to the project, including: - Stivvo for output management and fullscreen support, and patch maintenance +[wlroots]: https://gitlab.freedesktop.org/wlroots [`systemd --user`]: https://wiki.archlinux.org/title/Systemd/User [#dwl on Libera Chat]: https://web.libera.chat/?channels=#dwl [0.7-rc1]: https://codeberg.org/dwl/dwl/releases/tag/v0.7-rc1 -- cgit v1.2.3 From de57f6c315f0ad70b68e083ae9a1822e43f01586 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Sat, 7 Jun 2025 00:25:30 -0500 Subject: Cleanup comments --- client.h | 4 ++-- config.mk | 2 +- dwl.c | 49 +++++++++++++++++++++++++------------------------ 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/client.h b/client.h index f1e2ab5..d9f90bb 100644 --- a/client.h +++ b/client.h @@ -264,8 +264,8 @@ client_is_stopped(Client *c) wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL); if (waitid(P_PID, pid, &in, WNOHANG|WCONTINUED|WSTOPPED|WNOWAIT) < 0) { - /* This process is not our child process, while is very unluckely that - * it is stopped, in order to do not skip frames assume that it is. */ + /* This process is not our child process, while is very unlikely that + * it is stopped, in order to do not skip frames, assume that it is. */ if (errno == ECHILD) return 1; } else if (in.si_pid) { diff --git a/config.mk b/config.mk index e2f1816..eb08a05 100644 --- a/config.mk +++ b/config.mk @@ -11,7 +11,7 @@ DATADIR = $(PREFIX)/share WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.19` WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.19` -# Allow using an alternative wlroots installations +# Allow using an alternative wlroots installation # This has to have all the includes required by wlroots, e.g: # Assuming wlroots git repo is "${PWD}/wlroots" and you only ran "meson setup build && ninja -C build" #WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \ diff --git a/dwl.c b/dwl.c index 4816159..775dadf 100644 --- a/dwl.c +++ b/dwl.c @@ -609,8 +609,8 @@ axisnotify(struct wl_listener *listener, void *data) * for example when you move the scroll wheel. */ struct wlr_pointer_axis_event *event = data; wlr_idle_notifier_v1_notify_activity(idle_notifier, seat); - /* TODO: allow usage of scroll whell for mousebindings, it can be implemented - * checking the event's orientation and the delta of the event */ + /* TODO: allow usage of scroll wheel for mousebindings, it can be implemented + * by checking the event's orientation and the delta of the event */ /* Notify the client with pointer focus of the axis event. */ wlr_seat_pointer_notify_axis(seat, event->time_msec, event->orientation, event->delta, @@ -712,8 +712,8 @@ cleanup(void) destroykeyboardgroup(&kb_group->destroy, NULL); - /* If it's not destroyed manually it will cause a use-after-free of wlr_seat. - * Destroy it until it's fixed in the wlroots side */ + /* If it's not destroyed manually, it will cause a use-after-free of wlr_seat. + * Destroy it until it's fixed on the wlroots side */ wlr_backend_destroy(backend); wl_display_destroy(dpy); @@ -858,7 +858,7 @@ commitnotify(struct wl_listener *listener, void *data) /* * Get the monitor this client will be rendered on * Note that if the user set a rule in which the client is placed on - * a different monitor based on its title this will likely select + * a different monitor based on its title, this will likely select * a wrong monitor. */ applyrules(c); @@ -1212,7 +1212,7 @@ cursorconstrain(struct wlr_pointer_constraint_v1 *constraint) void cursorframe(struct wl_listener *listener, void *data) { - /* This event is forwarded by the cursor when a pointer emits an frame + /* This event is forwarded by the cursor when a pointer emits a frame * event. Frame events are sent after regular pointer events to group * multiple events together. For instance, two axis events may happen at the * same time, in which case a frame event won't be sent in between. */ @@ -1508,7 +1508,7 @@ focusstack(const Arg *arg) focusclient(c, 1); } -/* We probably should change the name of this, it sounds like +/* We probably should change the name of this: it sounds like it * will focus the topmost client of this mon, when actually will * only return that client */ Client * @@ -1780,8 +1780,8 @@ mapnotify(struct wl_listener *listener, void *data) /* Set initial monitor, tags, floating status, and focus: * we always consider floating, clients that have parent and thus - * we set the same tags and monitor than its parent, if not - * try to apply rules for them */ + * we set the same tags and monitor as its parent. + * If there is no parent, apply rules */ if ((p = client_get_parent(c))) { c->isfloating = 1; setmon(c, p->mon, p->tags); @@ -1841,8 +1841,7 @@ motionabsolute(struct wl_listener *listener, void *data) * motion event, from 0..1 on each axis. This happens, for example, when * wlroots is running under a Wayland window rather than KMS+DRM, and you * move the mouse over the window. You could enter the window from any edge, - * so we have to warp the mouse there. There is also some hardware which - * emits these events. */ + * so we have to warp the mouse there. Also, some hardware emits these events. */ struct wlr_pointer_motion_absolute_event *event = data; double lx, ly, dx, dy; @@ -2027,9 +2026,9 @@ apply_or_test: ok &= test ? wlr_output_test_state(wlr_output, &state) : wlr_output_commit_state(wlr_output, &state); - /* Don't move monitors if position wouldn't change, this to avoid - * wlroots marking the output as manually configured. - * wlr_output_layout_add does not like disabled outputs */ + /* Don't move monitors if position wouldn't change. This avoids + * wlroots marking the output as manually configured. + * wlr_output_layout_add does not like disabled outputs */ if (!test && wlr_output->enabled && (m->m.x != config_head->state.x || m->m.y != config_head->state.y)) wlr_output_layout_add(output_layout, wlr_output, config_head->state.x, config_head->state.y); @@ -2266,8 +2265,10 @@ run(char *startup_cmd) close(piperw[0]); } - /* Mark stdout as non-blocking to avoid people who does not close stdin - * nor consumes it in their startup script getting dwl frozen */ + /* Mark stdout as non-blocking to avoid the startup script + * causing dwl to freeze when a user neither closes stdin + * nor consumes standard input in his startup script */ + if (fd_set_nonblock(STDOUT_FILENO) < 0) close(STDOUT_FILENO); @@ -2278,7 +2279,7 @@ run(char *startup_cmd) selmon = xytomon(cursor->x, cursor->y); /* TODO hack to get cursor to display in its initial location (100, 100) - * instead of (0, 0) and then jumping. still may not be fully + * instead of (0, 0) and then jumping. Still may not be fully * initialized, as the image/coordinates are not transformed for the * monitor when displayed here */ wlr_cursor_warp_closest(cursor, NULL, cursor->x, cursor->y); @@ -2301,7 +2302,7 @@ setcursor(struct wl_listener *listener, void *data) * event, which will result in the client requesting set the cursor surface */ if (cursor_mode != CurNormal && cursor_mode != CurPressed) return; - /* This can be sent by any client, so we check to make sure this one is + /* This can be sent by any client, so we check to make sure this one * actually has pointer focus first. If so, we can tell the cursor to * use the provided surface as the cursor image. It will set the * hardware cursor on the output that it's currently on and continue to @@ -2317,7 +2318,7 @@ setcursorshape(struct wl_listener *listener, void *data) struct wlr_cursor_shape_manager_v1_request_set_shape_event *event = data; if (cursor_mode != CurNormal && cursor_mode != CurPressed) return; - /* This can be sent by any client, so we check to make sure this one is + /* This can be sent by any client, so we check to make sure this one * actually has pointer focus first. If so, we can tell the cursor to * use the provided cursor shape. */ if (event->seat_client == seat->pointer_state.focused_client) @@ -2420,7 +2421,7 @@ setpsel(struct wl_listener *listener, void *data) { /* This event is raised by the seat when a client wants to set the selection, * usually when the user copies something. wlroots allows compositors to - * ignore such requests if they so choose, but in dwl we always honor + * ignore such requests if they so choose, but in dwl we always honor them */ struct wlr_seat_request_set_primary_selection_event *event = data; wlr_seat_set_primary_selection(seat, event->source, event->serial); @@ -2431,7 +2432,7 @@ setsel(struct wl_listener *listener, void *data) { /* This event is raised by the seat when a client wants to set the selection, * usually when the user copies something. wlroots allows compositors to - * ignore such requests if they so choose, but in dwl we always honor + * ignore such requests if they so choose, but in dwl we always honor them */ struct wlr_seat_request_set_selection_event *event = data; wlr_seat_set_selection(seat, event->source, event->serial); @@ -2478,9 +2479,9 @@ setup(void) wl_signal_add(&drw->events.lost, &gpu_reset); /* Create shm, drm and linux_dmabuf interfaces by ourselves. - * The simplest way is call: + * The simplest way is to call: * wlr_renderer_init_wl_display(drw); - * but we need to create manually the linux_dmabuf interface to integrate it + * but we need to create the linux_dmabuf interface manually to integrate it * with wlr_scene. */ wlr_renderer_init_wl_shm(drw, dpy); @@ -2529,7 +2530,7 @@ setup(void) power_mgr = wlr_output_power_manager_v1_create(dpy); wl_signal_add(&power_mgr->events.set_mode, &output_power_mgr_set_mode); - /* Creates an output layout, which a wlroots utility for working with an + /* Creates an output layout, which is a wlroots utility for working with an * arrangement of screens in a physical layout. */ output_layout = wlr_output_layout_create(dpy); wl_signal_add(&output_layout->events.change, &layout_change); -- cgit v1.2.3 From 7d2415bfe854cccc2bcf2709fecc1eaacddbe903 Mon Sep 17 00:00:00 2001 From: mcsimw Date: Fri, 16 May 2025 06:24:58 +0000 Subject: Update config.mk compiles and works fine on wlroots-0.20 --- config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index eb08a05..f641d04 100644 --- a/config.mk +++ b/config.mk @@ -8,8 +8,8 @@ PREFIX = /usr/local MANDIR = $(PREFIX)/share/man DATADIR = $(PREFIX)/share -WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.19` -WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.19` +WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20` +WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20` # Allow using an alternative wlroots installation # This has to have all the includes required by wlroots, e.g: -- cgit v1.2.3 From 78e75a83a4541d0fd4c5b0be56057380a5fb639e Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Mon, 9 Jun 2025 00:18:17 -0500 Subject: Revert "Update config.mk" This reverts commit 7d2415bfe854cccc2bcf2709fecc1eaacddbe903. Will stick with wlroots 0.19 for now. --- config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index f641d04..eb08a05 100644 --- a/config.mk +++ b/config.mk @@ -8,8 +8,8 @@ PREFIX = /usr/local MANDIR = $(PREFIX)/share/man DATADIR = $(PREFIX)/share -WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20` -WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20` +WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.19` +WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.19` # Allow using an alternative wlroots installation # This has to have all the includes required by wlroots, e.g: -- cgit v1.2.3 From d1880b44223701c91b51b319fc69a0f63044f861 Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Tue, 4 Feb 2025 20:51:06 +0100 Subject: Fix crash disabling monitor with locked surface --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwl.c b/dwl.c index 775dadf..5beef8b 100644 --- a/dwl.c +++ b/dwl.c @@ -739,6 +739,8 @@ cleanupmon(struct wl_listener *listener, void *data) wl_list_remove(&m->frame.link); wl_list_remove(&m->link); wl_list_remove(&m->request_state.link); + if (m->lock_surface) + destroylocksurface(&m->destroy_lock_surface, NULL); m->wlr_output->data = NULL; wlr_output_layout_remove(output_layout, m->wlr_output); wlr_scene_output_destroy(m->scene_output); -- cgit v1.2.3 From 02f8744a486713bfac41661e7c5590ec11ec8989 Mon Sep 17 00:00:00 2001 From: kilpilainen <> Date: Thu, 27 Mar 2025 16:07:45 +0200 Subject: Use `all-scroll` instead of `fleur` xcursor shape for window dragging When there are no xcursor themes available, Wayland uses its own built-in shapes [1]. Wayland (and thus to extend wlroots) is based on the XDG's cursor spec [2], which itself is based on CSS' [3][4], neither of which define `fleur` shape. So dwl, without any external themes, falls back to `default` shape when dragging a window. There is `all-scroll` shape that is being symlinked to (or vice versa) by `move`, `dnd-move`, `grabbed` and `fleur` shapes by various themes. Since `all-scroll` is being symlinked to anyway, and has been part of all relevant specs as the shape for this use case for a very long time now, use it instead. [1] https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/cursor/cursor-data.h#L559 [2] https://www.freedesktop.org/wiki/Specifications/cursor-spec [3] https://drafts.csswg.org/css-ui/#cursor [4] https://developer.mozilla.org/en-US/docs/Web/CSS/cursor --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 5beef8b..76b7755 100644 --- a/dwl.c +++ b/dwl.c @@ -1965,7 +1965,7 @@ moveresize(const Arg *arg) case CurMove: grabcx = (int)round(cursor->x) - grabc->geom.x; grabcy = (int)round(cursor->y) - grabc->geom.y; - wlr_cursor_set_xcursor(cursor, cursor_mgr, "fleur"); + wlr_cursor_set_xcursor(cursor, cursor_mgr, "all-scroll"); break; case CurResize: /* Doesn't work for X11 output - the next absolute motion event -- cgit v1.2.3 From 59c99308b0cad19f48fa0586aca40eaec58695a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Sun, 28 Jul 2024 12:28:31 -0600 Subject: drop CAVEATS section from the man page Since 71f11e6cf63289d51f152469a0da81a85fe2608c it is not longer the case --- dwl.1 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/dwl.1 b/dwl.1 index 780c78f..f254096 100644 --- a/dwl.1 +++ b/dwl.1 @@ -146,13 +146,5 @@ with s6 in the background: .Xr wmenu 1 , .Xr dwm 1 , .Xr xkeyboard-config 7 -.Sh CAVEATS -The child process's standard input is connected with a pipe to -.Nm . -If the child process neither reads from the pipe nor closes its -standard input, -.Nm -will freeze after a while due to it blocking when writing to the full -pipe buffer. .Sh BUGS All of them. -- cgit v1.2.3 From 9dbce43a69988b62430f6060f30049fb6ab036f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Fri, 27 Sep 2024 21:18:47 -0600 Subject: document mouse button actions [sevz: commit message is mine. The content was written by scottro11 and shared in https://codeberg.org/dwl/dwl/issues/697] Closes: https://codeberg.org/dwl/dwl/issues/697 --- dwl.1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dwl.1 b/dwl.1 index f254096..65648f4 100644 --- a/dwl.1 +++ b/dwl.1 @@ -100,6 +100,16 @@ Quit .Nm . .El These might differ depending on your keyboard layout. +.Sh Mouse commands +.Bl -tag -width 20n -offset indent -compact +.It Mod-Button1 +Move focused window while dragging. Tiled windows will be toggled to the floating state. +.It Mod-Button2 +Toggles focused window between floating and tiled state. +.It Mod-Button3 +Resize focused window while dragging. Tiled windows will be toggled to +the +floating state. .Sh ENVIRONMENT These environment variables are used by .Nm : -- cgit v1.2.3 From 661e1ee38ceeb6e8e41b32ea13dc2eec591afba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Fri, 27 Sep 2024 22:20:16 -0600 Subject: Use a subsection for mouse commands also add missing ".El", s/Toggles/Toggle/ in second command and add newlines after a full stop --- dwl.1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dwl.1 b/dwl.1 index 65648f4..fccf569 100644 --- a/dwl.1 +++ b/dwl.1 @@ -100,16 +100,17 @@ Quit .Nm . .El These might differ depending on your keyboard layout. -.Sh Mouse commands +.Ss Mouse commands .Bl -tag -width 20n -offset indent -compact .It Mod-Button1 -Move focused window while dragging. Tiled windows will be toggled to the floating state. +Move focused window while dragging. +Tiled windows will be toggled to the floating state. .It Mod-Button2 -Toggles focused window between floating and tiled state. +Toggle focused window between floating and tiled state. .It Mod-Button3 -Resize focused window while dragging. Tiled windows will be toggled to -the -floating state. +Resize focused window while dragging. +Tiled windows will be toggled to the floating state. +.El .Sh ENVIRONMENT These environment variables are used by .Nm : -- cgit v1.2.3 From 67ff29eb953b135d95371b462fc8f14e89d839f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Thu, 26 Dec 2024 21:10:36 -0600 Subject: document status output --- README.md | 2 +- dwl.1 | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 102 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b8e3a3a..b876fdb 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ automatically, you will need to configure it prior to launching `dwl`, e.g.: 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 +the `STATUS INFORMATION` section in `_dwl_(1)`). This information can be used to populate an external status bar with a script that parses the information. Failing to read this information will cause dwl to block, so if you do want to run a startup command that does not consume the status information, diff --git a/dwl.1 b/dwl.1 index fccf569..7fee870 100644 --- a/dwl.1 +++ b/dwl.1 @@ -37,7 +37,7 @@ starts a shell process running when starting. When stopping, it sends .Dv SIGTERM -to the child process and waits for it to exit. +to the child process group and waits for it to exit. .Pp Users are encouraged to customize .Nm @@ -55,10 +55,10 @@ Move window to a single tag. Toggle tag for window. .It Mod-p Spawn -.Nm wmenu-run . +.Xr wmenu-run 1 . .It Mod-Shift-Return Spawn -.Nm foot . +.Xr foot 1 . .It Mod-[jk] Move focus down/up the stack. .It Mod-[id] @@ -111,6 +111,103 @@ Toggle focused window between floating and tiled state. Resize focused window while dragging. Tiled windows will be toggled to the floating state. .El +.Sh STATUS INFORMATION +.Nm +writes its status information to standard output. +If the +.Fl s +option is given, the status information is written to the standard input of the +child process instead. +.Pp +Said information has the following format: +.Bd -ragged -offset indent +.Ar +.Ar +.Ar +.Ed +.Pp +.Bl -tag -width 11n -offset 0 -compact +.It Ar +is the name given to the output. +.It Ar +is one of (in order) +.Em title , +.Em appid , +.Em fullscreen , +.Em floating , +.Em selmon , +.Em tags , +.Em layout . +.It Ar +changes depending on +.Ar . +.Bl -tag -width 10n -compact +.It Em title +The title of the focused window on +.Ar +or nothing if there is no focused window. +.It Em appid +The app_id of the focused window on +.Ar +or nothing if there is no focused window. +.It Em fullscreen +Prints 1 if the focused window on +.Ar +is in fullscreen state, otherwise prints 0. If there is no focused +window it prints nothing. +.It Em floating +Prints 1 if the focused window on +.Ar +is in floating state, otherwise prints 0. If there is no focused +window it prints nothing. +.It Em selmon +Prints 1 if +.Ar +is the selected monitor, otherwise prints 0. +.It Em tags +Prints four bitmasks in the following order: +.Bl -bullet -width 2n -compact +.It +Occupied tags of +.Ar . +.It +Selected tags of +.Ar . +.It +Tags of the focused window on +.Ar . +.It +Tags where a window on +.Ar +requested activation or has urgency hints. +.El +The bitmasks are 32-bit unsigned decimal integers. +.It Em layout +Prints the symbol of the current layout. +.El +.El +.Ss Examples +When there is a selected window: +.Bd -literal -offset indent +HDMI\-A\-1 title \(ti/source/repos/dwl > man \-l dwl.1 +HDMI\-A\-1 appid footclient +HDMI\-A\-1 fullscreen 0 +HDMI\-A\-1 floating 0 +HDMI\-A\-1 selmon 1 +HDMI\-A\-1 tags 271 4 4 0 +HDMI\-A\-1 layout [T] +.Ed +.Pp +When there is no selected window: +.Bd -literal -offset indent +HDMI\-A\-1 title +HDMI\-A\-1 appid +HDMI\-A\-1 fullscreen +HDMI\-A\-1 floating +HDMI\-A\-1 selmon 1 +HDMI\-A\-1 tags 271 512 0 0 +HDMI\-A\-1 layout [T] +.Ed .Sh ENVIRONMENT These environment variables are used by .Nm : @@ -153,9 +250,9 @@ Start with s6 in the background: .Dl dwl \-s \(aqs6\-svscan <&\-\(aq .Sh SEE ALSO +.Xr dwm 1 , .Xr foot 1 , .Xr wmenu 1 , -.Xr dwm 1 , .Xr xkeyboard-config 7 .Sh BUGS All of them. -- cgit v1.2.3 From ea263a0ed50d62033ca305fe7a4c5c36fddb4755 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sat, 14 Jun 2025 22:27:25 +0200 Subject: float sub-windows matching a rule Currently when a rule that doesn't make windows floating matches, even sub-windows of float type get tiled rather than just the main window. This is inconsistent with dwm and other compositors. Fix this by making these windows floating after applying rules. Fixes #1142. --- dwl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 76b7755..12f441e 100644 --- a/dwl.c +++ b/dwl.c @@ -483,7 +483,6 @@ applyrules(Client *c) const Rule *r; Monitor *mon = selmon, *m; - c->isfloating = client_is_float_type(c); appid = client_get_appid(c); title = client_get_title(c); @@ -499,6 +498,8 @@ applyrules(Client *c) } } } + + c->isfloating |= client_is_float_type(c); setmon(c, mon, newtags); } -- cgit v1.2.3 From 90b8371707a136a2c8f2f20a3fa9d3dd7bd3ed5c Mon Sep 17 00:00:00 2001 From: fauxmight Date: Wed, 18 Jun 2025 14:52:15 +0200 Subject: Update README.md Correct description of default background color --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b876fdb..364e3ca 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ seatd daemon. 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 default background color is black. This can be +Wayland session. Do note that the default background color is grey. This can be modified in `config.h`. If you would like to run a script or command automatically at startup, you can -- cgit v1.2.3 From 15bfffd87a6f9da0bc551db95c7c2a9a069b3708 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Wed, 18 Jun 2025 23:41:14 -0500 Subject: fullscreen_bg defaults to black Per conversation at PR #1147 with @kilpilainen --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 22d2171..95c2afa 100644 --- a/config.def.h +++ b/config.def.h @@ -12,7 +12,7 @@ static const float bordercolor[] = COLOR(0x444444ff); static const float focuscolor[] = COLOR(0x005577ff); static const float urgentcolor[] = COLOR(0xff0000ff); /* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */ -static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */ +static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You can also use glsl colors */ /* tagging - TAGCOUNT must be no greater than 31 */ #define TAGCOUNT (9) -- cgit v1.2.3