index.md - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       index.md (4886B)
       ---
            1 Launching
            2 ---------
            3 To launch dwm, ideally you should setup a `~/.xinitrc` with at least `exec
            4 dwm`.
            5 
            6 Introduction
            7 ------------
            8 Using dwm can be done in pure keyboard control or through some extra mouse
            9 handling. See the [config.def.h](//git.suckless.org/dwm/plain/config.def.h) for
           10 what are the default bindings. They are used in this tutorial.
           11 
           12         [Shift]+[Alt]+[Enter] - launch terminal
           13         [Alt]+[p] - dmenu for running programs like the x-www-browser
           14 
           15 By default there are 9 tags.
           16 
           17 Window model
           18 ------------
           19 Launch a few terminals with `[Shift]+[Alt]+[Enter]` and dwm will _tile_ the
           20 windows between the **master** and **stack**. A new terminal appears on the
           21 **master** window. Existing windows are pushed upon a **stack** to the right of
           22 the screen. `[Alt]+[Enter]` toggles windows between master and stack.
           23 
           24         +------+----------------------------------+--------+
           25         | tags | title                            | status |
           26         +------+---------------------+------------+--------+
           27         |                            |                     |
           28         |                            |                     |
           29         |                            |                     |
           30         |                            |                     |
           31         |          master            |        stack        |
           32         |                            |                     |
           33         |                            |                     |
           34         |                            |                     |
           35         |                            |                     |
           36         +----------------------------+---------------------+
           37 
           38 Moving Around
           39 -------------
           40 To **move to another terminal**, press `[Alt]+[j]` or `[Alt]+[k]`.
           41 
           42 To **move a terminal to another _tag_**, hover to the terminal and press
           43 `[Shift]+[Alt]+[2]`. Note! If you are a frequent user of the text editor 'nano'
           44 the key sequence [Shift]+[Alt]+[4] will stomp on nano's softwrap M-$. To get
           45 around this you can unbind nano's M-$ in .nanorc thus:
           46 
           47         unbind M-$ all
           48 
           49 and rebind it to a new sequence thus (here bind it to 'Meta Key' + ';'):
           50 
           51           bind M-; softwrap all
           52 
           53 There are several other nano key sequences that dwm will stomp on - use the above example to fix nano up.
           54 
           55 To **focus on another _tag_**, press `[Alt]+[tag number]`.
           56 
           57 To **change the amount of windows in the master area**, press `[Alt]+[d]` (Decrease) or `[Alt]+[i]` (Increase).
           58 
           59 To **toggle a window between the master and stack area**, press `[Alt]+[Return]`
           60 
           61 As stated in the dwm manpage, you can click tags with the left mouse button and simulating `[Alt]+[tag number]`, but you can also click another tag with the right mouse button in order to bring those windows additionally
           62 into your current focus.
           63 
           64 To **kill a window**, press `[Shift]+[Alt]+[c]`.
           65 
           66 Layouts
           67 -------
           68 By default dwm is in **tiled** layout mode. Ensure it is tiled mode with:
           69 
           70         [Alt]+[t]
           71 
           72 You should also notice the `[]=` symbol between the tag numbers and the title
           73 bar.
           74 
           75 dwm has two further layout modes, **floating** `><>` `[Alt]+[f]` and
           76 **monocle** `[M]` `[Alt]+[m]`. Monocle is good for ensuring a window is kept
           77 maximized and focused. This is useful in web kiosk environments and watching
           78 flash videos. Further layout modes can be included through
           79 [patches](//dwm.suckless.org/patches/).
           80 
           81 Floating
           82 --------
           83 Floating layout will be familiar to Windows users. Use `[Alt]+[right mouse
           84 button]` to resize the floating window and `[Alt]+[left mouse button]` to move
           85 it around. This can also be used to raise a floating window.
           86 
           87 There are several ways to get specific windows into being managed as a floating
           88 window, despite the tiled layout being activated. First there is
           89 `[Alt]+[Shift]+[space]`, which will toggle floating mode on the active window.
           90 Second method is to simply resize the window using `[Alt]+[right mouse button]`.
           91 The last method is to `[Alt]+[middle mouse button]` onto the window, to toggle
           92 it in being floating. These floating windows then can be used to force certain
           93 window sizes, when some application requires this for aesthetics or simply to
           94 being usable.
           95 
           96 If you want to set some type of window to be always floating, look at the
           97 [config.def.h](//git.suckless.org/dwm/plain/config.def.h) and the `rules`
           98 array, where the last but one element defines this behaviour.
           99 
          100 Quitting
          101 --------
          102 To quit dwm cleanly:
          103 
          104         [Shift]+[Alt]+[q]
          105 
          106 Status
          107 ------
          108 By default dwm is showing `dwm-X.X` in its statusbar. This text can be changed
          109 by setting the `WM_NAME` property of the root window.
          110 
          111 Using the tools of X.org, this can be set using:
          112 
          113         % xsetroot -name "Some Text"
          114 
          115 or
          116 
          117         % xprop -root -set WM_NAME "Some Text"
          118 
          119 There are various tools and methods to populate this text with useful
          120 information from your system or services running on your system. A barebone for
          121 doing this in C is [dwmstatus](../status_monitor/). See the
          122 [xinitrc](xinitrc.example) example for how to do it using a script.