public wiki contents of
git clone git://
Log | Files | Refs (6431B)

      1 tab
      2 ===
      4 Description
      5 -----------
      6 Transforms the monocle layout into a ''tabbed'' layout if more than one window
      7 is present on the monocle view. Navigating from window to window is done by
      8 clicking on the window tabs or using the usual Mod1-j, Mod1-k keys. The tabs
      9 are arranged in a bar on top or at bottom of the screen, which can also be
     10 displayed in the other layouts than monocle. Three display modes can be
     11 selected at run time, auto display, permanent display and no display. In
     12 permanent mode the tab bar is always display independently of the layout, while
     13 in the auto mode it is displayed only with the monocle layout and in presence
     14 of several windows.
     16 This patch can be used as an alternative to the
     17 [tabbed](// tool. It differs in two ways: the
     18 ''tab'' feature is limited to the monocle mode; it works with any application
     19 without requiring to support the XEmbed protocol nor to define in advance the
     20 set of applications to be supported.
     22 Usage
     23 -----
     24 With the default configuration, use the key combination Mod1-w to toggle the
     25 tab bar display. Switch focus to a window with a mouse left-click on its tab or
     26 by using the usual Mod1-j, Mod1-k commands. Usage is also documented in the dwm
     27 man page once the patch is applied.
     29 The selected view (''tag'') is reminded at the right corner of the tab bar.
     30 This feature is mainly meant to be used when the standard status bar is
     31 disabled. In case of a multi-tag view three dots are displayed without
     32 additional details.
     34 Configuration and Installation
     35 ------------------------------
     37 ### Quick installation
     39 #### Using the default configuration file
     41 * Make sure the directory where you build dwm does not contain a config.h file;
     42 * Apply the patch;
     43 * Run make and make install.
     45 The bar is displayed only with monocle layout when the view contains more than
     46 one window. The section "More Options" explains how to add more display
     47 options.
     49 #### Using an existing customised configuration file
     51 * Apply the patch;
     52 * Add the following lines to your config.h dwm configuration file:
     54        /*   Display modes of the tab bar: never shown, always shown, shown only in  */
     55        /*   monocle mode in presence of several windows.                            */
     56        /*   A mode can be disabled by moving it after the showtab_nmodes end marker */
     57        enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always};
     58        static const int showtab            = showtab_auto; /* Default tab bar show mode  */
     59 	       static const Bool toptab            = True;         /* False means bottom tab bar */
     61 If you use the combined pertag+tab patch, include also (adapt the number of '0'
     62 to your `tags` array configuration):
     64 	/* default layout per tags */
     65 	/* The first element is for all-tag view, following i-th element corresponds to */
     66 	/* tags[i]. Layout is referred using the layouts array index.*/
     67 	static int def_layouts[1 + LENGTH(tags)]  = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
     68 * Run make and make install.
     70 The tab bar is displayed only with the monocle layout when the view contains
     71 more than one window. The Mod1-w key and the mouse support are not included in
     72 this configuration. Activation of these options is explained in the next
     73 section.
     75 ### More Options
     77 Pressing the key Mod1-w will cycle over the display modes of the tab bar
     78 described below with the following element added to the `keys` array:
     80 	{ MODKEY, XK_w, tabmode, {-1} }
     82 Selection of a window by a mouse left-click on its tab is enabled by adding the
     83 following element to the `buttons` array:
     85 	{ ClkTabBar, 0, Button1, focuswin, {0} },
     87 An example on how to insert these lines can be found in the default config file
     88 template, config.def.h.
     90 The tab bar includes three display options: always, never, auto. In auto mode,
     91 the tab bar is displayed only with the monocle layout and when the view
     92 contains more than one window. The modes available at run time can be selected
     93 by changing the order of the elements in the `showtab_mode` enum of the
     94 config.h configuration file: the modes before `showtab_nmodes` are enabled, the
     95 ones after are disabled. The default mode is specified in the `showtab`
     96 variable, it must be one of the enabled modes.
     98 Note: keyboard shortcuts to switch to a given display mode can be defined by
     99 using the `tabmode` function like in the definition of the `Mod1-w` key
    100 provided above and passing as argument the display mode (`showtab_never`,
    101 `showtab_always`, `showtab_auto`) instead of -1.
    103 The tab bar can be displayed on top or at bottom of the screen, which is
    104 controlled by the 'toptab' variable. If the tab bar is displayed at bottom,
    105 then it is recommended to set the variable `resizehints` of the config.h file
    106 to False. This setting prevents possible gap between the windows and the tab
    107 bar. You can find more details about this variable and gap between windows in
    108 the dwm FAQ.
    110 Download
    111 --------
    112 * Tab patch alone
    113   * For dwm 6.1: [dwm-6.1-tab-v2b.diff](dwm-6.1-tab-v2b.diff)
    114   * For dwm from the git master branch: [dwm-tab-v2b-20210810-7162335.diff](dwm-tab-v2b-20210810-7162335.diff)
    115   * For dwm 6.2: [dwm-6.2-tab-v2b.diff](dwm-6.2-tab-v2b.diff)
    116   * i3 like tabs for dwm master branch: [dwm-tab-i3like-20211121-a786211.diff](dwm-tab-i3like-20211121-a786211.diff)
    117 * Combined patch of tab and the [pertag](../pertag/) patch from Jan Christoph
    118   Ebersbach.
    119   * Follow the [link](../pertag/) for the description of this patch and the
    120     credits. The possibility to define the default layout per view has been added.
    121   * For dwm 6.1: [dwm-6.1-pertag-tab-v2b.diff](dwm-6.1-pertag-tab-v2b.diff)
    122   * For dwm from the git master branch:
    123     [dwm-tab-v2b-pertab-56a31dc.diff](dwm-tab-v2b-pertab-56a31dc.diff)
    125 Change log
    126 ----------
    127 * Add i3 like tabs that cover whole screen width
    128 * Fixed the standalone tab patch not applying to the current git master.
    129 * **v2b** Fixed in the pertag-tab patch the support for per-tag default layout
    130   specification. No change in the tab only patch.
    131 * **v2a** Typo corrected in the man page. For the combined pertag-tab patch,
    132   specification of a default layout per-tag layout was added in the config.h
    133   configuration file, but it was not taken into account properly. The version v2b
    134   fixed this issue.
    135 * **v2** First public version.
    137 Authors
    138 -------
    139 * Philippe Gras - `<philippe dot gras at free dot fr>`
    140 * Varun Iyer (6.2 ver) - `<>`
    141 * howoz - `<>`