Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
/dwlPublic archive

dwm for Wayland - ARCHIVE: development has moved to Codeberg

License

Unknown and 3 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.dwm
MIT
LICENSE.sway
Unknown
LICENSE.tinywl
NotificationsYou must be signed in to change notification settings

djpohly/dwl

Repository files navigation

⚠️ Migrated to Codeberg

This project hasmigrated to Codeberg.

Join us on our IRC channel:#dwl on Libera Chat
Or on ourDiscord server.

dwl is a compact, hackable compositor forWayland based onwlroots. It isintended to fill the same space in the Wayland world that dwm does in X11,primarily in terms of philosophy, and secondarily in terms of functionality.Like dwm, dwl is:

  • Easy to understand, hack on, and extend with patches
  • One C source file (or a very small number) configurable viaconfig.h
  • Limited to 2200 SLOC to promote hackability
  • Tied to as few external dependencies as possible

dwl is not meant to provide every feature under the sun. Instead, like dwm, itsticks to features which are necessary, simple, and straightforward to implementgiven the base on which it is built. Implemented default features are:

  • Any features provided by dwm/Xlib: simple window borders, tags, keybindings,client rules, mouse move/resize. Providing a built-in status bar is anexception to this goal, to avoid dependencies on font rendering and/ordrawing libraries when an external bar could work well.
  • Configurable multi-monitor layout support, including position and rotation
  • Configurable HiDPI/multi-DPI support
  • Idle-inhibit protocol which lets applications such as mpv disable idlemonitoring
  • Provide information to external status bars via stdout/stdin
  • Urgency hints via xdg-activate protocol
  • Support screen lockers via ext-session-lock-v1 protocol
  • Various Wayland protocols
  • XWayland support as provided by wlroots (can be enabled inconfig.mk)
  • Zero flickering - Wayland users naturally expect that "every frame is perfect"
  • Layer shell popups (used by Waybar)
  • Damage tracking provided by scenegraph API

Features under consideration (possibly as patches) are:

  • Protocols made trivial by wlroots
  • Implement the text-input and input-method protocols to support IME once ibusimplements input-method v2 (seeibus/ibus#2256 and#235)

Featurenon-goals for the main codebase include:

  • Client-side decoration (any more than is necessary to tell the clients not to)
  • Client-initiated window management, such as move, resize, and close, which canbe done through the compositor
  • Animations and visual effects

Building dwl

dwl has the following dependencies:

libinputwaylandwlroots (compiled with the libinput backend)xkbcommonwayland-protocols (compile-time only)pkg-config (compile-time only)

If you enable X11 support:

libxcblibxcb-wmwlroots (compiled with X11 support)Xwayland (runtime only)

Simply install these (and their-devel versions if your distro has separatedevelopment packages) and runmake. If you wish to build against a Gitversion of wlroots, check out thewlroots-next branch.

To enable XWayland, you should uncomment its flags inconfig.mk.

Configuration

All configuration is done by editingconfig.h and recompiling, in the samemanner as dwm. There is no way to separately restart the window manager inWayland without restarting the entire display server, so any changes will takeeffect the next time dwl is executed.

As in the dwm community, we encourage users to share patches they have created.Check out thepatches page on our wiki!

Running dwl

dwl can be run on any of the backends supported by wlroots. This means you canrun it as a separate window inside either an X11 or Wayland session, as wellas directly from a VT console. Depending on your distro's setup, you may needto add your user to thevideo andinput groups before you can run dwl ona VT. If you are usingelogind orsystemd-logind you need to installpolkit; otherwise you need to add yourself in theseat group andenable/start the seatd daemon.

When dwl is run with no arguments, it will launch the server and begin handlingany shortcuts configured inconfig.h. There is no status bar or otherdecoration initially; these are instead clients that can be run withinthe Wayland session.Do note that the background color is black.

If you would like to run a script or command automatically at startup, you canspecify the command using the-s option. This command will be executed as ashell command using/bin/sh -c. It serves a similar function to.xinitrc,but differs in that the display server will not shut down when this processterminates. Instead, dwl will send this process a SIGTERM at shutdown and waitfor it to terminate (if it hasn't already). This makes it ideal for execing intoa user service manager likes6,anopa,runit, orsystemd --user.

Note: The-s command is run as achild process of dwl, which means that itdoes not have the ability to affect the environment of dwl or of any processesthat it spawns. If you need to set environment variables that affect the entiredwl session, these must be set prior to running dwl. For example, Waylandrequires a validXDG_RUNTIME_DIR, which is usually set up by a session managersuch aselogind orsystemd-logind. If your system doesn't do thisautomatically, you will need to configure it prior to launchingdwl, e.g.:

export XDG_RUNTIME_DIR=/tmp/xdg-runtime-$(id -u)mkdir -p $XDG_RUNTIME_DIRdwl

Status information

Information about selected layouts, current window title, app-id, andselected/occupied/urgent tags is written to the stdin of the-s command (seetheprintstatus() function for details). This information can be used topopulate an external status bar with a script that parses the information.Failing to read this information will cause dwl to block, so if you do want torun a startup command that does not consume the status information, you canclose standard input with the<&- shell redirection, for example:

dwl -s 'foot --server <&-'

If your startup command is a shell script, you can achieve the same inside thescript with the line

exec <&-

To get a list of status bars that work with dwl consult ourwiki.

Replacements for X applications

You can find alist of useful resources on our wiki.

Acknowledgements

dwl began by extending the TinyWL example provided (CC0) by the sway/wlrootsdevelopers. This was made possible in many cases by looking at how swayaccomplished something, then trying to do the same in as suckless a way aspossible.

Many thanks to suckless.org and the dwm developers and community for theinspiration, and to the various contributors to the project, including:

  • Alexander Courtis for the XWayland implementation
  • Guido Cella for the layer-shell protocol implementation, patch maintenance,and for helping to keep the project running
  • Stivvo for output management and fullscreen support, and patch maintenance

[8]ページ先頭

©2009-2025 Movatter.jp