Compare commits
10 Commits
9ba7461f4d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2d03cf618 | ||
|
|
cb4cc3ae8f | ||
|
|
9b76ee8e90 | ||
|
|
908a73da82 | ||
|
|
227cdf0128 | ||
|
|
ca4123072d | ||
|
|
a8915224e8 | ||
|
|
9b11a49cb7 | ||
|
|
53e3e60d4d | ||
|
|
9837ea5729 |
27
README.md
27
README.md
@@ -1,15 +1,8 @@
|
|||||||
# dwl - dwm for Wayland
|
# dwl - dwm for Wayland
|
||||||
|
|
||||||
2025-08-16:
|
Join us on our [Discord server]
|
||||||
dwl IS CURRENTLY UN-MAINTAINED.
|
Or Matrix: [#dwl-official:matrix.org]
|
||||||
AT THE PRESENT TIME, I (@fauxmight) DO NOT HAVE
|
Or on our IRC channel: [#dwl on Libera Chat]
|
||||||
THE TIME OR CAPACITY TO KEEP UP WITH [wlroots] CHANGES.
|
|
||||||
IF YOU ARE INTERESTED IN TAKING ON LEAD DEVELOPER RESPONSIBILITIES,
|
|
||||||
SEE ISSUE [#1166](https://codeberg.org/dwl/dwl/issues/1166).
|
|
||||||
---
|
|
||||||
|
|
||||||
Join us on our IRC channel: [#dwl on Libera Chat]
|
|
||||||
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,
|
||||||
@@ -31,11 +24,13 @@ 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
|
||||||
against a late (and often changing) git commit of wlroots. While the adventurous
|
against the latest release of [wlroots]. PRs should target this branch unless they
|
||||||
are welcome to use `main`, it is a rocky road. Using `main` requires that the
|
depend on functionality that is not in the current release of `wlroots`.
|
||||||
user be willing to chase git commits of wlroots. Testing development pull
|
|
||||||
requests may involve merging unmerged pull requests in [wlroots]' git repository
|
### Preview branch [wlroots-next]
|
||||||
and/or git commits of wayland.
|
The `wlroots-next` branch is built against the git version of [wlroots], which
|
||||||
|
is unstable and changes frequently. PRs requiring functionality from the git
|
||||||
|
version of `wlroots` should target this branch.
|
||||||
|
|
||||||
### Building dwl
|
### Building dwl
|
||||||
dwl has the following dependencies:
|
dwl has the following dependencies:
|
||||||
@@ -210,6 +205,7 @@ inspiration, and to the various contributors to the project, including:
|
|||||||
[dwl-patches]: https://codeberg.org/dwl/dwl-patches
|
[dwl-patches]: https://codeberg.org/dwl/dwl-patches
|
||||||
[list of useful resources on our wiki]: https://codeberg.org/dwl/dwl/wiki/Home#migrating-from-x
|
[list of useful resources on our wiki]: https://codeberg.org/dwl/dwl/wiki/Home#migrating-from-x
|
||||||
[main]: https://codeberg.org/dwl/dwl/src/branch/main
|
[main]: https://codeberg.org/dwl/dwl/src/branch/main
|
||||||
|
[wlroots-next]: https://codeberg.org/dwl/dwl/src/branch/wlroots-next
|
||||||
[release]: https://codeberg.org/dwl/dwl/releases
|
[release]: https://codeberg.org/dwl/dwl/releases
|
||||||
[runit]: http://smarden.org/runit/faq.html#userservices
|
[runit]: http://smarden.org/runit/faq.html#userservices
|
||||||
[s6]: https://skarnet.org/software/s6/
|
[s6]: https://skarnet.org/software/s6/
|
||||||
@@ -217,3 +213,4 @@ inspiration, and to the various contributors to the project, including:
|
|||||||
[wiki]: https://codeberg.org/dwl/dwl/wiki/Home#compatible-status-bars
|
[wiki]: https://codeberg.org/dwl/dwl/wiki/Home#compatible-status-bars
|
||||||
[Discord server]: https://discord.gg/jJxZnrGPWN
|
[Discord server]: https://discord.gg/jJxZnrGPWN
|
||||||
[Wayland]: https://wayland.freedesktop.org/
|
[Wayland]: https://wayland.freedesktop.org/
|
||||||
|
[#dwl-official:matrix.org]: https://matrix.to/#/#dwl-official:matrix.org
|
||||||
|
|||||||
24
config.def.h
24
config.def.h
@@ -20,12 +20,11 @@ static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You ca
|
|||||||
/* logging */
|
/* logging */
|
||||||
static int log_level = WLR_ERROR;
|
static int log_level = WLR_ERROR;
|
||||||
|
|
||||||
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* app_id title tags mask isfloating monitor */
|
/* app_id title tags mask isfloating monitor */
|
||||||
/* examples: */
|
|
||||||
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
||||||
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
||||||
|
/* default/example rule: can be changed but cannot be eliminated; at least one rule must exist */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/* layout(s) */
|
||||||
@@ -38,17 +37,14 @@ static const Layout layouts[] = {
|
|||||||
|
|
||||||
/* monitors */
|
/* monitors */
|
||||||
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator
|
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator
|
||||||
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients
|
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients due to
|
||||||
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899
|
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899 */
|
||||||
*/
|
|
||||||
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
|
||||||
static const MonitorRule monrules[] = {
|
static const MonitorRule monrules[] = {
|
||||||
/* name mfact nmaster scale layout rotate/reflect x y */
|
/* name mfact nmaster scale layout rotate/reflect x y
|
||||||
/* example of a HiDPI laptop monitor:
|
* example of a HiDPI laptop monitor:
|
||||||
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 }, */
|
||||||
*/
|
|
||||||
/* defaults */
|
|
||||||
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
|
/* default monitor rule: can be changed but cannot be eliminated; at least one monitor rule must exist */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* keyboard */
|
/* keyboard */
|
||||||
@@ -123,7 +119,7 @@ static const char *termcmd[] = { "foot", NULL };
|
|||||||
static const char *menucmd[] = { "wmenu-run", NULL };
|
static const char *menucmd[] = { "wmenu-run", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
/* Note that Shift changes certain key codes: 2 -> at, etc. */
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||||
@@ -135,7 +131,7 @@ static const Key keys[] = {
|
|||||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||||
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
||||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_c, killclient, {0} },
|
||||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
||||||
@@ -157,7 +153,7 @@ static const Key keys[] = {
|
|||||||
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
||||||
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
||||||
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_q, quit, {0} },
|
||||||
|
|
||||||
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||||
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
||||||
|
|||||||
11
dwl.c
11
dwl.c
@@ -24,6 +24,7 @@
|
|||||||
#include <wlr/types/wlr_data_device.h>
|
#include <wlr/types/wlr_data_device.h>
|
||||||
#include <wlr/types/wlr_drm.h>
|
#include <wlr/types/wlr_drm.h>
|
||||||
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
||||||
|
#include <wlr/types/wlr_ext_data_control_v1.h>
|
||||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||||
#include <wlr/types/wlr_idle_inhibit_v1.h>
|
#include <wlr/types/wlr_idle_inhibit_v1.h>
|
||||||
@@ -585,7 +586,7 @@ arrangelayers(Monitor *m)
|
|||||||
arrange(m);
|
arrange(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Arrange non-exlusive surfaces from top->bottom */
|
/* Arrange non-exclusive surfaces from top->bottom */
|
||||||
for (i = 3; i >= 0; i--)
|
for (i = 3; i >= 0; i--)
|
||||||
arrangelayer(m, &m->layers[i], &usable_area, 0);
|
arrangelayer(m, &m->layers[i], &usable_area, 0);
|
||||||
|
|
||||||
@@ -1616,7 +1617,8 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
|||||||
const Key *k;
|
const Key *k;
|
||||||
for (k = keys; k < END(keys); k++) {
|
for (k = keys; k < END(keys); k++) {
|
||||||
if (CLEANMASK(mods) == CLEANMASK(k->mod)
|
if (CLEANMASK(mods) == CLEANMASK(k->mod)
|
||||||
&& sym == k->keysym && k->func) {
|
&& xkb_keysym_to_lower(sym) == xkb_keysym_to_lower(k->keysym)
|
||||||
|
&& k->func) {
|
||||||
k->func(&k->arg);
|
k->func(&k->arg);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -2132,7 +2134,7 @@ powermgrsetmode(struct wl_listener *listener, void *data)
|
|||||||
if (!m)
|
if (!m)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m->gamma_lut_changed = 1; /* Reapply gamma LUT when re-enabling the ouput */
|
m->gamma_lut_changed = 1; /* Reapply gamma LUT when re-enabling the output */
|
||||||
wlr_output_state_set_enabled(&state, event->mode);
|
wlr_output_state_set_enabled(&state, event->mode);
|
||||||
wlr_output_commit_state(m->wlr_output, &state);
|
wlr_output_commit_state(m->wlr_output, &state);
|
||||||
|
|
||||||
@@ -2454,7 +2456,7 @@ setup(void)
|
|||||||
wlr_log_init(log_level, NULL);
|
wlr_log_init(log_level, NULL);
|
||||||
|
|
||||||
/* The Wayland display is managed by libwayland. It handles accepting
|
/* The Wayland display is managed by libwayland. It handles accepting
|
||||||
* clients from the Unix socket, manging Wayland globals, and so on. */
|
* clients from the Unix socket, managing Wayland globals, and so on. */
|
||||||
dpy = wl_display_create();
|
dpy = wl_display_create();
|
||||||
event_loop = wl_display_get_event_loop(dpy);
|
event_loop = wl_display_get_event_loop(dpy);
|
||||||
|
|
||||||
@@ -2517,6 +2519,7 @@ setup(void)
|
|||||||
wlr_export_dmabuf_manager_v1_create(dpy);
|
wlr_export_dmabuf_manager_v1_create(dpy);
|
||||||
wlr_screencopy_manager_v1_create(dpy);
|
wlr_screencopy_manager_v1_create(dpy);
|
||||||
wlr_data_control_manager_v1_create(dpy);
|
wlr_data_control_manager_v1_create(dpy);
|
||||||
|
wlr_ext_data_control_manager_v1_create(dpy, 1);
|
||||||
wlr_primary_selection_v1_device_manager_create(dpy);
|
wlr_primary_selection_v1_device_manager_create(dpy);
|
||||||
wlr_viewporter_create(dpy);
|
wlr_viewporter_create(dpy);
|
||||||
wlr_single_pixel_buffer_manager_v1_create(dpy);
|
wlr_single_pixel_buffer_manager_v1_create(dpy);
|
||||||
|
|||||||
Reference in New Issue
Block a user