mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-06-22 07:02:45 +00:00
Compare commits
80 Commits
0.7
..
61e198d7a1
| Author | SHA1 | Date | |
|---|---|---|---|
| 61e198d7a1 | |||
| 9859268ca3 | |||
| f43772a20d | |||
| 8b27e5c859 | |||
| 32126eb87b | |||
| 4087f8a3c8 | |||
| db2cf6624e | |||
| 15bfffd87a | |||
| 90b8371707 | |||
| ea263a0ed5 | |||
| 67ff29eb95 | |||
| 661e1ee38c | |||
| 9dbce43a69 | |||
| 59c99308b0 | |||
| 02f8744a48 | |||
| d1880b4422 | |||
| 78e75a83a4 | |||
| 7d2415bfe8 | |||
| de57f6c315 | |||
| faa56cc9b9 | |||
| 4456f4536a | |||
| e0f531d508 | |||
| aa69ed81b5 | |||
| d1c2f43498 | |||
| da13a95683 | |||
| 9a9f67db1c | |||
| 4e7e2999d4 | |||
| 0925fe956a | |||
| 26504f9a6f | |||
| 6f34a6d3a6 | |||
| 30f5063474 | |||
| 1d08ade132 | |||
| 84245764e2 | |||
| 6ca87210d4 | |||
| 002c7d2204 | |||
| 8206cc8889 | |||
| 54f207839f | |||
| 9c05b9622c | |||
| d34be5d545 | |||
| c49312f084 | |||
| f899060965 | |||
| cc72df11d6 | |||
| 0312720ae8 | |||
| 6de87121e2 | |||
| bbc00d88a4 | |||
| 54b546121b | |||
| 43016bdad8 | |||
| b616476c85 | |||
| d4ad37354e | |||
| 5db05e82bd | |||
| 8ec5e52e06 | |||
| c5275ca571 | |||
| 2c0b889f86 | |||
| 554754c9a2 | |||
| 0caa658276 | |||
| 07aeef1f7e | |||
| e454f7ae81 | |||
| 334bbe6f0f | |||
| 1b805ddd38 | |||
| 94f4ead7da | |||
| bb21ecda30 | |||
| b25717c939 | |||
| a4fa954616 | |||
| 35951a8d7e | |||
| a634e3f527 | |||
| d136dadf45 | |||
| 672b4c405d | |||
| b5abbc37d8 | |||
| 986beef5be | |||
| 487abc28ba | |||
| cd216908a7 | |||
| f2c5023a3a | |||
| 4bbbb4907e | |||
| ea6a450121 | |||
| ad30ca910b | |||
| 452a314faa | |||
| da6de7c4d7 | |||
| 2553111aa3 | |||
| 51881da27b | |||
| 7328e5691c |
@@ -1 +1,3 @@
|
|||||||
Lennart Jablonka <humm@ljabl.com> <hummsmith42@gmail.com>
|
Lennart Jablonka <humm@ljabl.com> <hummsmith42@gmail.com>
|
||||||
|
Leonardo Hernández Hernández <leohdz172@proton.me> <leohdz172@outlook.com>
|
||||||
|
Leonardo Hernández Hernández <leohdz172@proton.me> <leohdz172@protonmail.com>
|
||||||
|
|||||||
+10
-7
@@ -8,6 +8,15 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
* Support for the linux-drm-syncobj-v1 protocol ([wlroots!4715][wlroots!4715], [#685][685])
|
||||||
|
* Allow the use of non-system wlroots library ([#646][646])
|
||||||
|
|
||||||
|
[wlroots!4715]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4715
|
||||||
|
[685]: https://codeberg.org/dwl/dwl/pulls/685
|
||||||
|
[646]: https://codeberg.org/dwl/dwl/pulls/646
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
@@ -21,7 +30,7 @@
|
|||||||
|
|
||||||
## 0.7
|
## 0.7
|
||||||
|
|
||||||
See also [0.6](#0.6) release notes. 0.7 builds against wlroots 0.18.x.
|
This version is just 0.6 with wlroots 0.18 compatibility.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -32,15 +41,9 @@ See also [0.6](#0.6) release notes. 0.7 builds against wlroots 0.18.x.
|
|||||||
[601]: https://codeberg.org/dwl/dwl/issues/601
|
[601]: https://codeberg.org/dwl/dwl/issues/601
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
* Crash when re-mapping unmapped clients.
|
|
||||||
|
|
||||||
|
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
Guido Cella
|
Guido Cella
|
||||||
Lennart Jablonka
|
|
||||||
|
|
||||||
|
|
||||||
## 0.6
|
## 0.6
|
||||||
|
|||||||
@@ -6,20 +6,21 @@ include config.mk
|
|||||||
# flags for compiling
|
# flags for compiling
|
||||||
DWLCPPFLAGS = -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L \
|
DWLCPPFLAGS = -I. -DWLR_USE_UNSTABLE -D_POSIX_C_SOURCE=200809L \
|
||||||
-DVERSION=\"$(VERSION)\" $(XWAYLAND)
|
-DVERSION=\"$(VERSION)\" $(XWAYLAND)
|
||||||
DWLDEVCFLAGS = -g -pedantic -Wall -Wextra -Wdeclaration-after-statement \
|
DWLDEVCFLAGS = -g -Wpedantic -Wall -Wextra -Wdeclaration-after-statement \
|
||||||
-Wno-unused-parameter -Wshadow -Wunused-macros -Werror=strict-prototypes \
|
-Wno-unused-parameter -Wshadow -Wunused-macros -Werror=strict-prototypes \
|
||||||
-Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types \
|
-Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types \
|
||||||
-Wfloat-conversion
|
-Wfloat-conversion
|
||||||
|
|
||||||
# CFLAGS / LDFLAGS
|
# CFLAGS / LDFLAGS
|
||||||
PKGS = wlroots-0.18 wayland-server xkbcommon libinput $(XLIBS)
|
PKGS = wayland-server xkbcommon libinput $(XLIBS)
|
||||||
DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CFLAGS)
|
DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(WLR_INCS) $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CFLAGS)
|
||||||
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` -lm $(LIBS)
|
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(WLR_LIBS) -lm $(LIBS)
|
||||||
|
|
||||||
all: dwl
|
all: dwl
|
||||||
dwl: dwl.o util.o
|
dwl: dwl.o util.o
|
||||||
$(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
$(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
||||||
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \
|
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \
|
||||||
|
ext-image-copy-capture-v1-protocol.h \
|
||||||
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
|
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
|
||||||
wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
|
wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
|
||||||
util.o: util.c util.h
|
util.o: util.c util.h
|
||||||
@@ -33,6 +34,9 @@ WAYLAND_PROTOCOLS = `$(PKG_CONFIG) --variable=pkgdatadir wayland-protocols`
|
|||||||
cursor-shape-v1-protocol.h:
|
cursor-shape-v1-protocol.h:
|
||||||
$(WAYLAND_SCANNER) enum-header \
|
$(WAYLAND_SCANNER) enum-header \
|
||||||
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
|
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
|
||||||
|
ext-image-copy-capture-v1-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) enum-header \
|
||||||
|
$(WAYLAND_PROTOCOLS)/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml $@
|
||||||
pointer-constraints-unstable-v1-protocol.h:
|
pointer-constraints-unstable-v1-protocol.h:
|
||||||
$(WAYLAND_SCANNER) enum-header \
|
$(WAYLAND_SCANNER) enum-header \
|
||||||
$(WAYLAND_PROTOCOLS)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml $@
|
$(WAYLAND_PROTOCOLS)/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml $@
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# dwl - dwm for Wayland
|
# dwl - dwm for Wayland
|
||||||
|
|
||||||
Join us on our IRC channel: [#dwl on Libera Chat]
|
Join us on our IRC channel: [#dwl on Libera Chat]
|
||||||
Or on our [Discord server].
|
Or on the community-maintained [Discord server].
|
||||||
|
|
||||||
dwl is a compact, hackable compositor for [Wayland] based on [wlroots]. It is
|
dwl is a compact, hackable compositor for [Wayland] based on [wlroots]. It is
|
||||||
intended to fill the same space in the Wayland world that dwm does in X11,
|
intended to fill the same space in the Wayland world that dwm does in X11,
|
||||||
@@ -14,13 +14,12 @@ philosophy. Like dwm, dwl is:
|
|||||||
|
|
||||||
## Getting Started:
|
## Getting Started:
|
||||||
|
|
||||||
### **dwl branch 0.7 and releases based upon 0.7 build against [wlroots] 0.18**
|
|
||||||
|
|
||||||
### Latest semi-stable [release]
|
### Latest semi-stable [release]
|
||||||
This is probably where you want to start. This builds against the dependent
|
This is probably where you want to start. This builds against the [wlroots]
|
||||||
packages' versions currently shipping in major distributions. If your
|
versions currently shipping in major distributions. If your
|
||||||
distribution's wlroots version is older, use an earlier dwl [release] or [0.x
|
distribution's `wlroots` version is older, use an earlier dwl [release].
|
||||||
branch].
|
The `wlroots` version against which a given `dwl` release builds is specified
|
||||||
|
with each release on the [release] page
|
||||||
|
|
||||||
### Development branch [main]
|
### Development branch [main]
|
||||||
Active development progresses on the `main` branch. The `main` branch is built
|
Active development progresses on the `main` branch. The `main` branch is built
|
||||||
@@ -76,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
|
||||||
@@ -104,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,
|
||||||
@@ -183,6 +182,7 @@ inspiration, and to the various contributors to the project, including:
|
|||||||
- Stivvo for output management and fullscreen support, and patch maintenance
|
- 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
|
[`systemd --user`]: https://wiki.archlinux.org/title/Systemd/User
|
||||||
[#dwl on Libera Chat]: https://web.libera.chat/?channels=#dwl
|
[#dwl on Libera Chat]: https://web.libera.chat/?channels=#dwl
|
||||||
[0.7-rc1]: https://codeberg.org/dwl/dwl/releases/tag/v0.7-rc1
|
[0.7-rc1]: https://codeberg.org/dwl/dwl/releases/tag/v0.7-rc1
|
||||||
|
|||||||
@@ -126,15 +126,14 @@ client_get_appid(Client *c)
|
|||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c))
|
||||||
return c->surface.xwayland->class;
|
return c->surface.xwayland->class ? c->surface.xwayland->class : "broken";
|
||||||
#endif
|
#endif
|
||||||
return c->surface.xdg->toplevel->app_id;
|
return c->surface.xdg->toplevel->app_id ? c->surface.xdg->toplevel->app_id : "broken";
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
client_get_clip(Client *c, struct wlr_box *clip)
|
client_get_clip(Client *c, struct wlr_box *clip)
|
||||||
{
|
{
|
||||||
struct wlr_box xdg_geom = {0};
|
|
||||||
*clip = (struct wlr_box){
|
*clip = (struct wlr_box){
|
||||||
.x = 0,
|
.x = 0,
|
||||||
.y = 0,
|
.y = 0,
|
||||||
@@ -147,9 +146,8 @@ client_get_clip(Client *c, struct wlr_box *clip)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wlr_xdg_surface_get_geometry(c->surface.xdg, &xdg_geom);
|
clip->x = c->surface.xdg->geometry.x;
|
||||||
clip->x = xdg_geom.x;
|
clip->y = c->surface.xdg->geometry.y;
|
||||||
clip->y = xdg_geom.y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
@@ -164,7 +162,7 @@ client_get_geometry(Client *c, struct wlr_box *geom)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
wlr_xdg_surface_get_geometry(c->surface.xdg, geom);
|
*geom = c->surface.xdg->geometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Client *
|
static inline Client *
|
||||||
@@ -200,9 +198,9 @@ client_get_title(Client *c)
|
|||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c))
|
||||||
return c->surface.xwayland->title;
|
return c->surface.xwayland->title ? c->surface.xwayland->title : "broken";
|
||||||
#endif
|
#endif
|
||||||
return c->surface.xdg->toplevel->title;
|
return c->surface.xdg->toplevel->title ? c->surface.xdg->toplevel->title : "broken";
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@@ -215,16 +213,15 @@ client_is_float_type(Client *c)
|
|||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c)) {
|
||||||
struct wlr_xwayland_surface *surface = c->surface.xwayland;
|
struct wlr_xwayland_surface *surface = c->surface.xwayland;
|
||||||
xcb_size_hints_t *size_hints = surface->size_hints;
|
xcb_size_hints_t *size_hints = surface->size_hints;
|
||||||
size_t i;
|
|
||||||
if (surface->modal)
|
if (surface->modal)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
for (i = 0; i < surface->window_type_len; i++)
|
if (wlr_xwayland_surface_has_window_type(surface, WLR_XWAYLAND_NET_WM_WINDOW_TYPE_DIALOG)
|
||||||
if (surface->window_type[i] == netatom[NetWMWindowTypeDialog]
|
|| wlr_xwayland_surface_has_window_type(surface, WLR_XWAYLAND_NET_WM_WINDOW_TYPE_SPLASH)
|
||||||
|| surface->window_type[i] == netatom[NetWMWindowTypeSplash]
|
|| wlr_xwayland_surface_has_window_type(surface, WLR_XWAYLAND_NET_WM_WINDOW_TYPE_TOOLBAR)
|
||||||
|| surface->window_type[i] == netatom[NetWMWindowTypeToolbar]
|
|| wlr_xwayland_surface_has_window_type(surface, WLR_XWAYLAND_NET_WM_WINDOW_TYPE_UTILITY)) {
|
||||||
|| surface->window_type[i] == netatom[NetWMWindowTypeUtility])
|
return 1;
|
||||||
return 1;
|
}
|
||||||
|
|
||||||
return size_hints && size_hints->min_width > 0 && size_hints->min_height > 0
|
return size_hints && size_hints->min_width > 0 && size_hints->min_height > 0
|
||||||
&& (size_hints->max_width == size_hints->min_width
|
&& (size_hints->max_width == size_hints->min_width
|
||||||
@@ -267,8 +264,8 @@ client_is_stopped(Client *c)
|
|||||||
|
|
||||||
wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL);
|
wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL);
|
||||||
if (waitid(P_PID, pid, &in, WNOHANG|WCONTINUED|WSTOPPED|WNOWAIT) < 0) {
|
if (waitid(P_PID, pid, &in, WNOHANG|WCONTINUED|WSTOPPED|WNOWAIT) < 0) {
|
||||||
/* This process is not our child process, while is very unluckely that
|
/* 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. */
|
* it is stopped, in order to do not skip frames, assume that it is. */
|
||||||
if (errno == ECHILD)
|
if (errno == ECHILD)
|
||||||
return 1;
|
return 1;
|
||||||
} else if (in.si_pid) {
|
} else if (in.si_pid) {
|
||||||
@@ -301,17 +298,6 @@ client_notify_enter(struct wlr_surface *s, struct wlr_keyboard *kb)
|
|||||||
wlr_seat_keyboard_notify_enter(seat, s, NULL, 0, NULL);
|
wlr_seat_keyboard_notify_enter(seat, s, NULL, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
client_restack_surface(Client *c)
|
|
||||||
{
|
|
||||||
#ifdef XWAYLAND
|
|
||||||
if (client_is_x11(c))
|
|
||||||
wlr_xwayland_surface_restack(c->surface.xwayland, NULL,
|
|
||||||
XCB_STACK_MODE_ABOVE);
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
client_send_close(Client *c)
|
client_send_close(Client *c)
|
||||||
{
|
{
|
||||||
@@ -344,6 +330,13 @@ client_set_fullscreen(Client *c, int fullscreen)
|
|||||||
wlr_xdg_toplevel_set_fullscreen(c->surface.xdg->toplevel, fullscreen);
|
wlr_xdg_toplevel_set_fullscreen(c->surface.xdg->toplevel, fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
client_set_scale(struct wlr_surface *s, float scale)
|
||||||
|
{
|
||||||
|
wlr_fractional_scale_v1_notify_scale(s, scale);
|
||||||
|
wlr_surface_set_preferred_buffer_scale(s, (int32_t)ceilf(scale));
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
client_set_size(Client *c, uint32_t width, uint32_t height)
|
client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||||
{
|
{
|
||||||
@@ -364,8 +357,11 @@ static inline void
|
|||||||
client_set_tiled(Client *c, uint32_t edges)
|
client_set_tiled(Client *c, uint32_t edges)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c)) {
|
||||||
|
wlr_xwayland_surface_set_maximized(c->surface.xwayland,
|
||||||
|
edges != WLR_EDGE_NONE, edges != WLR_EDGE_NONE);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (wl_resource_get_version(c->surface.xdg->toplevel->resource)
|
if (wl_resource_get_version(c->surface.xdg->toplevel->resource)
|
||||||
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
|
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
|
||||||
@@ -391,8 +387,8 @@ client_wants_focus(Client *c)
|
|||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
return client_is_unmanaged(c)
|
return client_is_unmanaged(c)
|
||||||
&& wlr_xwayland_or_surface_wants_focus(c->surface.xwayland)
|
&& wlr_xwayland_surface_override_redirect_wants_focus(c->surface.xwayland)
|
||||||
&& wlr_xwayland_icccm_input_model(c->surface.xwayland) != WLR_ICCCM_INPUT_MODEL_NONE;
|
&& wlr_xwayland_surface_icccm_input_model(c->surface.xwayland) != WLR_ICCCM_INPUT_MODEL_NONE;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
_VERSION = 0.7
|
_VERSION = 0.8-dev
|
||||||
VERSION = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`
|
VERSION = `git describe --tags --dirty 2>/dev/null || echo $(_VERSION)`
|
||||||
|
|
||||||
PKG_CONFIG = pkg-config
|
PKG_CONFIG = pkg-config
|
||||||
@@ -8,10 +8,29 @@ PREFIX = /usr/local
|
|||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
DATADIR = $(PREFIX)/share
|
DATADIR = $(PREFIX)/share
|
||||||
|
|
||||||
|
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:
|
||||||
|
# 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 \
|
||||||
|
# -I$(PWD)/wlroots/include
|
||||||
|
# Set -rpath to avoid using the wrong library.
|
||||||
|
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.19
|
||||||
|
|
||||||
|
# Assuming you ran "meson setup --prefix ${PWD}/0.19 build && ninja -C build install"
|
||||||
|
#WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||||
|
# -I$(PWD)/wlroots/0.19/include/wlroots-0.19
|
||||||
|
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.19/lib64 -L$(PWD)/wlroots/0.19/lib64 -lwlroots-0.19
|
||||||
|
|
||||||
XWAYLAND =
|
XWAYLAND =
|
||||||
XLIBS =
|
XLIBS =
|
||||||
# Uncomment to build XWayland support
|
# Uncomment to build XWayland support
|
||||||
#XWAYLAND = -DXWAYLAND
|
#XWAYLAND = -DXWAYLAND
|
||||||
#XLIBS = xcb xcb-icccm
|
#XLIBS = xcb xcb-icccm
|
||||||
|
|
||||||
CC = gcc
|
# dwl itself only uses C99 features, but wlroots' headers use anonymous unions (C11).
|
||||||
|
# To avoid warnings about them, we do not use -std=c99 and instead of using the
|
||||||
|
# gmake default 'CC=c99', we use cc.
|
||||||
|
CC = cc
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ ecalloc(size_t nmemb, size_t size)
|
|||||||
int
|
int
|
||||||
fd_set_nonblock(int fd) {
|
fd_set_nonblock(int fd) {
|
||||||
int flags = fcntl(fd, F_GETFL);
|
int flags = fcntl(fd, F_GETFL);
|
||||||
if (flags < 0) {
|
if (flags < 0) {
|
||||||
perror("fcntl(F_GETFL):");
|
perror("fcntl(F_GETFL):");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
|
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
|
||||||
perror("fcntl(F_SETFL):");
|
perror("fcntl(F_SETFL):");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user