sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (1994B)


      1 center first window
      2 ===================
      3 
      4 Description
      5 -----------
      6 
      7 This patch centers window if it is a single window opened.  When any other
      8 window opens, then they tile normally, and if all other windows will close, it
      9 will center again.
     10 
     11 It is usefull for apps like - terminal, if you don't want that it cover all of
     12 the master area, when no other apps are opened.
     13 
     14 Usage
     15 -----
     16 
     17 It can be enabled for any window in config file, by setting `CenterThisWindow`
     18 to `1`:
     19 
     20 	/* class      	instance    title    tags mask     isfloating        CenterThisWindow?     monitor */
     21 	{ "st",         NULL,       NULL,    0,            0,     	     1,		           -1 },
     22 
     23 With one and two clients in master respectively results in:
     24 
     25        +-----------------------------+         +-----------------------------+
     26        |                             |         | +------------+ +----------+ |
     27        |                             |         | |            | |          | |
     28        |                             |         | |            | |          | |
     29        |       +-------------+       |         | |            | |          | |
     30        |       |    Single   |       |         | |  Terminal  | | Terminal | |
     31        |       |   Terminal  |       |         | |  Window 1  | | Window 2 | |
     32        |       |    Window   |       |         | |            | |          | |
     33        |       +-------------+       |         | |            | |          | |
     34        |                             |         | |            | |          | |
     35        |                             |         | |            | |          | |
     36        |                             |         | +------------+ +----------+ |
     37        +-----------------------------+         +-----------------------------+
     38 
     39 Download
     40 --------
     41 * [dwm-centerfirstwindow-6.2.diff](dwm-centerfirstwindow-6.2.diff)
     42 
     43 Authors
     44 -------
     45 * ზურა დავითაშვილი - <zdavitashvili0@gmail.com>
     46 * Part of code is taken from reddit's post by `johannesthyssen`