12 Commits

Author SHA1 Message Date
A Frederick Christensen 535c2d39c0 Force cursor shape update after move/resize client 2025-08-14 20:03:14 -05:00
A Frederick Christensen ab4cb6e283 Revert "add support for ext-image-copy-capture-v1 and ext-image-capture-source-v1 (wlroots!4545)"
This reverts commit b28674e0ca.

This PR is not yet finalized. (Screen freezes).
2025-08-04 16:27:34 -05:00
Leonardo Hernández Hernández b28674e0ca add support for ext-image-copy-capture-v1 and ext-image-capture-source-v1 (wlroots!4545)
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4545
2025-08-04 23:08:53 +02:00
A Frederick Christensen 15bfffd87a fullscreen_bg defaults to black
Per conversation at PR #1147 with @kilpilainen
2025-06-18 23:41:14 -05:00
fauxmight 90b8371707 Update README.md
Correct description of default background color
2025-06-18 14:52:15 +02:00
Guido Cella ea263a0ed5 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.
2025-06-14 22:27:25 +02:00
Leonardo Hernández Hernández 67ff29eb95 document status output 2025-06-09 13:55:38 -06:00
Leonardo Hernández Hernández 661e1ee38c Use a subsection for mouse commands
also add missing ".El", s/Toggles/Toggle/ in second command and add newlines
after a full stop
2025-06-09 13:55:38 -06:00
Leonardo Hernández Hernández 9dbce43a69 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
2025-06-09 13:55:38 -06:00
Leonardo Hernández Hernández 59c99308b0 drop CAVEATS section from the man page
Since 71f11e6cf6 it is not longer the case
2025-06-09 13:55:37 -06:00
kilpilainen 02f8744a48 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
2025-06-09 13:39:40 -06:00
Nikita Ivanov d1880b4422 Fix crash disabling monitor with locked surface 2025-06-09 13:33:02 -06:00
4 changed files with 123 additions and 17 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ seatd daemon.
When dwl is run with no arguments, it will launch the server and begin handling 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 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 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`. modified in `config.h`.
If you would like to run a script or command automatically at startup, you can If you would like to run a script or command automatically at startup, you can
@@ -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 Information about selected layouts, current window title, app-id, and
selected/occupied/urgent tags is written to the stdin of the `-s` command (see 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 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 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, do want to run a startup command that does not consume the status information,
+1 -1
View File
@@ -12,7 +12,7 @@ static const float bordercolor[] = COLOR(0x444444ff);
static const float focuscolor[] = COLOR(0x005577ff); static const float focuscolor[] = COLOR(0x005577ff);
static const float urgentcolor[] = COLOR(0xff0000ff); static const float urgentcolor[] = COLOR(0xff0000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */ /* 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 */ /* tagging - TAGCOUNT must be no greater than 31 */
#define TAGCOUNT (9) #define TAGCOUNT (9)
+112 -12
View File
@@ -37,7 +37,7 @@ starts a shell process running
when starting. when starting.
When stopping, it sends When stopping, it sends
.Dv SIGTERM .Dv SIGTERM
to the child process and waits for it to exit. to the child process group and waits for it to exit.
.Pp .Pp
Users are encouraged to customize Users are encouraged to customize
.Nm .Nm
@@ -55,10 +55,10 @@ Move window to a single tag.
Toggle tag for window. Toggle tag for window.
.It Mod-p .It Mod-p
Spawn Spawn
.Nm wmenu-run . .Xr wmenu-run 1 .
.It Mod-Shift-Return .It Mod-Shift-Return
Spawn Spawn
.Nm foot . .Xr foot 1 .
.It Mod-[jk] .It Mod-[jk]
Move focus down/up the stack. Move focus down/up the stack.
.It Mod-[id] .It Mod-[id]
@@ -100,6 +100,114 @@ Quit
.Nm . .Nm .
.El .El
These might differ depending on your keyboard layout. These might differ depending on your keyboard layout.
.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.
.It Mod-Button2
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.
.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 <monitor>
.Ar <component>
.Ar <data>
.Ed
.Pp
.Bl -tag -width 11n -offset 0 -compact
.It Ar <monitor>
is the name given to the output.
.It Ar <component>
is one of (in order)
.Em title ,
.Em appid ,
.Em fullscreen ,
.Em floating ,
.Em selmon ,
.Em tags ,
.Em layout .
.It Ar <data>
changes depending on
.Ar <component> .
.Bl -tag -width 10n -compact
.It Em title
The title of the focused window on
.Ar <monitor>
or nothing if there is no focused window.
.It Em appid
The app_id of the focused window on
.Ar <monitor>
or nothing if there is no focused window.
.It Em fullscreen
Prints 1 if the focused window on
.Ar <monitor>
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 <monitor>
is in floating state, otherwise prints 0. If there is no focused
window it prints nothing.
.It Em selmon
Prints 1 if
.Ar <monitor>
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 <monitor> .
.It
Selected tags of
.Ar <monitor> .
.It
Tags of the focused window on
.Ar <monitor> .
.It
Tags where a window on
.Ar <monitor>
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 .Sh ENVIRONMENT
These environment variables are used by These environment variables are used by
.Nm : .Nm :
@@ -142,17 +250,9 @@ Start
with s6 in the background: with s6 in the background:
.Dl dwl \-s \(aqs6\-svscan <&\-\(aq .Dl dwl \-s \(aqs6\-svscan <&\-\(aq
.Sh SEE ALSO .Sh SEE ALSO
.Xr dwm 1 ,
.Xr foot 1 , .Xr foot 1 ,
.Xr wmenu 1 , .Xr wmenu 1 ,
.Xr dwm 1 ,
.Xr xkeyboard-config 7 .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 .Sh BUGS
All of them. All of them.
+8 -2
View File
@@ -483,7 +483,6 @@ applyrules(Client *c)
const Rule *r; const Rule *r;
Monitor *mon = selmon, *m; Monitor *mon = selmon, *m;
c->isfloating = client_is_float_type(c);
appid = client_get_appid(c); appid = client_get_appid(c);
title = client_get_title(c); title = client_get_title(c);
@@ -499,6 +498,8 @@ applyrules(Client *c)
} }
} }
} }
c->isfloating |= client_is_float_type(c);
setmon(c, mon, newtags); setmon(c, mon, newtags);
} }
@@ -660,6 +661,9 @@ buttonpress(struct wl_listener *listener, void *data)
selmon = xytomon(cursor->x, cursor->y); selmon = xytomon(cursor->x, cursor->y);
setmon(grabc, selmon, 0); setmon(grabc, selmon, 0);
grabc = NULL; grabc = NULL;
/* Force update to cursor shape */
xytonode(cursor->x, cursor->y, NULL, &c, NULL, NULL, NULL);
focusclient(c, 1);
return; return;
} }
cursor_mode = CurNormal; cursor_mode = CurNormal;
@@ -739,6 +743,8 @@ cleanupmon(struct wl_listener *listener, void *data)
wl_list_remove(&m->frame.link); wl_list_remove(&m->frame.link);
wl_list_remove(&m->link); wl_list_remove(&m->link);
wl_list_remove(&m->request_state.link); wl_list_remove(&m->request_state.link);
if (m->lock_surface)
destroylocksurface(&m->destroy_lock_surface, NULL);
m->wlr_output->data = NULL; m->wlr_output->data = NULL;
wlr_output_layout_remove(output_layout, m->wlr_output); wlr_output_layout_remove(output_layout, m->wlr_output);
wlr_scene_output_destroy(m->scene_output); wlr_scene_output_destroy(m->scene_output);
@@ -1963,7 +1969,7 @@ moveresize(const Arg *arg)
case CurMove: case CurMove:
grabcx = (int)round(cursor->x) - grabc->geom.x; grabcx = (int)round(cursor->x) - grabc->geom.x;
grabcy = (int)round(cursor->y) - grabc->geom.y; 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; break;
case CurResize: case CurResize:
/* Doesn't work for X11 output - the next absolute motion event /* Doesn't work for X11 output - the next absolute motion event