Dynamic window manager windows

Dynamic window manager windows

To launch dwm, ideally you should setup a

/.xinitrc with at least exec dwm .

Introduction

Using dwm can be done in pure keyboard control or through some extra mouse handling. See the config.def.h for what are the default bindings. They are used in this tutorial.

By default there are 9 tags.

Window model

Launch a few terminals with [Shift]+[Alt]+[Enter] and dwm will tile the windows between the master and stack. A new terminal appears on the master window. Existing windows are pushed upon a stack to the right of the screen. [Alt]+[Enter] toggles windows between master and stack.

Moving Around

To move to another terminal, press [Alt]+[j] or [Alt]+[k] .

To move a terminal to another tag, hover to the terminal and press [Shift]+[Alt]+[2] . Note! If you are a frequent user of the text editor ‘nano’ the key sequence [Shift]+[Alt]+[4] will stomp on nano’s softwrap M-$. To get around this you can unbind nano’s M-$ in .nanorc thus:

and rebind it to a new sequence thus (here bind it to ‘Meta Key’ + ‘;’):

There are several other nano key sequences that dwm will stomp on — use the above example to fix nano up.

To focus on another tag, press [Alt]+[tag number] .

To change the amount of windows in the master area, press [Alt]+[d] (Decrease) or [Alt]+[i] (Increase).

To toggle a window between the master and stack area, press [Alt]+[Return]

As stated in the dwm manpage, you can click tags with the left mouse button and simulating [Alt]+[tag number] , but you can also click another tag with the right mouse button in order to bring those windows additionally into your current focus.

To kill a window, press [Shift]+[Alt]+[c] .

Layouts

By default dwm is in tiled layout mode. Ensure it is tiled mode with:

You should also notice the []= symbol between the tag numbers and the title bar.

dwm has two further layout modes, floating ><> [Alt]+[f] and monocle [M] [Alt]+[m] . Monocle is good for ensuring a window is kept maximized and focused. This is useful in web kiosk environments and watching flash videos. Further layout modes can be included through patches.

Floating

Floating layout will be familiar to Windows users. Use [Alt]+[right mouse button] to resize the floating window and [Alt]+[left mouse button] to move it around. This can also be used to raise a floating window.

There are several ways to get specific windows into being managed as a floating window, despite the tiled layout being activated. First there is [Alt]+[Shift]+[space] , which will toggle floating mode on the active window. Second method is to simply resize the window using [Alt]+[right mouse button] . The last method is to [Alt]+[middle mouse button] onto the window, to toggle it in being floating. These floating windows then can be used to force certain window sizes, when some application requires this for aesthetics or simply to being usable.

If you want to set some type of window to be always floating, look at the config.def.h and the rules array, where the last but one element defines this behaviour.

Читайте также:  Драйвера для forza horizon 4 windows

Quitting

To quit dwm cleanly:

Status

By default dwm is showing dwm-X.X in its statusbar. This text can be changed by setting the WM_NAME property of the root window.

Using the tools of X.org, this can be set using:

There are various tools and methods to populate this text with useful information from your system or services running on your system. A barebone for doing this in C is dwmstatus. See the xinitrc example for how to do it using a script.

Dynamic window manager windows

dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. All of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.

In tiled layout windows are managed in a master and stacking area. The master area contains the window which currently needs most attention, whereas the stacking area contains all other windows. In monocle layout all windows are maximised to the screen size. In floating layout windows can be resized and moved freely. Dialog windows are always managed floating, regardless of the layout applied.

Windows are grouped by tags. Each window can be tagged with one or multiple tags. Selecting certain tags displays all windows with these tags.

Each screen contains a small status bar which displays all available tags, the layout, the number of visible windows, the title of the focused window, and the text read from the root window name property, if the screen is focused. A floating window is indicated with an empty square and a maximised floating window is indicated with a filled square before the windows title. The selected tags are indicated with a different color. The tags of the focused window are indicated with a filled square in the top left corner. The tags which are applied to one or more windows are indicated with an empty square in the top left corner.

dwm draws a small customizable border around windows to indicate the focus state.

Differences

In contrast to ion, larswm, and wmii, dwm is much smaller, faster and simpler.

  • dwm has no Lua integration, no 9P support, no shell-based configuration, no remote control, and comes without any additional tools, such as for printing the selection or warping the mouse.
  • dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC.
  • dwm doesn’t distinguish between layers: there is no floating or tiled layer. Whether or not the clients of currently selected tag(s) are in tiled layout, you can rearrange them on the fly. Popup and fixed-size windows are always floating, however.
  • dwm is customized through editing its source code, which makes it extremely fast and secure — it does not process any input data which isn’t known at compile time, except window titles and status text read from the root window’s name. You don’t have to learn Lua/sh/ruby or some weird configuration file format (like X resource files), beside C, to customize it for your needs: you only have to learn C (at least in order to edit the header file).
  • Because dwm is customized through editing its source code, it’s pointless to make binary packages of it. This keeps its userbase small and elitist. No novices asking stupid questions. There are some distributions that provide binary packages though.
  • dwm reads from the root window’s name to print arbitrary status text (like the date, load, battery charge). That’s much simpler than larsremote, wmiir and what not.
  • dwm creates a view for each Xinerama screen.
Читайте также:  Установить мелодию звонок windows phone
  • Mailing List: dev+subscribe@suckless.org (Archives) (Old Archives) (see community for details)
  • IRC channel: #suckless at irc.oftc.net

Download

Support

See the faq for the frequent problems that arise. The next step is to look at the sourcecode and the config.h for obvious names, which could be related to the problem that arose. If that does not help to fix the problem, then there is the #suckless IRC channel and the mailinglist.

If it is your first time using dwm, start with reading the tutorial.

Development

You can browse its source code repository or get a copy using git with the following command:

Dynamic window manager windows

dwm-win32 — a Microsoft Windows port of the X11 dwm(1)

dwm-win32 is a port of the well known X11 window manager dwm to the Microsoft Windows platform.

It tries to bring the suckless philosophy and the principle of dynamic window management to Windows systems.

Warning: I no longer actively use and develop dwm-win32.

dwm manages windows in tiled, monocle and floating layouts. Either layout can be applied dynamically, optimising the environment for the application in use and the task performed.

In tiled layouts windows are managed in a master and stacking area. The master area contains the window which currently needs most attention, whereas the stacking area contains all other windows. In monocle layout all windows are maximised to the screen size. In floating layout windows can be resized and moved freely. Dialog windows are always managed floating, regardless of the layout applied.

Windows are grouped by tags. Each window can be tagged with one or multiple tags. Selecting certain tags displays all windows with these tags.

dwm contains a small status bar which displays all available tags, the layout and the title of the focused window. A floating window is indicated with an empty square and a maximised floating window is indicated with a filled square before the windows title. The selected tags are indicated with a different color. The tags of the focused window are indicated with a filled square in the top left corner. The tags which are applied to one or more windows are indicated with an empty square in the top left corner.

dwm draws a small border around windows to indicate the focus state.

Either use the pre compiled exe files or download the source and compile it with MinGW and MSYS.

You should now be able to start dwm-win32 , redirect stderr to a file if you want to see when something goes wrong.

The configuration of dwm-win32 is done by creating a custom config.h and (re)compiling the source code. See the default config.h as an example, adapting it to your preference should be straightforward. You basically define a set of layouts and keys which dwm-win32 will use. There are some pre defined macros to ease configuration.

Читайте также:  Невозможно отформатировать жесткий диск при установке windows

Because this is all pretty similar to X11 dwm you might find it’s customization page useful.

dwm uses a modifier key (denoted by MOD ) which defaults to CTRL + ALT .

MOD + Shift + Return Start cmd.exe .

MOD + b Toggles bar on and off.

MOD + e Toogles windows explorer and taskbar on and off.

MOD + t Sets tiled layout.

MOD + f Sets floating layout.

MOD + m Sets monocle layout.

MOD + Space Toggles between current and previous layout.

MOD + j Focus next window.

MOD + k Focus previous window.

MOD + h Decrease master area size.

MOD + l Increase master area size.

MOD + Return Zooms/cycles focused window to/from master area (tiled layouts only).

MOD + Shift + c Close focused window.

MOD + Shift + Space Toggle focused window between tiled and floating state.

MOD + n Toggles border of currently focused window.

MOD + i Display classname of currently focused window, useful for wiriting tagging rules.

MOD + Tab Toggles to the previously selected tags.

MOD + Shift + [1..n] Apply nth tag to focused window.

MOD + Shift + 0 Apply all tags to focused window.

MOD + Control + Shift + [1..n] Add/remove nth tag to/from focused window.

MOD + [1..n] View all windows with nth tag.

MOD + 0 View all windows with any tag.

MOD + Control + [1..n] Add/remove all windows with nth tag to/from the view.

MOD + q Quit dwm.

Left Button: click on a tag label to display all windows with that tag, click on the layout label toggles between tiled and floating layout.

Right Button: click on a tag label adds/removes all windows with that tag to/from the view.

Alt + Left Button: click on a tag label applies that tag to the focused window.

Alt + Right Button: click on a tag label adds/removes that tag to/from the focused window.

A ShellHook is registered which is notified upon window creation and destruction, however it is important to know that this only works for unowned top level windows. This means we will not get notified when child windows are created/destroyed. Therefore we scan the currently active top level window upon activation to collect all associated child windows. This information is for example used to tag all windows and not just the toplevel one when tag changes occur.

This is all kind of messy and we might miss some child windows in certain situations. A better approach would probably be to introduce a CBTProc function and register it with SetWindowsHookEx(WH_CBT, . ) with this we would get notified by all and every window, including toolbars etc. which we would have to filter out.

Unfortunately the SetWindowsHookEx thingy seems to require a separate DLL which will be loaded into each process address space.

You can always fetch the current code base from the git repository located at Github or Sourcehut.

If you have comments, suggestions, ideas, a bug report, a patch or something else related to dwm-win32 then write to the suckless developer mailing list or contact me directly.

Below are some links which are in one way or another related to dwm-win32.

  • dwm the original for X11
  • bblean another free software window manager for win32

dwm-win32 obviously reuses some code of dwm and is released under the same MIT/X11 license.

About

dynamic window manager ported to Microsoft Windows

Оцените статью