Reindent README to make github happy
[dwm-win32.git] / README.txt
blob6457001cf8018d5d255fe8917fc30bffe2a6177b
1 dwm-win32 is a port of the well known X11 window manager dwm to Microsoft\r
2 Windows.\r
3 \r
4 Description\r
5 ===========\r
6 \r
7 dwm is a dynamic window manager for Microsoft Windows. It manages windows\r
8 in tiled, monocle and floating layouts. Either layout can be applied\r
9 dynamically, optimising the environment for the application in use and\r
10 the task performed.\r
12 In tiled layouts windows are managed in a master and stacking area. The\r
13 master area contains the window which currently needs most attention,\r
14 whereas the stacking area contains all other windows. In monocle layout\r
15 all windows are maximised to the screen size. In floating layout windows\r
16 can be resized and moved freely. Dialog windows are always managed\r
17 floating, regardless of the layout applied.\r
19 Windows are grouped by tags. Each window can be tagged with one or\r
20 multiple tags. Selecting certain tags displays all windows with these\r
21 tags.\r
23 dwm contains a small status bar which displays all available tags, the \r
24 layout and the title of the focused window. A floating window is indicated\r
25 with an empty square and a maximised floating window is indicated with a\r
26 filled square before the windows title. The selected tags are indicated\r
27 with a different color. The tags of the focused window are indicated with\r
28 a filled square in the top left corner.  The tags which are applied to\r
29 one or more windows are indicated with an empty square in the top left\r
30 corner.\r
32 dwm draws a small border around windows to indicate the focus state.\r
34 Usage\r
35 =====\r
37  Keyboard\r
39   dwm uses a modifier key by default this is CTRL + ALT.\r
41   MOD + Shift + Return\r
42    - start cmd.exe.\r
44   MOD + b\r
45    - Toggles bar on and off.\r
47   MOD + e\r
48    - Toogles windows explorer and taskbar on and off.\r
50   MOD + t\r
51    - Sets tiled layout.\r
53   MOD + f\r
54    - Sets floating layout.\r
56   MOD + m\r
57    - Sets monocle layout.\r
59   MOD + space\r
60    - Toggles between current and previous layout.\r
62   MOD + j\r
63    - Focus next window.\r
65   MOD + k\r
66    - Focus previous window.\r
68   MOD + h\r
69    - Decrease master area size.\r
71   MOD + l\r
72    - Increase master area size.\r
74   MOD + Return\r
75    - Zooms/cycles focused window to/from master area (tiled layouts only).\r
77   MOD + Shift + c\r
78    - Close focused window.\r
80   MOD + Shift + Space\r
81    - Toggle focused window between tiled and floating state.\r
83   MOD + n\r
84    - Toggles border of currently focused window.\r
86   Mod + i\r
87    - Display classname of currently focused window, useful for wiriting\r
88      tagging rules.\r
90   MOD + Tab\r
91    - Toggles to the previously selected tags.\r
93   MOD + Shift + [1..n]\r
94    - Apply nth tag to focused window.\r
96   MOD + Shift + 0\r
97    - Apply all tags to focused window.\r
99   MOD + Control + Shift + [1..n]\r
100    - Add/remove nth tag to/from focused window.\r
102   MOD + [1..n]\r
103    - View all windows with nth tag.\r
105   MOD + 0\r
106    - View all windows with any tag.\r
108   MOD + Control + [1..n]\r
109    - Add/remove all windows with nth tag to/from the view.\r
111   MOD + q\r
112    - Quit dwm.\r
115  Mouse\r
117   Left Button\r
118     - click on a tag label to display all windows with that tag, click\r
119       on the layout label toggles between tiled and floating layout.\r
121   Right Button\r
122     - click on a tag label adds/removes all windows with that tag to/from\r
123       the view.\r
125   Alt + Left Button\r
126     - click on a tag label applies that tag to the focused window.\r
128   Alt + Right Button\r
129     - click on a tag label adds/removes that tag to/from the focused window.\r
132 How it works\r
133 ============\r
135 A ShellHook is registered which is notified upon window creation and\r
136 destruction, however it is important to know that this only works for\r
137 unowned top level windows. This means we will not get notified when child\r
138 windows are created/destroyed. Therefore we scan the currently active top\r
139 level window upon activation to collect all associated child windows. \r
140 This information is for example used to tag all windows and not just \r
141 the toplevel one when tag changes occur.\r
143 This is all kind of messy and we might miss some child windows in certain\r
144 situations. A better approach would probably be to introduce a CBTProc \r
145 function and register it with SetWindowsHookEx(WH_CBT, ...) with this we\r
146 would get notified by all and every windows including toolbars etc. \r
147 which we would have to filter out.\r
149 Unfortunately the SetWindowsHookEx thingy seems to require a separate\r
150 dll because it will be loaded into each process address space.\r
152 TODO\r
153 ====\r
155  - show/hide child windows upon tag switch, in theory this should already\r
156    work but in practice we need to tweak ismanageable() so that it\r
157    recognises child windows but doesn't generate false positives.\r
158  - fullscreen windows, mstsc for example doesn't resize properly when\r
159    maximized.\r
160  - Screensaver?\r
161  - system dialogs from desktop window\r
162  - urgent flag?\r
163  - window border isn't yet perfect\r
164  - status text via stdin or a separate tool\r
165  - crash handler which makes all windows visible restores borders etc\r
166  - use BeginDeferWindowPos, DeferWindowPos and EndDeferWindowPos\r
167  - optimize for speed\r
168  - code cleanups all over the place\r
169  - multi head support?\r
171  [ - introduce a CBTProc function and register it with\r
172      SetWindowsHookEx(WH_CBT, ...) to handle window events instead of the\r
173      current mechanism in WndProc which is based on the shellhookid and \r
174      WH_SHELL because this only works for toplevel windows. See also the\r
175      "How it works" section. ]\r