aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--config.def.h8
-rw-r--r--dwl.c17
3 files changed, 20 insertions, 11 deletions
diff --git a/README.md b/README.md
index 2777613..7fe130d 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ dwl is a compact, hackable compositor for Wayland based on [wlroots](https://git
dwl is not meant to provide every feature under the sun. Instead, like dwm, it sticks to features which are necessary, simple, and straightforward to implement given the base on which it is built. Implemented default features are:
-- Any features provided by dwm/Xlib: simple window borders, tags, keybindings, client rules, mouse move/resize. The built-in status bar is an exception to avoid taking a dependency on FreeType or Pango and increasing the SLOC
+- Any features provided by dwm/Xlib: simple window borders, tags, keybindings, client rules, mouse move/resize. Providing a built-in status bar is an exception to this goal, to avoid dependencies on font rendering and/or drawing libraries when an external bar could work well.
- Configurable multi-monitor layout support, including position and rotation
- Configurable HiDPI/multi-DPI support
- Various Wayland protocols
@@ -21,7 +21,7 @@ dwl is not meant to provide every feature under the sun. Instead, like dwm, it s
Features under consideration (possibly as patches) are:
- Protocols made trivial by wlroots
-- Communication from the compositor to status bars. A straightforward possibility would be to use stdout or a provided file descriptor.
+- Provide information to external status bars via stdout or another file descriptor
- Implement the input-inhibitor protocol to support screen lockers
- Implement the idle-inhibit protocol which lets applications such as mpv disable idle monitoring
- Layer shell popups (used by Waybar)
@@ -37,7 +37,7 @@ Feature *non-goals* include:
## Building dwl
-dwl has only two dependencies: wlroots-git and wayland-protocols. Simply install these and run `make`.
+dwl has only two dependencies: wlroots 0.12 and wayland-protocols. Simply install these and run `make`. If you wish to build against a Git version of wlroots, check out the [wlroots-next branch](https://github.com/djpohly/dwl/tree/wlroots-next).
To enable XWayland, you should also install xorg-xwayland and uncomment its flag in `config.mk`.
diff --git a/config.def.h b/config.def.h
index 4aefa2b..089aa37 100644
--- a/config.def.h
+++ b/config.def.h
@@ -49,7 +49,7 @@ static const int repeat_delay = 600;
/* Trackpad */
static const int tap_to_click = 1;
-static const int natural_scrolling = 1;
+static const int natural_scrolling = 0;
#define MODKEY WLR_MODIFIER_ALT
#define TAGKEYS(KEY,SKEY,TAG) \
@@ -62,11 +62,13 @@ static const int natural_scrolling = 1;
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
-static const char *termcmd[] = { "alacritty", NULL };
+static const char *termcmd[] = { "alacritty", NULL };
+static const char *menucmd[] = { "bemenu-run", NULL };
static const Key keys[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* modifier key function argument */
+ { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
@@ -99,6 +101,8 @@ static const Key keys[] = {
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
+
+ /* 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} },
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
diff --git a/dwl.c b/dwl.c
index e18f807..e807330 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1286,7 +1286,7 @@ keypress(struct wl_listener *listener, void *data)
wlr_idle_notify_activity(idle, seat);
/* On _press_, attempt to process a compositor keybinding. */
- if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED)
+ if (event->state == WLR_KEY_PRESSED)
for (i = 0; i < nsyms; i++)
handled = keybinding(mods, syms[i]) || handled;
@@ -2024,7 +2024,7 @@ setup(void)
* backend uses the renderer, for example, to fall back to software cursors
* if the backend does not support hardware cursors (some older GPUs
* don't). */
- if (!(backend = wlr_backend_autocreate(dpy)))
+ if (!(backend = wlr_backend_autocreate(dpy, NULL)))
BARF("couldn't create backend");
/* If we don't provide a renderer, autocreate makes a GLES2 renderer for us.
@@ -2168,6 +2168,11 @@ setup(void)
void
sigchld(int unused)
{
+ /* We should be able to remove this function in favor of a simple
+ * signal(SIGCHLD, SIG_IGN);
+ * but the Xwayland implementation in wlroots currently prevents us from
+ * setting our own disposition for SIGCHLD.
+ */
if (signal(SIGCHLD, sigchld) == SIG_ERR)
EBARF("can't install SIGCHLD handler");
while (0 < waitpid(-1, NULL, WNOHANG))
@@ -2445,11 +2450,11 @@ zoom(const Arg *arg)
void
activatex11(struct wl_listener *listener, void *data)
{
- Client *c = wl_container_of(listener, c, activate);
+ Client *c = wl_container_of(listener, c, activate);
- /* Only "managed" windows can be activated */
- if (c->type == X11Managed)
- wlr_xwayland_surface_activate(c->surface.xwayland, 1);
+ /* Only "managed" windows can be activated */
+ if (c->type == X11Managed)
+ wlr_xwayland_surface_activate(c->surface.xwayland, 1);
}
void