====== dwm - dynamic window manager ====== [[http://dwm.suckless.org/|dwm]] is a dynamic window manager made by [[http://suckless.org/|suckless]] for the X11 windowing system that supports organization of windows in tiled, floating, and monocle layouts. Windows are grouped together on tags where they can be reorganized and modified.\\ \\ {{:howtos:window_managers:dwm8-25-21.png?nolink&412 |}}\\ //minimally patched build of dwm6.2//. ===== dwm Installation ===== You can install dwm from [[https://slackbuilds.org/repository/14.2/desktop/dwm/|SlackBuilds]]. Alternatively you may clone the source with ''git clone https://git.suckless.org/dwm'' and build via the instructions in the README text file. ===== dwm Dependencies ===== The dependencies required for building dwm version 6.2 are included in a base slackware64-current install. You may need to choose an older version of dwm if using versions of Slackware 14.2 or less. * X11 * FreeType ===== Starting dwm ===== The SlackBuilds dwm will create a xinit script for you. If you build dwm yourself you will need to create a file named //xinitrc.dwm// in the // /etc/X11/xinit/ // directory. A typical xinitrc for dwm might look as such: # /etc/X11/xinit/xinitrc.dwm # set wallpaper or resolution # dunst & # start notification daemon # dwmblocks & # start statusbar program # xcompmgr -CFn & # start composito exec dwm # start dwm With that in place run **xwmconfig** in your terminal to switch to your configuration file. ===== Configuration ===== dwm configuration is done through the C source code instead of a runtime configuration file. The //config.h// file contains all of the configuration options. You will need to run **make** and **sudo make install** in your source directory after each change. ===== Patching ===== Patches(submitted user modifications that add useful features) are available directly from the suckless website: [[https://dwm.suckless.org/patches/|dwm Patches]]. You can find detailed instructions on patching here: [[https://suckless.org/hacking/|How to Apply Patches]]. If you experience difficulty applying patches you may want to switch to the release tarball that can be found on the [[https://dwm.suckless.org/|dwm Homepage]] under //Download//. ===== Using dwm ===== Using dwm is fairly simple. Try pressing Alt + Shift + Enter to open a terminal emulator. By default this will be set to st ([[http://st.suckless.org/|simple terminal]]), but you can symbolically link your terminal emulator of choice to st. Now open a few more terminal windows. You should notice the tiling effect. To change focus simply hover your mouse cursor over another window or press Alt + j/k.\\ \\ To change the //master// window in the //tiled// layout change focus to it and press Alt + Enter. Press Alt + h/l to shrink/grow the master window. To reorganize the //tiled// layout press Alt + d/i.\\ Try switch between //floating// Alt + f and //monocle// Alt + m mode. Use Alt + Left Click(while holding) to move windows around and Alt + Right Click(also while holding) to resize windows. \\ Now switch back to tiled Alt + t and press Alt + Shift + Space on any floating windows to return them to tiled mode. ===== Key Shortcuts ===== ==== Common ==== Alt + Left Mouse Button move clicked window\\ Alt + Middle Mouse Button switch clicked window between floating and tiled layout\\ Alt + Right Mouse Button resize clicked window\\ Alt + Shift + Enter launch st(suckless terminal)\\ Alt + b toggle top bar\\ Alt + h/l shrink or grow the master window\\ Alt + Shift + c close the currently focused window\\ Alt + Shift + q quit dwm cleanly\\ ==== Layouts ==== Alt + t switch to tiled mode\\ Alt + f switch to floating mode\\ Alt + m switch to monocle mode\\ Alt + space switch between the two most currently used layouts\\ Alt + Shift + space toggle focused window between tiled and floating mode\\ Alt + Enter set currently focused window as master\\ Alt + i/d shift windows through stack area in tiled mode\\ ==== Tags ==== Alt + j/k cycle focus to different windows on the current tag\\ Alt + 1/9 change to window tags 1 through 9\\ Alt + Shift + 1/9 switch currently focused window to tags 1 through 9\\ Ctrl + Shift + 1/9 show windows on tag 1 through 9 on the currently focused tag\\ Alt + 0 view windows from all tags at once\\ Alt + Tab cycle through the most recent tags\\ Right Click when right clicked windows from a tag will be visible\\ ==== Multiple Screens ==== Alt + ./, switch focus between screens\\ Alt + Shift + ./, switch window to between screens\\ ===== Program Menu ===== [[http://tools.suckless.org/dmenu/|dmenu]] is the preferred program launcher/menu for dwm. It spawns a simple, intractable search bar that you can use to search for a program installed on your system. If you also installed dmenu you can press Alt + P and type the program name or use the arrow keys then press enter. This will execute the selected program. You may also press the escape key to cancel the search. \\ To install dmenu visit [[https://tools.suckless.org/dmenu/|dmenu - suckless tools]] <= ====== Sources ====== [[https://dwm.suckless.org/|dwm Webpage]]\\ [[https://tools.suckless.org/dmenu/|dmenu Webpage]]\\ [[https://git.suckless.org/dwm/|Browse the Source]]\\ [[https://slackbuilds.org/repository/14.2/desktop/dwm/|SlackBuilds dwm]]\\ [[https://ratfactor.com/dwm|Great Article about Controls]] {{tag>howtos software dwm wm author_cppimmo}}