sites

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

index.md (1987B)


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