Git Product home page Git Product logo

dwm-win32's Introduction

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

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 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.

Usage

Keyboard

dwm uses a modifier key by default this is ALT.

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 writing 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 + 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, 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.

How it works

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 windows including toolbars etc. which we would have to filter out.

Unfortunately the SetWindowsHookEx thingy seems to require a separate dll 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 uses zig cc to compile C to native code. You can install the Zig compiler by using scoop as scoop install zig.

build.cmd
  • Remove -DNDEBUG and -O2 -s from build.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 already work but in practice we need to tweak ismanageable() so that it recognises child windows but doesn't generate false positives.
  • fullscreen windows, mstsc for example doesn't resize properly when maximized.
  • 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 with SetWindowsHookEx(WH_CBT, ...) to handle window events instead of the current mechanism in WndProc which is based on the shellhookid and WH_SHELL because this only works for toplevel windows. See also the "How it works" section. ]

dwm-win32's People

Contributors

martanne avatar nir9 avatar pascalsenn avatar prabirshrestha avatar rainsia avatar renovate[bot] avatar unknownrori avatar yusuf007r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dwm-win32's Issues

Multi Monitor Support

I am currently using bug.n but kind of want to break free of a autohtokey dependency. What bug.n solved really nicely is mutlimonitor. having the ability to change displayed tags (like left on 1 right on 3) is super helpful.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • goto-bus-stop/setup-zig v2
  • softprops/action-gh-release v2
gradle
extern/sdl2/android-project/gradle.properties
extern/sdl2/android-project/settings.gradle
extern/sdl2/android-project/build.gradle
  • com.android.tools.build:gradle 3.2.0
extern/sdl2/android-project/app/build.gradle
gradle-wrapper
extern/sdl2/android-project/gradle/wrapper/gradle-wrapper.properties
  • gradle 4.10.2

  • Check this box to trigger a request for Renovate to run again on this repository

config file

I can't seem to find any config related docs or if the app even have a config file.
It would be nice to have a config file where one can change:

I listed them from high to low in terms of priority.

Set left Super key as modifier

Hello! First of all, awesome project. Probably, the most dificult part when using windows for me it's not having the workflow key's i'm used on Linux.

That being said, I was wondering if it's possible to use the left Super key as the modifier. Already tried to set the MODIFIER macro to the 1-5 positions and wasn't able to achieve that.

It's something not possible by now or can I be missing something?

Thanks in advance.

Rearrange Windows

At the moment if have only found zoom bug.n has a really nice feature where you can rearrange windows and move them from one sport to another:

Config_hotkey=#+Down::View_shuffleWindow(0, +1)
Move the active window to the next position in the window list of the view.

Config_hotkey=#+Up::View_shuffleWindow(0, -1)
Move the active window to the previous position in the window list of the view.

dwm failed to start (0xc000007b)

Windows Version

windows 10 64-bit.

dwm version

v0.0.16 (latest)

after installing the missing .dll files (ucrtbased.dll and vcruntime140d.dll) to both C:\Windows\System32 and C:\Windows\SysWOW64,
running dwm outputs:

image
[ the application failed to start correctly (0xc000007b). click on OK to close it. ]
reinstalling .NET35 and enabling didn't fix the issue.

Microsoft Word 2016 error

Word 2016 sometimes hangs on exit, leaving a blank ghost window & then crashing all open documents. Not sure why this is, but it's rough!

Thanks so much for porting dwm to Windows, even WITH the crashes this bug is causing having no-nonsense tiling makes my work much more bearable <3

MOD_WIN as mod key

on my setup the ALT key is already used a lot for in process actions like e.g. changing tabs. I would love to use the Windows key but apparently this is not that easy:

Value Meaning
MOD_WIN0x0008 Either WINDOWS key was held down. These keys are labeled with the Windows logo. Hotkeys that involve the Windows key are reserved for use by the operating system.

https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-hotkey

There are work arounds but they seem all to not really work.

https://stackoverflow.com/questions/20082160/how-can-i-capture-a-global-win-hotkey

I've seen microsoft/powertoys doing this before in their keyboard manager:
https://github.com/microsoft/PowerToys/blob/1de93be0f0ca5ccb033397fa9a61f11ea8627a62/src/modules/keyboardmanager/common/Shortcut.cpp#L8

error in the readme.me

in the readme file it says the hotkey for togglebar is "mod+b' but in the config file is "mod+mod_control+b"
so if you press alt+b it doesn't work.
{ MODKEY|MOD_CONTROL, 'B', togglebar, {0} },

auto hide/show the bar when a window goes fullscreen

Awesome project, I am glad I found it.

One thing that bother me is going into fullscreen for a video doesn't hide the bar which is kinda annoying since I have to manually hide/show it using the shortcut every time.

Pertag patch

Would be great if the pertag patch can be implemented, this would allow tags to be set at different layouts at the same time.

Ie. Tag 1. Tiles and Tag 2. Monocle

What's the future of this project?

Hi :D, first of all. Thank you very much for your work, this is a great project. I'm moving from linux and as a i3/dwm user Windows default interface seems a little off :/. I found this project and it's working great. If you don't mind I would like to know what is the plans for the future of the project :D. In addition, can you answer 2 questions please?

The project supports multiple screens?
The project have a configuration file? For custom configs?

Thank you very much for you time :D

Brave and chrome stop redrawing after switching to another tag

great project, would love to use it everyday, but this issue bothers me a lot
whenever i have brave on one tag, if i switch to another tag with a window in it, and turn back, the browser window (especifically the part where the html is draw), stops being draw
if i interact with keypresses or with the mouse the html reacts to these events, however nothing new is draw to the screen
however if i drag or resize the window, everything is drawn again, and the effects of my interactions is shown
i tested with brave and chrome and those browsers have the issues mentioned above
firefox has none of theses issues at all, it works perfectly
microsoft edge has trouble being moved around tags, i couldn't get it to work for testing

i tried messing around with the win32 api calls a bit to see if i can get it to work, but to no avail

join efforts with HashTWM by ZaneA?

hi! greetings of the day.

  • i saw that this is also a dwm port for windows,

  • and thought to bring it in your notice that another port of dwm for windows exist
    here: https://github.com/ZaneA/HashTWM

  • both of these seem to have same licence: MIT/X Consortium License

  • so, maybe you would like to join efforts with them?

How much gap is gapless?

How gapless is gapless?
This is how it looks for me currently:
image

Btw. Thank you so much for this work. Finally something fitting my tiling needs on windows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.