Zweihander-Main / zwei_dwm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zwei's dwm Fork

dwm for those who like odd monitor configurations

Let's say that you had the bad taste to create a monitor configuration as follows:

flowchart LR
    top[1440x900]
    top --- middle
    subgraph middlerow[&nbsp]
        style middlerow fill:none,stroke-width:0px
        direction LR
        left[1200\nx\n1920] --- middle[1920 x 1200] --- right[1920 x 1200]
    end

Under normal circumstances, you'll have to furiously toggle , and . to get to the right monitor. However, if you're already in such a predicament, it's highly likely you have the good fortune to possess a numpad. Wouldn't it be great if you could map your monitor to something along the following lines:

flowchart LR
    top[8]
    top --- middle
    subgraph middlerow[&nbsp]
        style middlerow fill:none,stroke-width:0px
        direction LR
        left[4] --- middle[5] --- right[6]
    end

Well now you can!

Own Patches

All patches can be found in the ./patches folder.

focustagtomon

Adds in focusmonnum and tagmonnum methods which are the equivalent of
focusmon and tagmon but accept an interger monitor number to use rather
than just a direction.

Can be called in config as follows:
MODKEY, XK_KP_Left,  focusmonnum, {.i = 2 }
MODKEY, XK_KP_Begin, tagmonnum,   {.i = 3 }

Very useful for multi-monitor setups with strange configurations such as
4 monitors laid out 3 in one row and one on top in the middle.

centermousetomon

Requires above focustagtomon.

Call with monitor number to move mouse to center of that monitor.

Ex:
{ MODKEY|ControlMask, XK_KP_Left,  centermousetomonnum, {.i = 2 } },

Useful in combination with keynav to allow for keynav multi-monitor moving. Example in keynavrc:

KP_Begin sh "sleep 0.1; xdotool key 'Super+Control+KP_Begin' 'Super+semicolon'", end
KP_Up sh "sleep 0.1; xdotool key 'Super+Control+KP_Up' 'Super+semicolon'", end
KP_Left sh "sleep 0.1; xdotool key 'Super+Control+KP_Left' 'Super+semicolon'", end
KP_Right sh "sleep 0.1; xdotool key 'Super+Control+KP_Right' 'Super+semicolon'", end

Use the -plus version to add centermousetomon which uses direction instead of monitor number.

Other Patches

Available for Hire

I'm available for freelance, contracts, and consulting both remotely and in the Hudson Valley, NY (USA) area. Some more about me and what I can do for you.

Feel free to drop me a message at:

hi [a+] zweisolutions {●} com

About

License:MIT License


Languages

Language:C 92.3%Language:Roff 5.5%Language:Makefile 2.3%