Patch List

1 accessnthmon

1.0.1 Description

Port of dwm's accessnthmon. Adds functions to tag and focus monitor by index.

1.0.2 Download

1.0.3 Authors


2 alwayscenter

2.0.1 Description

Automatically center floating windows.

2.0.2 Download

2.0.3 Authors


3 attachbottom

3.0.1 Description

Newly created windows are placed at the bottom of the client tile stack.

3.0.2 Download

3.0.3 Authors


4 attachtop

4.0.1 Description

This is a port of attachtop patch for dwm: https://dwm.suckless.org/patches/attachtop

New client attaches below the last master/on top of the stack.

Behavior feels very intuitive as it doesn't disrupt existing masters no matter the amount of them, it only pushes the clients in stack down.

4.0.2 Download

4.0.3 Authors


5 autostart

5.0.1 Description

Allow dwl to execute commands from autostart array in your config.h file. And when you exit dwl all processes from autostart array will be killed.

Note: Commands from array are executed using execvp(). So if you need to execute shell command you need to prefix it with "sh", "-c" (change sh to any shell you like).

5.0.2 Download

5.0.3 Authors


6 bar

6.0.1 Description

Add a bar identical to dwm's bar.

To use a status-bar, you can pass in status text via stdin:

slstatus -s | dwl

6.0.2 Dependencies

6.0.3 Download

Below is a preview of the patch.

bar patch preview

For colors, they are in RRRR, GGGG, BBBB, AAAA format due to inheriting the pixman_color_t type, an example for the color 0x282a36 would be 0x2828, 0x2a2a, 0x3636, 0xffff

6.0.4 Authors

6.0.5 Credits


7 bar-systray

7.0.1 Description

Add a system tray next to the bar. Heed the warning, this is far from suckless ^^

preview

7.0.2 Dependencies

7.0.3 Applying the patch

The patch applies on top of the bar patch. That needs to be applied first.

The patch creates subdirectories lib and include. After patching, but before make, install libstatusnotifier-systray-gtk4.a and snsystray.h from statusnotifier-systray-gtk4 in the directories. One possible way to do that:

  1. Clone [https://codeberg.org/janetski/statusnotifier-systray-gtk4](https://codeberg.org/janetski/statusnotifier-systray-gtk4). Can clone to any location.
  2. From statusnotifier-systray-gtk4 root:
    1. $ meson setup --default-library=static --prefix=/ -Dgir=false -Dvala=false -Ddocs=false build
    2. $ meson compile -C build
    3. $ DESTDIR=$DWLDIR meson install -C build, where $DWLDIR is the path to dwl root.
  3. Finally, from dwl root, run make.

7.0.4 Download

7.0.5 Authors


8 barborder

8.0.1 Description

Add a border around the bar similar to how a client is given a border.

8.0.2 Download

8.0.3 Authors


9 barcolors

9.0.1 Description

Add support for colored status text to the bar. Text can be colored in the same manner as with dwlb, namely by wrapping it between ^fg(color) and ^fg() or ^bg(color) and ^bg(), where color is a 6-digit hexadecimal value.

9.0.2 Download

9.0.3 Authors


10 barheight

10.0.1 Description

Adds the ability to change the bar's height.

10.0.2 Download

10.0.3 Authors


11 barpadding

11.0.1 Description

Add vertical and horizontal space between the bar and the edge of the screen.

11.0.2 Download

11.0.3 Authors


12 borders

12.0.1 Description

Adds 2 more borders to each side (top, bottom, left, right) of every window.

Preview
With the following config:

static const unsigned int borderpx         = 9;  /* border pixel of windows */
static const unsigned int borderspx        = 3;  /* width of the border that start from outside the windows */
static const unsigned int borderepx        = 3;  /* width of the border that start from inside the windows */

and border_color_type set to BrdOriginal:

and border_color_type set to BrdStart:

and border_color_type set to BrdEnd:

and border_color_type set to BrdStartEnd:

12.0.2 Download

12.0.3 Authors


13 bottomstack

13.0.1 Description

bstack and bstackhoriz are two stack layouts for dwl.

13.0.2 Scheme

bstack        (TTT)       bstackhoriz   (===)
+-----------------+       +-----------------+
|                 |       |                 |
|                 |       |                 |
|                 |       |                 |
+-----+-----+-----+       +-----------------+
|     |     |     |       +-----------------+
|     |     |     |       +-----------------+
+-----+-----+-----+       +-----------------+

13.0.3 Download

13.0.4 Authors


14 buttonbystate

14.0.1 Description

Adds "state" (enum wlr_button_state) to configure a button action on either press or release. This basically enables release to be used for button actions.

14.0.2 Download

14.0.3 Authors


15 center-terminal

15.0.1 Description

Add a keybinding that toggles centering the terminally horizontally when it's the only window, while still tiling multiple windows.

This limits the width of long text making it easier to read, and avoids covering the wallpaper more than necessary.

15.0.2 Download

15.0.3 Authors


16 centeredmaster

16.0.1 Description

This is a port of centeredmaster patch for dwm: https://dwm.suckless.org/patches/centeredmaster

centeredmaster centers the nmaster area on screen, using mfact * monitor width & height, with the stacked windows distributed to the left and right. It can be selected with Alt+c.

With one and two clients in master respectively this results in:

+------------------------------+       +------------------------------+
|+--------++--------++--------+|       |+--------++--------++--------+|
||        ||        ||        ||       ||        ||        ||        ||
||        ||        ||        ||       ||        ||   M1   ||        ||
||        ||        ||        ||       ||        ||        ||        ||
||  S2    ||   M    ||   S1   ||       ||        |+--------+|        ||
||        ||        ||        ||       ||        |+--------+|        ||
||        ||        ||        ||       ||        ||        ||        ||
||        ||        ||        ||       ||        ||   M2   ||        ||
||        ||        ||        ||       ||        ||        ||        ||
|+--------++--------++--------+|       |+--------++--------++--------+|
+------------------------------+       +------------------------------+

16.0.2 Download

16.0.3 Authors


17 cfact

17.0.1 Description

A port of the dwm cfacts patch (with the limits removed)

Clients with higher weight are allocated more space!

+---------------------+
|          |   0.5    |
|   1.0    +----------+
+----------+          |
|          |   1.0    |
|          +----------+
|   2.0    |          |
|          |   1.0    |
+----------+----------+`

17.0.2 Download

17.0.3 Authors


18 cfact-centeredmaster

18.0.1 Description

Port of the cfact patch for the centeredmaster layout.

Inspired by the original patch for dwm (https://dwm.suckless.org/patches/cfacts/)

This patch requires both cfact and centeredmaster patches.

18.0.2 Download

18.0.3 Authors


19 chainkeys

19.0.1 Description

Implements chained keybindings (like the dwm keychain patch).

Bindings can share a leading chain key. This chain key will be triggered when Mod+chain is pressed. A subsequent keypress will be matched against bindings for that chain key. If it is configured the action will be triggered, otherwise the keypress will be ignored.

19.0.2 Download

19.0.3 Authors


20 client-opacity

20.0.1 Description

This patch adds default transparency parameters to config.h which specify the starting transparencies of all windows.

It also adds opacities to the ruleset, enabling override of the opacities on a per client basis.

Additionally, it adds some shortcuts:

[MODKEY]+[o]         -> increase focus opacity of currently focused window
[MODKEY]+[Shift]+[o] -> decrease focus opacity of currently focused window

20.0.2 Download

20.0.3 Authors


21 column

21.0.1 Description

A column layout patch. This patch just puts the visible clients into equal-width columns on the screen.

21.0.2 Download

21.0.3 Authors


22 coredump

22.0.1 Description

Generate a coredump if dwl exited abnormally (to be more usefull you need to compile dwl and wlroots with debug symbols)

22.0.2 Download

22.0.3 Authors


23 cursortheme

23.0.1 Description

Adds ability to change cursor's theme and size.

static const char *cursor_theme            = NULL;
static const char cursor_size[]            = "24"; /* Make sure it's a valid integer, otherwise things will break */

23.0.2 Download

23.0.3 Authors


24 customfloat

24.0.1 Description

Rules for floating windows support default x, y, width, height. Defaults to the center of the screen and the client size.

If the width or height is less than or equal to 1, then the value will be interpreted as a percentage. For example, 0.5 represents 50%, 0.25 represents 25%, and 1 represents 100%. NOTE: Some clients, like Thunar, have minimum width/height

The variable center_relative_to_monitor allows the user to choose whether to center relative to the monitor or relative to the window area.

Explanation of center_relative_to_monitor:
The "Monitor area" refers to the space enclosed by the green rectangle, while the "Window area" refers to the space enclosed by the red rectangle.

24.0.2 Download

24.0.3 Authors


25 deck

25.0.1 Description

Adds a layout with a monocle layout for clients in the stack (port of the deck layout for dwm); stacked clients are like a deck of cards (see below)

Tile:
+-----------------+--------+
|                 |        |
|                 |  S1    |
|                 |        |
|        M        +--------+
|                 |        |
|                 |   S2   |
|                 |        |
+-----------------+--------+

Deck:
+-----------------+--------+
|                 |        |
|                 |        |
|                 |        |
|        M        |   S1   |
|                 |        |
|                 |        |
|                 |        |
+-----------------+--------+

25.0.2 Download

25.0.3 Authors


26 define-modkey-with-make-argument

26.0.1 Description

This patch adds the ability to define the modkey with a make argument like so:

make MODKEY=WLR_MODIFIER_ALT
make MODKEY=WLR_MODIFIER_LOGO
make MODKEY=WLR_MODIFIER_CTRL
make MODKEY=WLR_MODIFIER_SHIFT

It can be used to compile multiple times quickly, you can also have a main session and sub session with different modkeys.

26.0.2 Download

26.0.3 Authors


27 dim-unfocused

27.0.1 Description

Implements dimming of clients which are unfocused.

The code also allows any color dimming. There is also an additional option in Rule, which allows you to keep the client neverdim, that is, as if it is focused.

There are also two functions that can be bound to a Key or Button,

  1. toggledimming: Which toggles dimming for all windows (except for Rules)
  2. toggledimmingclient: Which toggles dimming for the focused window, as if the client had neverdim applied to it. This overwrites an applied Rule.

27.0.2 Download

27.0.3 Authors


28 dragmfact

28.0.1 Description

Change mfact by dragging the mouse.

28.0.2 Download

28.0.3 Authors


29 dragresize

29.0.1 Description

implement rio-like window resizing

select window to resize (mod+middleclick by default) then drag out an area for it to occupy

29.0.2 Download

29.0.3 Authors


30 en-keycodes

30.0.1 Description

Always use the English keymap to get keycodes, so key bindings work even when using a non-English keyboard layout.

30.0.2 Download

30.0.3 Authors


31 envcfg

31.0.1 Description

Input device configuration (click method, tap-and-drag, acceleration, etc), border size and colors via environment variables.

31.0.2 Download

31.0.3 Authors


32 fakefullscreenclient

32.0.1 Description

Allow setting fake fullscreen per client

32.0.2 Download

32.0.3 Authors


33 fallback

33.0.1 Description

Tries a different display mode if the preferred mode doesn't work.

33.0.2 Download

33.0.3 Authors


34 float-unfocused-border-color

34.0.1 Description

A revive of the floatBorderColor patch.

This patch allows you to set a color for floating windows when they are unfocused.

34.0.2 Download

34.0.3 Authors


35 focusdir

35.0.1 Description

Focus the window to the left, right, above or below the current focused window

35.0.2 Download

35.0.3 Authors


36 foreign-toplevel-management

36.0.1 Description

Implement foreign-toplevel-management, it add handlers for activate, close, fullscreen and destroy request events, it's missing minimize and maximize request handlers.

36.0.2 Download

36.0.3 Authors


37 gaplessgrid

37.0.1 Description

Arranges windows in a grid. Except it adjusts the number of windows in the first few columns to avoid empty cells.

37.0.2 Download

37.1 Pre-codeberg

37.1.1 Authors


38 gaps

38.0.1 Description

Adds gaps between clients, providing the ability to disable them at run-time.

smartgaps can also be changed to remove gaps when there is only one client present.

38.0.2 Download

38.0.3 Authors


39 gestures

39.0.1 Description

Add swipe gestures to trigger functions, similar to libinput-gestures. It supports the following gestures: SWIPE_UP, SWIPE_DOWN, SWIPE_LEFT and SWIPE_RIGHT

NOTE: It requires that you have previously applied pointer-gestures-unstable-v1

static const Gesture gestures[] = {
  /* modifier gesture       fingers_count   function    argument */
  { MODKEY,   SWIPE_LEFT,   4,              shiftview,  { .i = 1 } },
  { 0,        SWIPE_RIGHT,  4,              shiftview,  { .i = -1 } },
};

NOTE: the example above requires the following patch shiftview

39.0.2 Download

39.0.3 Authors


40 globalkey

40.0.1 Description

This patch adds ability to pass specified in config header keys globally, somewhat in hyprlands approach. This might deal with waylands lack of global shortcuts.

Example:

static const PassKeypressRule pass_rules[] = {
    ADDPASSRULE("com.obsproject.Studio", MODKEY, XKB_KEY_Home),
    ADDPASSRULE("discord", 0, XKB_KEY_n),
    /* xkb key is case ignored */
};

will pass MODKEY + Home key to obs(flatpak version) regardless of what client is currently focused if any. String "com.obsproject.Studio" should be exact match for appid of the client. To get appid use dwlmsg, or run stock dwl from a terminal then launch the needed application inside, dwl will print all the info to the stdout.

Note that if popup (like fuzzel) is focused, no key will be globally passed. This is done so these menus don't get closed after hitting some of the global keys.

40.0.2 Download

40.0.3 Authors


41 headless

41.0.1 Description

Implements swaymsg create_output command, it allows you to create virtual/headless outputs. But in combination with a VNC server (for example wayvnc), this allows you to essentially have additional monitors, by connecting to the VNC server with an appropiate client (for example on an tablet or laptop).

If you plan to use wayvnc, you'll need virtual-pointer patch as well

41.0.2 Download

41.0.3 Authors


42 hide-behind-fullscreen

42.0.1 Description

Hide all clients (and layer surfaces) behind the current client if it is fullscreen, only the background (layer surfaces at the background layer) will be shown

42.0.2 Download

42.0.3 Authors


43 hide-behind-monocle

43.0.1 Description

Hide all clients behind the focused one in the monocle layout

43.0.2 Download

43.0.3 Authors


44 hide_vacant_tags

44.0.1 Description

Prevent bar from drawing tags with no clients (i.e. vacant). It also stops drawing empty rectangles on the bar for non-vacant tags as there is no need anymore to distinguish vacant tags and it offers a more visible contrast than if there were filled/empty rectangles.

44.0.2 Download

44.0.3 Authors


45 hiderule

45.0.1 Description

Adds a ishidden option to client rules, that allows hiding any matching clients entirely.

45.0.2 Download

45.0.3 Authors


46 inputdevicerules

46.0.1 Description

Input device rules implemented using custom device create functions for keyboards and pointing devices.

Examples provided:

46.0.2 Download

46.0.3 Authors


47 ipc

47.0.1 Description

Largely based on raphi's somebar, this patch provides an ipc for wayland clients to get and set dwl state. The ipc is intended for status bars, but can also be scripted with tools like dwlmsg.

Status information to stdout is currently disabled as dwl tends to freeze. For now, dwlmsg -w should act as a drop-in replacement.

Note to pertag users: apply this for ipc tagsetting to work as expected

47.0.2 Download

47.0.3 Authors


48 kblayout

48.0.1 Description

This patch adds per-client keyboard layout and ability to send current keyboard layout information to a status bar.

Only per-client feature is enabled by default. You can edit kblayout_file and kblayout_cmd variables to notify a status bar about keyboard layout.

Someblocks config that works with the example settings in config.h:

static const Block blocks[] = {
    /*Icon*/    /*Command*/     /*Update Interval*/ /*Update Signal*/
    {"", "cat /tmp/dwl-kblayout",                   0,      1},
};

Both of these features are included in one patch because their implementation happens to share some code. If you don't need any of these features, just disable it in config.h.

48.0.2 Download

48.0.3 Authors


49 keyboardshortcutsinhibit

49.0.1 Description

Allows clients to use the keyboard-shortcuts-inhibit protocol to block the compositor from using keybinds. This is useful for virtualization software like looking-glass which requires this protocol to run.

49.0.2 Download

49.0.3 Authors


50 keycodes

50.0.1 Description

Use keycodes instead of keysyms. This way, input is independent from keyboard layout (you can use the keys.h file to customize, or get the keycodes with wev or xkbcli interactive-wayland (x11-libs/libxkbcommon[tools] in gentoo)).

50.0.2 Download

50.0.3 Config after patching

(run in DWL source directory)

export XKB_DEFAULT_VARIANT=yourbestkeyboardlayout
cc -lxkbcommon -o generate-keys generate-keys.c
./generate-keys

50.0.4 Authors


51 less-simple-touch-input

51.0.1 Description

Adds touchscreen functionality.

This patch was based on the simple-touch-input but instead of emulating mouse movement, this now forwards the appropriate event notifications to clients.

KNOWN BUGS:

51.0.2 Download

51.0.3 Authors

51.0.4 Changelog


52 limitnmaster

52.0.1 Description

Limits nmaster to within the range of currently-opened windows (nmaster will not change past the full horizontal split layout)

52.0.2 Download

52.0.3 Authors


53 lockedkeys

53.0.1 Description

This patch allows you to add keybindings to the lockscreen.

static const Key lockedkeys[] = {
    /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
    /* modifier                  key                 function        argument */

    /* 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),
    CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
};

53.0.2 Download

53.0.3 Authors


54 mastercolumn

54.0.1 Description

This patch adds a layout, mastercol, in which the windows in the master area are arranged in columns of equal size. The number of columns is always nmaster + 1, and the last column is a stack of leftover windows (as in the normal tile layout). It effectively differs from the default tile layout only in that master windows are arranged horizontally rather than vertically.

For gaps, apply mastercolumn-gaps.patch on top of mastercolumn.patch and gaps.patch.

54.0.2 Download

54.0.2.0.1 mastercolumn.patch
54.0.2.0.2 mastercolumn-gaps.patch

54.0.3 Authors


55 menu

55.0.1 Description

This patch adds menu command, which allows dwl to interface with dmenu-like programs.

By default, two menus are available:

Edit menus array in config.h to add/change menus and use a different dmenu program.

55.0.2 Download

55.0.3 Authors


56 meson

56.0.1 Description

Add the meson build system.

This is useful for people who do not want to self-manage a wlroots installation.

To enable Xwayland support, you will need to enable it in the wlroots subproject:

meson setup -Dwlroots:xwayland=enabled build

It is also reccomended to see the wlroots meson project configuration logs for any unusual checks, such as requiring hwdata for the DRM backend.

56.0.2 Download

56.0.3 Authors


57 minimalborders

57.0.1 Description

Dynamically adjusts the borders between adjacent windows to make them visually merge

NOTE: to disable minimalborders after applying this patch, set draw_minimal_borders to 0

static const int draw_minimal_borders = 0; /* disable minimalborders */
Preview:
with:

static const unsigned int borderpx         = 10;  /* border pixel of windows */

Before applying the patch

After applying the patch

57.0.2 Download

57.0.3 Authors


58 modes

58.0.1 Description

Implement modes, that way each mapping is associated with a mode and is only active while in that mode, default mode is NORMAL

58.0.2 Example

In the example below, you declare a mode: BROWSER, which is activated when you press modkey + b. Then, you can press f to launch Firefox and return to the default NORMAL mode.

enum {
  BROWSER,
};
const char *modes_labels[] = {
  "browser",
};

static const Key keys[] = {
  // ...
  { MODKEY, XKB_KEY_b, entermode, {.i = BROWSER} },
  // ...
};

static const Modekey modekeys[] = {
  /* mode      modifier                  key                 function        argument */
  { BROWSER, { 0, XKB_KEY_f, spawn, SHCMD("firefox") } },
  { BROWSER, { 0, XKB_KEY_f, entermode, {.i = NORMAL} } },
  { BROWSER, { 0, XKB_KEY_Escape, entermode, {.i = NORMAL} } },
};

58.0.3 Download

58.0.4 Authors


59 monfig

59.0.1 Description

Allows more monitor configuration in config.h

59.0.2 Download

59.0.3 Authors


60 movecenter

60.0.1 Description

This patch is no longer being maintained by me wochap, since I'm now using a different patch specific to my use case: https://codeberg.org/wochap/dwl/src/branch/v0.6-c/betterfloat/betterfloat-diff.patch.

This patch provides a keybinding to center the focused floating window.

Press MODKEY + x to center the focused floating window.

It does NOT center windows that are not floating.

The variable respect_monitor_reserved_area allows the user to choose whether to center relative to the monitor or relative to the window area.

Explanation of respect_monitor_reserved_area:
The "Monitor area" refers to the space enclosed by the green rectangle, while the "Window area" refers to the space enclosed by the red rectangle.

60.0.2 Download

60.0.3 Authors


61 moveresizekb

61.0.1 Description

This allows the user to change size and placement of floating windows using only the keyboard, default keybindings:

Keybinding Action
MODKEY + Up move 40px up
MODKEY + Down move 40px down
MODKEY + Left move 40px left
MODKEY + Right move 40px right
MODKEY + Shift + Up shrink height 40px
MODKEY + Shift + Down grow height 40px
MODKEY + Shift + Left shrink width 40px
MODKEY + Shift + Right grow width 40px

61.0.2 Download

61.0.3 Authors


62 movestack

62.0.1 Description

Allows you to move a window up and down the stack.

62.0.2 Download

62.0.3 Authors


63 namedscratchpads

63.0.1 Description

Allows for the creation of multiple scratchpad windows, each assigned to a different keybinding. In simple terms, it enables 'run or raise' functionality

This patch adds the following functions:

If you don't assign keybindings to any of the above functions and so get a compiler warning about them not being used, just remove them from your dwl branch to stop the warning.

63.0.2 Download

63.0.3 Authors


64 naturalscrolltrackpad

64.0.1 Description

Set natural scrolling only for trackpads.

64.0.2 Download

64.0.3 Authors


65 nextlayout

65.0.1 Description

Change the current layout to the next available one.

65.0.2 Download

65.0.3 Authors


66 numlock-capslock

66.0.1 Description

Allows activating numlock or capslock at startup.

66.0.2 Download

66.0.3 Authors


67 passthrough

67.0.1 Description

allows pausing keybind handling

also allows for bitcarrying-esque control of nested instances

default keybind is Ctrl+Logo+Alt+Shift+Esc, can be customized in config.h

67.0.2 Download

67.0.3 Authors


68 perinputconfig

68.0.1 Description

Replace the singular keyboard and pointer input configuration with an array allowing to set different variables matching by name.

Tip to find the names: Grep for device_name and add a line after it to print to stdout. Then run EX: dwl > /tmp/print_device_names.log, exit dwl, and should see the names.

68.0.2 Download

68.0.3 Authors


69 pertag

69.0.1 Description

Makes layout, mwfact and nmaster individual for every tag.

69.0.2 Download

69.0.3 Authors


70 pointer-gestures-unstable-v1

70.0.1 Description

Forward the following events to client: swipe_begin, swipe_update, swipe_end, pinch_begin, pinch_update and pinch_end

This patch allows you to pinch zoom in Chrome, for example. In combination with the following patches gestures and shiftview, it would allow you to switch workspaces by performing a 3-finger swipe on your touchpad.

70.0.2 Download

70.0.3 Authors


71 press_repeat_release

71.0.1 Description

This patch adds 3 additional options to the Key struct, on_press, on_repeat and on_release which can be used to control which events a key binding should be triggered on.

NOTE: Due to concerns about patching difficulties this patch does NOT include any changes to config.def.h. After applying you will need to add the 3 additional initializers to each key binding that you would like to modify. Any key binding that is not updated will cause a build warning but should function as it does in vanilla.

71.0.2 Download

71.0.3 Authors


72 primaryselection

72.0.1 Description

Adds a config option to disable/enable primary selection (middle-click paste).

72.0.2 Download

72.0.3 Authors


73 push

73.0.1 Description

Adds functions pushup and pushdown to move windows within the tiling order.

73.0.2 Download

73.0.3 Authors


74 regexrules

74.0.1 Description

Allows the use of regular expressions for window rules "app_id" and "title"

static const Rule rules[] = {
    // ...
    { "kitty-htop",  NULL,  1 << 8,  0,  -1 },
    { "^kitty$",     NULL,  0,       0,  -1 },
    // ...
};

74.0.2 Download

74.0.3 Authors


75 regions

75.0.1 Description

This patch will allow for a program to be used and have the current window regions on all monitors to be passed to the program as standard input.

example is grim -g "$(slurp)"

75.0.2 Download

75.0.3 Authors


76 relative-mouse-resize

76.0.1 Description

When resizing windows, the mouse will jump and resize the window in the quadrant that the resize starts at.

76.0.2 Download

76.0.3 Authors


77 remembertags

77.0.1 Description

This patch modifies the behavior when selecting tags so that selecting a tag will also enable any other tags that were previously visible.

For example:

  1. Select tag 5, with mod+5
  2. Toggle tag 8, with ctrl+mod+8
  3. Select tag 1, with mod+1. Tags 5 and 8 should no longer be visible.
  4. Select tag 5 again, with mod+5. Tag 8 should be visible since it was remembered.
  5. Select tag 5 again, with mod_5. Selecting the already selected tag resets any remembered tags, so now tag 5 should be the only one visible.

77.0.2 Download

77.0.3 Authors


78 restore-monitor

78.0.1 Description

Moves clients to their old output when it is reattached.

78.0.2 Download

78.0.3 Authors


79 right

79.0.1 Description

Put newly connected monitors on the right, like X does.

79.0.2 Download

79.0.3 Authors


80 rlimit_max

80.0.1 Description

Sets the current maximum open file descriptors to the maximum available limit.

This patch is useful - and solves issue #628 for running heavy Xwayland applications on systems that do not provide limits out of the box.

80.0.2 Download

80.0.3 Authors


81 rotatetags

81.0.1 Description

This patch provides the ability to rotate the tagset left / right. It implements a new function rotatetags which modifies the current tagset. Same as original dwm patch. Also adds ability to move focused client to left / right adjacent tag by specifying appropriate enum value as argument.

81.0.2 Download

81.0.3 Authors


82 scenefx

82.0.1 Description

Implement https://github.com/wlrfx/scenefx

/* available options */

static const int opacity = 0; /* flag to enable opacity */
static const float opacity_inactive = 0.5;
static const float opacity_active = 1.0;

static const int shadow = 1; /* flag to enable shadow */
static const int shadow_only_floating = 0; /* only apply shadow to floating windows */
static const struct wlr_render_color shadow_color = COLOR(0x0000FFff);
static const struct wlr_render_color shadow_color_focus = COLOR(0xFF0000ff);
static const int shadow_blur_sigma = 20;
static const int shadow_blur_sigma_focus = 40;
static const char *const shadow_ignore_list[] = { "xdg-desktop-portal-gtk", NULL }; /* list of app-id to ignore */

static const int corner_radius = 0; /* 0 disables corner_radius */

static const int blur = 1; /* flag to enable blur */
static const int blur_optimized = 1;
static const int blur_ignore_transparent = 1;
static const struct blur_data blur_data = {
    .radius = 5,
    .num_passes = 3,
    .noise = 0.02,
    .brightness = 0.9,
    .contrast = 0.9,
    .saturation = 1.1,
};

NOTE: If you are using nix with flakes, scenefx has a flake for scenefx https://github.com/wlrfx/scenefx/blob/main/flake.nix

NOTE: Some GTK apps are being cut off when they have shadows enabled. You can use the shadow_ignore_list option to prevent shadows from being rendered on those apps

NOTE: Blur doesn't work on windows with opacity set (opacity_active, opacity_inactive)

NOTE: In DWL's Makefile scenefx must be placed before wlroots, e.g. PKGS = scenefx wlroots wayland-server ...

Preview


82.0.2 Download

82.0.3 Authors


83 scroll-factor

83.0.1 Description

This patch adds scroll factor to dwl. The settings can be found in the trackpad section of the config. This allows user to control the sensitivity of 2-finger touchpad scrolling.

83.0.2 Download

83.0.3 Authors


84 setupenv

84.0.1 Description

Allow configuring environment variables in config.h

84.0.2 Download

84.0.3 Authors


85 shiftview

85.0.1 Description

Add keybindings to cycle through tags with visible clients.

85.0.2 Download

85.0.3 Authors


86 simpleborders

86.0.1 Description

Like smartborders. Don't put borders when there is only one window on the screen.

86.0.2 Download

86.0.3 Authors


87 singlemaster

87.0.1 Description

Restricts layout to only having one client in the master area.

87.0.2 Download

87.0.3 Authors


88 singletagset

88.0.1 Description

Single set of tags shared between multiple monitors.

This patch allows all the tags to be shared between both (or more) monitors. So a single set of tags from 1 to 9 can be viewed on any monitor, as opposed to having separate tag sets 1 to 9 on each monitor.

Originally based on the dwm single_tagset patch: https://dwm.suckless.org/patches/single_tagset/

88.0.2 Download

88.0.3 Authors


89 singletagset-pertag

89.0.1 Description

Pertag keeps layouts, mfact and nmaster per tag instead of per output.

This adapted version of pertag contains one version of the rules per all outputs, instead of one per output. This makes switching to tags from other monitors keep the window layout.

This patch expects singletagset patch to be already in your tree committed. It applies onto it.

This patch is incompatible with pertag.

89.0.2 Download

89.0.3 Authors


90 singletagset-sticky

90.0.1 Description

Makes sticky work as expected with singletagset. The sticky window will stay on original output until you explicitely put it to a different monitor.

This patch expects both singletagset and sticky patches to be already in your tree committed. It applies onto them.

90.0.2 Download

90.0.3 Authors


91 skipfocus

91.0.1 Description

Adds a rule-based ability to skip automatically focusing a window on creation. Expected use-case is for transient windows like notifications etc. The window can still be focused by mouse or keyboard movement.

skipfocus value effect
0 usual
1 skipautofocus
2 skipfocus entirely

91.0.2 Download

91.0.3 Authors


92 smartborders

92.0.1 Description

The borders of a window aren't drawn when the window is the only tiling window in its tag OR if the window is in a monocle layout.

92.0.2 Download

92.0.3 Authors


93 snail

93.0.1 Description

Adds a spiral-inspired layout for wide screens.

93.0.2 Download

93.0.3 Authors


94 snail-gaps

94.0.1 Description

Adds support for the gaps patch to the snail layout patch.

Install the gaps patch and the snail patch first.

94.0.2 Download

94.0.3 Authors


95 stacker

95.0.1 Description

Stacker is a patch that allows moving around the stack more freely. With only one keybinding, quickly move, swap and jump around the window stack.

  1. Focus any window of the stack with a single key binding.
  2. Swap the currently focused windows with any other window in the stack.
  3. Move the selected window in the stack with relativeswap.

This patch is heavily inspired by the original stacker dwm patch.

95.0.2 Keybinding

95.0.3 Missing feature

Jumping to the last selected window is not yet implemented.

95.0.4 Download

95.0.5 Authors


96 startargv

96.0.1 Description

allow passing startup command on argv

e.g. dwl -s foot -s launches foot -s

put sh -c right after dwl -s to emulate normal behaviour

96.0.2 Download

96.0.3 Authors


97 sticky

97.0.1 Description

Adds a toggleable function that makes a sticky client that is visible on all tags.

Originally based on dwm sticky patch.

97.0.2 Download

97.0.3 Authors


98 swallow

98.0.1 Description

Terminals swallow windows that they are the parent of.

foot is the terminal by default, you can change it in client rules in config.h.

2023-08-16 and up are made to also work with x windows: https://codeberg.org/dwl/dwl/issues/331

for freebsd users: apply swallow-freebsd.patch on top of swallow.patch

98.0.2 Download

98.0.3 Authors


99 swapandfocusdir

99.0.1 Description

Focus the window (floating or no) to the left, right, above, or below the current focused window.

Swap the focused window with the window (no floating) to the left, right, above, or below.

NOTE: this patch uses the same algorithm that River uses to select the window in the given direction.

99.0.2 Download

99.0.3 Authors


100 switchtotag

100.0.1 Description

Add a rule option to switch to the configured tag when a window opens, then switch back when it closes.

100.0.2 Download

100.0.3 Authors


101 tab

101.0.1 Description

Add a tab bar or window title to the top or bottom of windows.

101.0.2 Download

101.0.3 Authors


102 tablet-input

102.0.1 Description

implements wlr-tablet-v2 for drawing tablets and supports cursor emulation

inspired by @guyuming76's branch, with coding help from @Palanix and testing by @Thanatos

102.0.2 Download

102.0.3 Authors


103 tearing

103.0.1 Description

This patch adds support for tearing protocol. To get it working export WLR_DRM_NO_ATOMIC=1 is probably required. Setting ForceTearingRule is also probably required since surfaces always receive presentation hint 0 (VSYNC) as far as i can tell.

Set rules in the config.h (exact string match):

static const ForceTearingRule force_tearing[] = {
    {.title = "", .appid = "oni.exe"},
    {.title = "", .appid = "hl_linux"},
    {.title = "", .appid = "steam_app_210970"},
};

103.0.2 Download

103.0.3 Authors


104 titleurgent

104.0.1 Description

Whenever a client title changes set the client's urgent flag.

Hacky solution I use to deal with qutebrowser not setting urgent flag when a new tab is opened.

104.0.2 Download

104.0.3 Authors


105 toggle_constraints

105.0.1 Description

Adds a function called togglepointerconstraints to turn pointer constraint enforcement on and off with a keybind.

105.0.2 Usage

Add a binding for the togglepointerconstraints function in the keys[] array of config.h. The function does not take any argument. Pointer constraints default to enabled, and can be toggled on and off with the function from there.

Example:

{ MODKEY, XKB_KEY_c, togglepointerconstraints, {0}},

105.0.3 Download

105.0.4 Authors


106 togglekblayout

106.0.1 Description

This patch is no longer being maintained by me wochap, since I'm now using a different patch specific to my use case: https://codeberg.org/wochap/dwl/src/branch/v0.6-b/xkb-rules-switcher/xkb-rules-switcher.patch

Switch between multiple keyboard layouts at runtime.

106.0.2 Download

106.0.3 Authors


107 togglekblayoutandoptions

107.0.1 Description

Switch between multiple keyboard layouts, variants, and options at runtime.

107.0.2 Download

107.0.3 Authors


108 unclutter

108.0.1 Description

Hide the mouse cursor if it isn't being used for a certain period of time.

108.0.2 Download

108.0.3 Authors


109 ungroup-keyboards

109.0.1 Description

Ungroup keyboard input devices based on device name.

I wrote this patch was because keyboard device grouping breaks the behaviour of the ydotool virtual device. This patch fixes my issue #558 in the codeberg issue tracker.

See the inputdevicerules patch for a more generalised version of this idea.

109.0.2 Download

109.0.3 Authors


110 vanitygaps

110.0.1 Description

Adds (inner) gaps between client windows and (outer) gaps between windows and the screen edge in a flexible manner.

110.0.2 Download

110.0.3 Authors


111 varcol

111.0.1 Description

A variable column layout.

This layout behaves much the same as the tile layout, but adds key bindings that can be used to:

111.0.2 Download

111.0.3 Authors


112 viewnextocctag

112.0.1 Description

View the next or previous tag, skipping any tags that do not have any clients.

112.0.2 Download

112.0.3 Authors


113 virtual-pointer

113.0.1 Description

implement wlr_virtual_pointer_v1 for things like wayvnc server to work

NOTE: no longer neccessary if you are using a DWL version after https://codeberg.org/dwl/dwl/commit/ac6074f4fdb8cc263c877f08e16a5805d3bb22d2

113.0.2 Download

113.0.3 Authors


114 warpcursor

114.0.1 Description

Warp cursor to the centre of newly focused clients.

Only moves the cursor if the cursor is currently not on the new client.

This is my version of the orphaned cursorwarp patch except I left out the config flag as I think it is unnecessary.

114.0.2 Download

114.0.3 Authors


115 winview

115.0.1 Description

Implements the function winview which switches the visible tags to the tags on which the current client is visible.

This patch is inspired from https://dwm.suckless.org/patches/winview/. Citing the description of the dwm patch:

Dwm tags are a powerfull feature that allows organizing windows in workspaces. Sometime it can be difficult to remember the tag to activate to unhide a window. With the winview patch the window to unhide can be selected from the all-window view. The user switches to the all-window view (Mod1-0), selects the window (Mod1-j/k or using the mouse) and press Mod1-o. The key Mod1-o switches the view to the selected window tag.

Recommend patches

The grid layout is well adapted to display many windows in a limited space. Using both grid and pertag patches you will be able to select this layout for the all-window view while keeping your preferred layout for the other views. Configuration and Installation Using the default configuration file

Make sure the directory where you build dwm does not contain a config.h file;
Apply the patch;
Run make and make install.

Using an existing customised configuration file

Apply the patch; Add the following element in the keys array:

{ MODKEY, XK_o, winview, {0} },

Run make and make install.

An example of how to insert this line can be found in the default config file template, config.def.h.

115.0.2 Download

115.0.3 Authors


116 xwayland-handle-minimize

116.0.1 Description

Some windows (wine) games go black screen after losing focus and never recover https://github.com/swaywm/sway/issues/4324. This patch fixes this by handling minimize requests that some xwayland clients do.

116.1 Download

116.1.1 Authors


117 zoomswap

117.0.1 Description

This patch swaps the current window (C) with the previous master (P) when zooming.

Original behaviour :
+-----------------+-------+
|                 |       |
|                 |       |
|                 |       |
|        P        +-------|
|                 |       |
|                 |   C   |
|                 |       |
+-----------------+-------+

+-----------------+-------+
|                 |       |
|                 |   P   |
|                 |       |
|        C        +-------|
|                 |       |
|                 |       |
|                 |       |
+-----------------+-------+

New Behaviour :
+-----------------+-------+
|                 |       |
|                 |       |
|                 |       |
|        C        +-------+
|                 |       |
|                 |   P   |
|                 |       |
+-----------------+-------+

+-----------------+-------+
|                 |       |
|                 |       |
|                 |       |
|        P        +-------+
|                 |       |
|                 |   C   |
|                 |       |
+-----------------+-------+

117.0.2 Download

117.0.3 Authors


118 STALE PATCHES

118.1 DRMLeaseManager

118.1.1 Description

This implements the DRM lease protocol, which is needed to use devices such as VR headsets.

118.1.2 Download

118.1.3 Authors


118.2 XF86keysym

118.2.1 Description

Utilizing the /usr/include/X11/XF86keysym.h header file to change the volume via the appropriate keys.

118.2.2 Download

118.2.3 Authors


118.3 alphafocus

118.3.1 Description

Adds configurable transparency for focused and unfocused windows.

118.3.2 Download

118.3.3 Authors


118.4 attachabove

118.4.1 Description

Newly created windows are placed above the currently selected window in the stack.

118.4.2 Download

118.4.3 Authors


118.5 attachtop

118.5.1 Description

This is a port of attachtop patch for dwm: https://dwm.suckless.org/patches/attachtop

New client attaches below the last master/on top of the stack.

Behavior feels very intuitive as it doesn't disrupt existing masters no matter the amount of them, it only pushes the clients in stack down.

118.5.2 Download

118.5.3 Authors


118.6 autorotation

118.6.1 Description

Adds keybindings for screen rotation and auto rotation from an accelerometer.

118.6.2 Setup

Find an accelerometer device in sysfs (cat /sys/bus/iio/devices/iio*/name, or using a script: monitor-iio.sh)
Find the raw output file of the accelerometer (e.g. cat /sys/bus/iio/devices/iio:device0/in_accel_x_raw should output an integer).
Add the raw output file names to the dwl configuration accel_*.

Add a udev rule to uniquely identify the device, for example:

sudo echo 'SUBSYSTEM=="iio", KERNEL=="iio*", ATTR{name}=="accel_3d", GROUP="input", SYMLINK+="input/accel"' >> /etc/udev/rules.d/99-accel.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

(the device is probably already in /dev/ e.g. /dev/iio:device0 but on my computer the number changes after a reboot)

A symlink to the device should now be available in /dev/input/ and accessible to input group members.
Add the device path to the dwl configuration accel_path.

118.6.3 Config

Default keybindings:

118.6.4 Download

118.6.5 Authors


118.7 center

118.7.1 Description

Adds a rule to automatically center clients on the current monitor.

118.7.2 Download

118.7.3 Authors


118.8 clipboardManager

118.8.1 Description

Store your clipboard history using clipman clipboard manager without your KeePassXC passwords leaking into clipman.

Ensure these dependencies are installed (instructions for debian, other distros are left as an exercise...):

apt install clipman libmodern-perl-perl moreutils wl-clipboard

Change your command to launch dwl to something like the following:

dwl -s 'pee somebar dwl-getwindowtitle'

Ensure the following command is running in the background of your dwl session. Put it whereever your auto-started stuff is.

exec wl-paste -t text --watch dwl-clipman

This solution is based on the following reddit post, modified to support dwl. https://www.reddit.com/r/swaywm/comments/ljl0dh/keeping_secrets_secret_with_keepassxc_clipman_and/

Feel free to use this code however you want, but I can't guarantee it will work for what you are trying to do. Licenced under the same license as dwl, "WITHOUT WARRANTY OF ANY KIND".

118.8.2 Download

118.8.3 Authors


118.9 clipboardipc

118.9.1 Description

Adds clipboard functionality. Requires the ipc patch for dwl and wl-clipboard to be installed. By default, requires clipman for the clipboard and dwl-state for getting the appid of the focused application, but you can change these in the script if you have alternatives. You may change which applications to not record by modifying the excludes array in dwl-cliboard-watcher. Make sure wl-paste -t text -w dwl-clipboard-watcher is running after dwl.

118.9.2 Downloads

118.9.3 Authors


118.10 cyclelayouts

118.10.1 Description

Adds function to cycle through available layouts.

118.10.2 Download

118.10.3 Authors


118.11 fibonacci

118.11.1 Description

Arranges windows in a Fibonacci spiral or dwindle.

118.11.2 Scheme

+-----------+-----------+  +-----------+-----------+
|           |           |  |           |           |
|           |     2     |  |           |     2     |
|           |           |  |           |           |
|     1     +--+--+-----+  |     1     +-----+-----+
|           | 5|-.|     |  |           |     |  4  |
|           +--+--+  3  |  |           |  3  +--+--+
|           |  4  |     |  |           |     | 5|-.|
+-----------+-----+-----+  +-----------+-----+-----+
     spiral                     dwindle

118.11.3 Download

118.11.4 Authors


118.12 focusMonPointer

118.12.1 Description

Implements focusmon() function that moves the cursor to the focused monitor.

118.12.2 Download

118.12.3 Authors


118.13 focusdir

118.13.1 Description

Focus the window left, right, above or below the current focused window

118.13.2 Download

118.13.3 Authors


118.14 focusmaster

118.14.1 Description

Focus the master regardless of the current focus.

118.14.2 Download

118.14.3 Authors


118.15 genericgaps

118.15.1 Description

This patch is a modified version of vanitygaps that adds gaps around clients regardless of a layout. It means you can apply any layout patch and the gaps will be shown properly as long as the layout does not add any gaps on its own.

This works by allowing a layout to place clients normally without gaps, and then correcting positions and dimensions of clients afterwards to add gaps around them. To make it work, I had to modify resize() function, and, as a side effect, this change fixed some flickering I experienced when using snail layout.

118.15.2 Changelog

2023-11-24:

118.15.3 Download

118.15.4 Authors


118.16 gridmode

118.16.1 Description

Arranges windows in a grid of equal sizes.

118.16.2 Download

118.16.3 Authors


118.17 hidecursor

118.17.1 Description

Hide the cursor when typing

118.17.2 Download

118.17.3 Authors


118.18 kbrules

118.18.1 Description

Allow for keyboard rules to be used; This allows for keyboard-specific options or layouts.

The keyboard's names can be retrieved from libinput list-devices | grep Device, example:

static const KeyboardRule kbrules[] = {
    { "AT Translated Set 2 keyboard", { .options = "altwin:swap_alt_win,caps:swapescape" } },
};

118.18.2 Download

118.18.3 Authors


118.19 keychord

118.19.1 Description

This patch implements sequences for chained keybindings (like the dwm keychord patch).

Notes:

118.19.2 Example

The default values for MODKEY and PREFIXKEY can be changed in config.def.h and/or config.h.

118.19.2.1 emacs-like

In the example below, the firefox command is bound to the key sequence alt-s alt-u f.

static const Keychord keychords[] = {
  /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
  /* count key_sequences                          function  argument */
  { 3, {{MODKEY, XKB_KEY_s}, {MODKEY, XKB_KEY_u}, {MOD_NONE, XKB_KEY_f}}, spawn, SHCMD("firefox") },
};

118.19.2.2 vim-like

In the example below, the firefox command is bound to the key sequence alt-s u f.

static const Keychord keychords[] = {
  /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
  /* count key_sequences                          function  argument */
  { 3, {{MODKEY, XKB_KEY_s}, {MOD_NONE, XKB_KEY_u}, {MOD_NONE, XKB_KEY_f}}, spawn,SHCMD("firefox") },
};

118.19.3 Download

118.19.4 Authors


118.20 keymap

118.20.1 Description

Print current keyboard layout to stdout

118.20.2 Download

118.20.3 Authors


118.21 master-right

118.21.1 Description

Show the master area to the right.

118.21.2 Reason for deprecation

I created this patch for a user on Discord and I have never used it.

118.21.3 Download

118.21.4 Authors


118.22 mouse-follows-focus

118.22.1 Description

This patch adds the option to let the cursor jump to the center of new clients, as well as move the cursor to the center of clients that gains focus.

118.22.2 Download

118.22.3 Authors


118.23 move-stack-top

118.23.1 Description

Extend the movestack patch to let you also focus, or move, a client to the top or bottom of the stack.

118.23.2 Download

118.23.3 Authors


118.24 nomousefocus

118.24.1 Description

Prevent focus on mouseover.

118.24.2 Download

118.24.3 Authors


118.25 onlyquitonempty

118.25.1 Description

Only exit when no windows are open

118.25.2 Download

118.25.3 Authors


118.26 privilegeDrop

118.26.1 Description

Adds the -u option that allows users to pass a desired uid to drop to after becoming DRM master.

118.26.2 Download

118.26.3 Authors


118.27 relativemouseresize

118.27.1 Description

When resizing windows, the mouse will no longer jump to the bottom right corner and only resize from that corner. Instead, the mouse will resize the window in the quadrant that the resize starts at. This is the same resize behavior as Sway and is similar to the resizehere dwm patch.

118.27.2 Download

118.27.3 Authors


118.28 restartdwl

118.28.1 Description

This patch allows you to restart dwl with a keybinding.
NOTE: that all of your applications are gonna get killed on dwl restart.

The function creates a file at /tmp/restart_dwl and exits dwl.
You have to modify your dwl launch script in order for this patch to work.
Example dwl launch script:

do=true
while $do ||  [ -f /tmp/restart_dwl ]; do
    do=false
    rm -rf /tmp/restart_dwl > /dev/null 2>&1
    dwl
done

It's a do-while that checks if /tmp/restart_dwl exists after the first run of dwl.
If this file exists delete it and start dwl again.

118.28.2 Download

118.28.3 Authors


118.29 restoretiling

118.29.1 Description

All floating windows become tiling when switching to a different layout.

118.29.2 Download

118.29.3 Authors


118.30 stickyrule

118.30.1 Description

Add a rule to clients to spawn them sticky on start up. I personally use it to make dragon show up on all tags.

118.30.2 Download

Apply on top of sticky patch.

118.30.3 Authors


118.31 swaycompat

118.31.1 Description

Implements just enough of the sway-ipc protocol to facilitate status bars. Tested with waybar and rootbar.

118.31.2 Download

118.31.3 Authors


118.32 touchscreen

118.32.1 Description

Adds SIMPLE touchscreen functionality.
Currently emulates mouse movement and button presses.

118.32.2 Download

118.32.3 Authors


118.33 vertile

118.33.1 Description

A tiled layout optimized for wide vertical monitors.

118.33.2 Scheme

|---------------------------|
|                           |
|                           |
|             M             |
|                           |
|                           |
|---------------------------|
|            t1             |
|---------------------------|
|            t2             |
|---------------------------|
|            t3             |
|---------------------------|

118.33.3 Download

118.33.4 Authors


118.34 xcursor

118.34.1 Description

Set cursor theme and size via XCURSOR_THEME and XCURSOR_SIZE environmental variables.

118.34.2 Download

118.34.3 Authors