Skip to content
Search

XMonad.Hooks.ManageDocks

lastmod 2021-02-21created 2020-09-272 edits

This module provides tools to automatically manage dock-type programs, such as gnome-panel, kicker, dzen, and xmobar.

Usage

To use this module, add the following import to ~/.xmonad/xmonad.hs:

import XMonad.Hooks.ManageDocks

Wrap your xmonad config with a call to docks, like so:

main = xmonad $ docks def

Then add the avoidStruts or avoidStrutsOn layout modifier to your layout to prevent windows from overlapping these windows.

layoutHook = avoidStruts (tall ||| mirror tall ||| ...)
                  where  tall = Tall 1 (3/100) (1/2)

AvoidStruts also supports toggling the dock gaps. Add a key binding similar to:

,((modm, xK_b     ), sendMessage ToggleStruts)

If you have multiple docks, you can toggle their gaps individually. For example, to toggle only the top gap:

,((modm .|. controlMask, xK_t), sendMessage $ ToggleStrut U)

Similarly, you can use Direction2D, L, and R to individually toggle the gaps on the bottom, left, or right.

If you want to avoid some docks and cover others by default, you can use avoidStrutsOn to manually specify the sides of the screen on which docks should be avoided. For example:

layoutHook = avoidStrutsOn [U,L] (tall ||| mirror tall ||| ...)

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending.

See also

Favorite site

author Zer0 sitemap