103 KiB
accessnthmon
Description
Port of dwm's accessnthmon. Adds functions to tag and focus monitor by index.
Download
Authors
alwayscenter
Description
Automatically center floating windows.
Download
Authors
attachbottom
Description
Newly created windows are placed at the bottom of the client tile stack.
Download
Authors
attachtop
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.
Download
Authors
autostart
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).
Download
Authors
bar
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
Dependencies
- tllist (build dependency, required & pulled automatically by fcft)
- fcft
- pixman
Download
Below is a preview of the patch.
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
Authors
Credits
bar-systray
Description
Add a system tray next to the bar. Heed the warning, this is far from suckless ^^
Dependencies
- GTK4
- bar.patch as mentioned.
- gtk4-layer-shell
- statusnotifier-systray-gtk4 built as a static library.
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:
- Clone https://codeberg.org/janetski/statusnotifier-systray-gtk4. Can clone to any location.
- From statusnotifier-systray-gtk4 root:
$ meson setup --default-library=static --prefix=/ -Dgir=false -Dvala=false -Ddocs=false build
$ meson compile -C build
$ DESTDIR=$DWLDIR meson install -C build
, where $DWLDIR is the path to dwl root.
- Finally, from dwl root, run
make
.
Download
Authors
barborder
Description
Add a border around the bar similar to how a client is given a border.
Download
Authors
barcolors
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.
Download
Authors
barheight
Description
Adds the ability to change the bar's height.
Download
- 0.7 (bar 0.7)
- git branch
Authors
barpadding
Description
Add vertical and horizontal space between the bar and the edge of the screen.
Download
Authors
borders
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 toBrdOriginal
:and
border_color_type
set toBrdStart
:and
border_color_type
set toBrdEnd
:and
border_color_type
set toBrdStartEnd
:![]()
Download
Authors
bottomstack
Description
bstack and bstackhoriz are two stack layouts for dwl.
Scheme
bstack (TTT) bstackhoriz (===)
+-----------------+ +-----------------+
| | | |
| | | |
| | | |
+-----+-----+-----+ +-----------------+
| | | | +-----------------+
| | | | +-----------------+
+-----+-----+-----+ +-----------------+
Download
Authors
buttonbystate
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.
Download
Authors
center-terminal
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.
Download
Authors
centeredmaster
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 || ||
|| || || || || || || ||
|+--------++--------++--------+| |+--------++--------++--------+|
+------------------------------+ +------------------------------+
Download
Authors
cfact
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 |
+----------+----------+`
Download
Authors
cfact-centeredmaster
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.
Download
Authors
chainkeys
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.
Download
Authors
client-opacity
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
Download
Authors
column
Description
A column layout patch. This patch just puts the visible clients into equal-width columns on the screen.
Download
Authors
coredump
Description
Generate a coredump if dwl exited abnormally (to be more usefull you need to compile dwl and wlroots with debug symbols)
Download
Authors
cursortheme
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 */
Download
Authors
customfloat
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.![]()
Download
Authors
deck
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 |
| | |
| | |
| | |
+-----------------+--------+
Download
Authors
define-modkey-with-make-argument
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.
Download
Authors
dim-unfocused
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
,
toggledimming
: Which toggles dimming for all windows (except forRule
s)toggledimmingclient
: Which toggles dimming for the focused window, as if the client hadneverdim
applied to it. This overwrites an appliedRule
.
Download
Authors
dragmfact
Description
Change mfact by dragging the mouse.
Download
Authors
dragresize
Description
implement rio-like window resizing
select window to resize (mod+middleclick by default) then drag out an area for it to occupy
Download
Authors
en-keycodes
Description
Always use the English keymap to get keycodes, so key bindings work even when using a non-English keyboard layout.
Download
Authors
envcfg
Description
Input device configuration (click method, tap-and-drag, acceleration, etc), border size and colors via environment variables.
Download
Authors
fakefullscreenclient
Description
Allow setting fake fullscreen per client
Download
Authors
fallback
Description
Tries a different display mode if the preferred mode doesn't work.
Download
Authors
float-unfocused-border-color
Description
A revive of the floatBorderColor patch.
This patch allows you to set a color for floating windows when they are unfocused.
Download
Authors
focusdir
Description
Focus the window to the left, right, above or below the current focused window
Download
Authors
foreign-toplevel-management
Description
Implement foreign-toplevel-management
, it add handlers for activate, close, fullscreen and destroy request events, it's missing minimize and maximize request handlers.
Download
Authors
gaplessgrid
Description
Arranges windows in a grid. Except it adjusts the number of windows in the first few columns to avoid empty cells.
Download
Pre-codeberg
Authors
- Sneethe
- Vladislav Nepogodin
- Dhruva Sambrani (Revived to codeberg)
gaps
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.
Download
Authors
gestures
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
Download
Authors
globalkey
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.
Download
Authors
headless
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
Download
Authors
hide-behind-fullscreen
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
Download
Authors
hide-behind-monocle
Description
Hide all clients behind the focused one in the monocle layout
Download
Authors
hide_vacant_tags
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.
Download
Authors
hiderule
Description
Adds a ishidden
option to client rules, that allows hiding any matching clients entirely.
Download
Authors
inputdevicerules
Description
Input device rules implemented using custom device create functions for keyboards and pointing devices.
Examples provided:
- ignore unwanted input devices
- configure a toggle input device
- exclude certain keyboards (eg ydotool) from keyboard group
Download
Authors
ipc
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
Download
- git branch
- 2024-08-16
- 2024-07-29 don't focus other outputs (apply this minipatch if you'd prefer that)
- 2024-07-16
- 2024-06-30
- 2024-06-21
- 2024-06-19
- 2024-06-08
- 2024-03-13
- 2024-02-20
- 2023-10-28 Updated version of 2023-04-29, prevents ipc from freezing the compositor in printstatus.
- 2023-04-29 Use this for dwl-ipc-unstable-v2. If you are using commit 9d68554 or later, use this. For status bars this protocol is supported by dwlb, Waybar and dwl-bar.
- 2023-04-29 Use this for dwl-ipc-unstable-v1. If you are using commit bbdaf2a9, release 0.4 or earlier, use this. For status bars, this protocol is supported by dwl-bar.
- 2023-02-20 Use this for net-tapesoftware-dwl-wm-unstable-v1. If you are using commit c69a2bec or later, use this. For status bars this protocol is supported by somebar.
Authors
kblayout
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
.
Download
Authors
keyboardshortcutsinhibit
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.
Download
Authors
keycodes
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)).
Download
Config after patching
(run in DWL source directory)
export XKB_DEFAULT_VARIANT=yourbestkeyboardlayout
cc -lxkbcommon -o generate-keys generate-keys.c
./generate-keys
Authors
less-simple-touch-input
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:
- Sometimes, the pointer moves to where the screen is pressed, but the button press doesn't occur until the screen is touched AGAIN. This means that if you touch to click button 'Q' on the screen (for instance), nothing happens; then you touch elsewhere on the screen and THEN button 'Q' registers a click. This is annoying, doesn't always happen, and I don't yet know how to fix it.
Download
Authors
Changelog
- 2024-02-11 Corrected issue where motion events where not sending notifications for unfocused clients such as an on screen keyboard
- 2024-03-26 Rebased, and removed #ifdef's for the pointer constraints patch which has been merged into upstream
- 2024-03-28 Removed debug
limitnmaster
Description
Limits nmaster to within the range of currently-opened windows (nmaster will not change past the full horizontal split layout)
Download
Authors
lockedkeys
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),
};
Download
Authors
mastercolumn
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
.
Download
mastercolumn.patch
mastercolumn-gaps.patch
Authors
menu
Description
This patch adds menu
command, which allows dwl to interface with dmenu-like programs.
By default, two menus are available:
- focusing a window by its title by pressing
Alt+o
- selecting a layout from a list by pressing
Alt+Shift+o
Edit menus
array in config.h
to add/change menus and use a different dmenu program.
Download
Authors
meson
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.
Download
Authors
minimalborders
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
![]()
Download
Authors
modes
Description
Implement modes, that way each mapping is associated with a mode and is only active while in that mode, default mode is NORMAL
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} } },
};
Download
Authors
monfig
Description
Allows more monitor configuration in config.h
Download
Authors
movecenter
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.![]()
Download
Authors
moveresizekb
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 |
Download
Authors
movestack
Description
Allows you to move a window up and down the stack.
Download
Authors
namedscratchpads
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:
togglescratch
: simply toggles the scratchpad windowfocusortogglescratch
: change the focus to the scratchpad window if it is visible and toggles it if it is already in focusfocusortogglematchingscratch
: similar tofocusortogglescratch
but also closes all other scratchpad windows
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.
Download
Authors
naturalscrolltrackpad
Description
Set natural scrolling only for trackpads.
Download
Authors
nextlayout
Description
Change the current layout to the next available one.
Download
Authors
numlock-capslock
Description
Allows activating numlock or capslock at startup.
Download
Authors
passthrough
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
Download
Authors
perinputconfig
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.
Download
Authors
pertag
Description
Makes layout, mwfact and nmaster individual for every tag.
Download
Authors
pointer-gestures-unstable-v1
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.
Download
Authors
press_repeat_release
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.
Download
Authors
primaryselection
Description
Adds a config option to disable/enable primary selection (middle-click paste).
Download
Authors
- nullsystem
- Palanix - Previous Primary-Selection patch
push
Description
Adds functions pushup
and pushdown
to move windows within the tiling order.
Download
Authors
regexrules
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 },
// ...
};
Download
Authors
regions
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)"
Download
Authors
relative-mouse-resize
Description
When resizing windows, the mouse will jump and resize the window in the quadrant that the resize starts at.
Download
Authors
remembertags
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:
- Select tag 5, with mod+5
- Toggle tag 8, with ctrl+mod+8
- Select tag 1, with mod+1. Tags 5 and 8 should no longer be visible.
- Select tag 5 again, with mod+5. Tag 8 should be visible since it was remembered.
- 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.
Download
Authors
restore-monitor
Description
Moves clients to their old output when it is reattached.
Download
Authors
right
Description
Put newly connected monitors on the right, like X does.
Download
Authors
rlimit_max
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.
Download
Authors
rotatetags
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.
Download
Authors
scenefx
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
Download
-
IMPORTANT: This patch only works with the
2ec3505248e819191c37cb831197629f373326fb
commit on themain
branch ofscenefx
, therefore, it does not support blur.IMPORTANT: This patch requires you to build DWL with the following dependencies
- scenefx
- libGL
-
IMPORTANT: This patch only works with the
de4ec10e1ff9347b5833f00f8615d760d9378c99
commit on thewlr_scene_blur
branch ofscenefx
, as it adds support for blur.IMPORTANT: This patch requires you to build DWL with the dependencies of WLROOTS:
- scenefx
- libGL
- libcap
- libinput
- libpng
- libxkbcommon
- mesa
- pixman
- seatd
- vulkan-loader
- wayland
- wayland-protocols
- xorg.libX11
- xorg.xcbutilerrors
- xorg.xcbutilimage
- xorg.xcbutilrenderutil
- xorg.xcbutilwm
- xwayland (optional)
- ffmpeg
- hwdata
- libliftoff
- libdisplay-info
Authors
scroll-factor
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.
Download
Authors
setupenv
Description
Allow configuring environment variables in config.h
Download
Authors
shiftview
Description
Add keybindings to cycle through tags with visible clients.
Download
Authors
simpleborders
Description
Like smartborders. Don't put borders when there is only one window on the screen.
Download
Authors
singlemaster
Description
Restricts layout to only having one client in the master area.
Download
Authors
singletagset
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/
Download
Authors
singletagset-pertag
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.
Download
Authors
singletagset-sticky
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.
Download
Authors
skipfocus
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 |
Download
Authors
smartborders
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.
Download
Authors
- sevz
- fauxmight
- Piotr Marendowski
- Andrey Proskurin
snail
Description
Adds a spiral-inspired layout for wide screens.
Download
Authors
- Dima Krasner (dima@dimakrasner.com)
- Nikita Ivanov (fix for flickering)
snail-gaps
Description
Adds support for the gaps patch to the snail layout patch.
Install the gaps patch and the snail patch first.
Download
Authors
stacker
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.
- Focus any window of the stack with a single key binding.
- Swap the currently focused windows with any other window in the stack.
- Move the selected window in the stack with
relativeswap
.
This patch is heavily inspired by the original stacker dwm patch.
Keybinding
MODKEY
+ {q
,w
,e
,r
}: jump to the first, second, third and last window of the stackMODKEY
+SHIFT
+ {Q
,W
,E
,R
}: swap the selected with the first, second, third and last window of the stackMODKEY
+SHIFT
+ {J
,K
}: move the selected window up & down the stack
Missing feature
Jumping to the last selected window is not yet implemented.
Download
Authors
startargv
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
Download
Authors
sticky
Description
Adds a toggleable function that makes a sticky client that is visible on all tags.
Originally based on dwm sticky patch.
Download
Authors
swallow
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
Download
- git branch
- 2024-07-13
- 2024-07-13
- 2024-05-02
- 2024-04-03
- 2024-01-01
- 2023-10-26
- 2023-08-16
- 2023-07-15
- v0.4
- 2021-12-03
Authors
swapandfocusdir
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.
Download
Authors
switchtotag
Description
Add a rule option to switch to the configured tag when a window opens, then switch back when it closes.
Download
Authors
tab
Description
Add a tab bar or window title to the top or bottom of windows.
Download
Authors
tablet-input
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
Download
- git branch
- 2024-07-31 fixes pen not working after lifting up
- 2024-06-21
- 2024-06-19
- 2024-05-04
Authors
tearing
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"},
};
Download
Authors
titleurgent
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.
Download
Authors
toggle_constraints
Description
Adds a function called togglepointerconstraints to turn pointer constraint enforcement on and off with a keybind.
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}},
Download
Authors
togglekblayout
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.
Download
Authors
togglekblayoutandoptions
Description
Switch between multiple keyboard layouts, variants, and options at runtime.
Download
Authors
unclutter
Description
Hide the mouse cursor if it isn't being used for a certain period of time.
Download
Authors
ungroup-keyboards
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.
Download
Authors
vanitygaps
Description
Adds (inner) gaps between client windows and (outer) gaps between windows and the screen edge in a flexible manner.
Download
Authors
varcol
Description
A variable column layout.
This layout behaves much the same as the tile
layout, but adds key bindings that can be used to:
- Increase/decrease the number of non-master columns
- Increase/decrease the colfact to adjust the column spacing
- Push a client in or out of a special
left
column - Toggle displaying the special
left
column
Download
Authors
viewnextocctag
Description
View the next or previous tag, skipping any tags that do not have any clients.
Download
Authors
virtual-pointer
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 ac6074f4fd
Download
Authors
warpcursor
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.
Download
Authors
winview
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.
Download
Authors
xwayland-handle-minimize
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.
Download
Authors
zoomswap
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 |
| | |
+-----------------+-------+
Download
Authors
STALE PATCHES
DRMLeaseManager
Description
This implements the DRM lease protocol, which is needed to use devices such as VR headsets.
Download
Authors
XF86keysym
Description
Utilizing the /usr/include/X11/XF86keysym.h header file to change the volume via the appropriate keys.
Download
Authors
alphafocus
Description
Adds configurable transparency for focused and unfocused windows.
Download
Authors
attachabove
Description
Newly created windows are placed above the currently selected window in the stack.
Download
Authors
attachtop
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.
Download
Authors
autorotation
Description
Adds keybindings for screen rotation and auto rotation from an accelerometer.
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.
Config
rotation_enabled
: If the auto rotation is enabled on startup.rotation_delay
: How often to check the accelerometer values in milliseconds.rotation_flat
: Threshold on the normalized Z axis to consider the device flat and stop the auto rotation.rotation_thresh
: Rotation threshold after which the screen flips (values less than 0.5 will cause a back and forth).
accel_path
: The path to the accelerometer device file (e.g. "/dev/input/accel").accel_x
: The name of the sysfs file for the accelerometer x axis.accel_y
: The name of the sysfs file for the accelerometer y axis.accel_z
: The name of the sysfs file for the accelerometer z axis.
Default keybindings:
<Modkey>
+<Shift>
+<Arrows>
: Change the screen rotation manually (doesn't disable the auto rotation).<Modkey>
+<Shift>
+<R>
: Enable/disable the auto rotation.
Download
Authors
center
Description
Adds a rule to automatically center clients on the current monitor.
Download
Authors
clipboardManager
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".
Download
Authors
clipboardipc
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.
Downloads
Authors
cyclelayouts
Description
Adds function to cycle through available layouts.
Download
Authors
fibonacci
Description
Arranges windows in a Fibonacci spiral or dwindle.
Scheme
+-----------+-----------+ +-----------+-----------+
| | | | | |
| | 2 | | | 2 |
| | | | | |
| 1 +--+--+-----+ | 1 +-----+-----+
| | 5|-.| | | | | 4 |
| +--+--+ 3 | | | 3 +--+--+
| | 4 | | | | | 5|-.|
+-----------+-----+-----+ +-----------+-----+-----+
spiral dwindle
Download
Authors
- Abanoub8
- medanisjbara
- 917Wolf
- Niki Yoshiuchi
focusMonPointer
Description
Implements focusmon()
function that moves the cursor to the focused monitor.
Download
Authors
focusdir
Description
Focus the window left, right, above or below the current focused window
Download
Authors
focusmaster
Description
Focus the master regardless of the current focus.
Download
Authors
genericgaps
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.
Changelog
2023-11-24:
- Refactor, it does exactly the same, just using less code.
- Replace
gappih
,gappiv
,gappoh
andgappov
with onlygappx
. They don't do anything anyways.
Download
- 2023-11-24
- 2023-05-20 generic gaps
- 2023-05-20 generic gaps + monitor rule to enable gaps on certain monitors by default
Authors
gridmode
Description
Arranges windows in a grid of equal sizes.
Download
Authors
hidecursor
Description
Hide the cursor when typing
Download
Authors
kbrules
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" } },
};
Download
Authors
keychord
Description
This patch implements sequences for chained keybindings (like the dwm keychord patch).
Notes:
- The maximum number of sequences is set to
5
in theKeychord
struct for a given keybinding - This original motivation was better support for stumpwm style of keybindings, however this is not a limitation
Example
The default values for MODKEY
and PREFIXKEY
can be changed in config.def.h
and/or config.h
.
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") },
};
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") },
};
Download
Authors
keymap
Description
Print current keyboard layout to stdout
Download
Authors
master-right
Description
Show the master area to the right.
Reason for deprecation
I created this patch for a user on Discord and I have never used it.
Download
Authors
mouse-follows-focus
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.
Download
Authors
move-stack-top
Description
Extend the movestack patch to let you also focus, or move, a client to the top or bottom of the stack.
Download
Authors
- 0undefined
- Original movestack patch: sam-barr
nomousefocus
Description
Prevent focus on mouseover.
Download
Authors
onlyquitonempty
Description
Only exit when no windows are open
Download
Authors
privilegeDrop
Description
Adds the -u option that allows users to pass a desired uid to drop to after becoming DRM master.
Download
Authors
relativemouseresize
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.
Download
Authors
restartdwl
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.
Download
Authors
restoretiling
Description
All floating windows become tiling when switching to a different layout.
Download
Authors
stickyrule
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.
Download
Apply on top of sticky patch.
Authors
swaycompat
Description
Implements just enough of the sway-ipc
protocol to facilitate status bars. Tested with waybar
and rootbar
.
Download
Authors
touchscreen
Description
Adds SIMPLE touchscreen functionality.
Currently emulates mouse movement and button presses.
Download
Authors
vertile
Description
A tiled layout optimized for wide vertical monitors.
Scheme
|---------------------------|
| |
| |
| M |
| |
| |
|---------------------------|
| t1 |
|---------------------------|
| t2 |
|---------------------------|
| t3 |
|---------------------------|
Download
Authors
xcursor
Description
Set cursor theme and size via XCURSOR_THEME
and XCURSOR_SIZE
environmental variables.