Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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
Appearance settings

dwm port of tiling manager to Window

License

NotificationsYou must be signed in to change notification settings

prabirshrestha/dwm-win32

Repository files navigation

dwm-win32 is a port of the well known X11 window manager dwm to MicrosoftWindows.

It is recommended to run dwm-win32 as Administrator so it will catch all windows including those you ran as Administrator.

dwm-win32 screenshot

Description

dwm is a dynamic window manager for Microsoft Windows. It manages windowsin tiled, monocle and floating layouts. Either layout can be applieddynamically, optimising the environment for the application in use andthe task performed.

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

Windows are grouped by tags. Each window can be tagged with one ormultiple tags. Selecting certain tags displays all windows with thesetags.

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

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

Usage

Keyboard

dwm uses a modifier key by default this isALT.

MOD + Control + 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 + Control + 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 + Control + Return Zooms/cycles focused window to/from master area (tiled layouts only).

MOD + Shift + c Close focused window.

MOD + Shift + a Force rearrange.

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 writingtagging 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 + Shift + j Move stack +1

MOD + Shift + k Move stack -1

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 + Control + q Quit dwm.

MOD + Control + l Log all window state.

Mouse

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

Right Button click on a tag label adds/removes all windows with that tag to/fromthe 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.

How it works

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

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

Unfortunately the SetWindowsHookEx thingy seems to require a separatedll because it will be loaded into each process address space.

COMPILING

To compile, dwm-win32 requires:

Source code for dwm-win32 is written in C and useszig cc to compile C to native code.You can install the Zig compiler by usingscoop asscoop install zig.

build.cmd
  • Remove-DNDEBUG and-O2 -s frombuild.cmd to build debug version.
  • Update version in build.cmd before release

TODO

  • support luajit
  • show/hide child windows upon tag switch, in theory this should alreadywork but in practice we need to tweak ismanageable() so that itrecognises child windows but doesn't generate false positives.
  • fullscreen windows, mstsc for example doesn't resize properly whenmaximized.
  • Screensaver?
  • system dialogs from desktop window
  • urgent flag?
  • window border isn't yet perfect
  • status text via stdin or a separate tool
  • crash handler which makes all windows visible restores borders etc
  • use BeginDeferWindowPos, DeferWindowPos and EndDeferWindowPos
  • optimize for speed
  • code cleanups all over the place
  • multi head support?

[ - introduce a CBTProc function and register it withSetWindowsHookEx(WH_CBT, ...) to handle window events instead of thecurrent mechanism in WndProc which is based on the shellhookid andWH_SHELL because this only works for toplevel windows. See also the"How it works" section. ]

About

dwm port of tiling manager to Window

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp