9610f461c23700dc9434e39bd82a7e283cec7936
Original keychord patch by Hai Nguyen <hhai2105@gmail.com>, updated for dwm 6.4+ grabkeys() by Aaron Zueger <contact@azureorange.xyz>. This revision rebases onto dwm 6.8 and fixes an event-loss bug in the chord wait loop. The wait loop used to discard every event that was not a KeyPress: while (running && !XNextEvent(dpy, &event) && !ran) if(event.type == KeyPress) break; Two consequences, both reproduced on Xephyr: 1. Unrecoverable input freeze. grabbuttons() grabs unfocused clients GrabModeSync/GrabModeSync, so clicking one freezes pointer AND keyboard until the grabbing client calls XAllowEvents. dwm does that in buttonpress() -- but if the ButtonPress is discarded here, buttonpress() never runs. The grab stays frozen forever and the loop can never exit, because a frozen keyboard cannot deliver the KeyPress it is waiting for. Only killing dwm ends it; XSendEvent is discarded by this same loop and XTEST queues behind the frozen device. Repro: press a chord prefix, then click any unfocused client. Observed: XGrabKeyboard -> GrabFrozen, XQueryPointer -> Button1 held. 2. Orphaned windows. A MapRequest arriving mid-chord is dropped, so a window opening during a chord is never managed. DestroyNotify, Expose and ConfigureRequest are lost the same way. Dispatch through handler[] as run() does, breaking on KeyPress before dispatch so keypress() cannot recurse. The `&& !ran` term is dropped: ran is always 0 on entry and nothing in the body can set it.
shift-tools - shifttag, moves the current selected client to the adjacent tag - shifttagclients, moves the current selected client to the adjacent tag that has at least one client else acts as shifttag - shiftview, view adjacent tag - shiftviewclients, view the closes tag that has a client. If none acts as shiftview - shiftboth, shifttag and shiftview. Basically moves the window to the next/prev tag and follows it. - shiftswaptags, its a shift implementation on the swaptags function (see https://github.com/moizifty/DWM-Build/blob/65379c62640788881486401a0d8c79333751b02f/config.h#L48 for more details), which in short 'swaps tags' (swaps all clients with the clients on the adjacent tag). A pretty useful example of this is chosing a tag empty and sending all your clients to that tag. - swapfunction is the 'helper' function for the shiftswaptags. remember that these functions **shift**, which means you can go from tag 1 to 9 or 9 to 1. Also remember that the default argument is 1 and you can change it.
dwm - dynamic window manager
============================
dwm is an extremely fast, small, and dynamic window manager for X.
Requirements
------------
In order to build dwm you need the Xlib header files.
Installation
------------
Edit config.mk to match your local setup (dwm is installed into
the /usr/local namespace by default).
Afterwards enter the following command to build and install dwm (if
necessary as root):
make clean install
Running dwm
-----------
Add the following line to your .xinitrc to start dwm using startx:
exec dwm
In order to connect dwm to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec dwm
(This will start dwm on display :1 of the host foo.bar.)
In order to display status info in the bar, you can do something
like this in your .xinitrc:
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec dwm
Configuration
-------------
The configuration of dwm is done by creating a custom config.h
and (re)compiling the source code.
Description
See https://dwm.suckless.org/ for info and upstream repo. Here is "patched" branch with some patches applied for my use.
7.4 MiB
0 Stars
1 Watchers
0 Forks
Languages
C
91.4%
Roff
6.2%
Makefile
2.4%