mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
Add XMonadContrib.DeManage: a module for unmanaging windows (like panels)
This commit is contained in:
52
DeManage.hs
Normal file
52
DeManage.hs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{-# OPTIONS -fglasgow-exts #-}
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
-- |
|
||||||
|
-- Module : XMonadContrib.DeManage
|
||||||
|
-- Copyright : (c) Spencer Janssen <sjanssen@cse.unl.edu>
|
||||||
|
-- License : BSD3-style (see LICENSE)
|
||||||
|
--
|
||||||
|
-- Maintainer : Spencer Janssen <sjanssen@cse.unl.edu>
|
||||||
|
-- Stability : unstable
|
||||||
|
-- Portability : unportable
|
||||||
|
--
|
||||||
|
-- This module provides a method to cease management of a window, without
|
||||||
|
-- unmapping it. This is especially useful for applications like kicker and
|
||||||
|
-- gnome-panel.
|
||||||
|
--
|
||||||
|
-- To make a panel display correctly with xmonad:
|
||||||
|
--
|
||||||
|
-- * Determine the pixel size of the panel, add that value to defaultGaps
|
||||||
|
-- * Launch the panel
|
||||||
|
-- * Give the panel window focus, then press mod-d
|
||||||
|
-- * Convince the panel to move/resize to the correct location. Changing the
|
||||||
|
-- panel's position setting several times seems to work.
|
||||||
|
--
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
module XMonadContrib.DeManage (
|
||||||
|
-- * Usage
|
||||||
|
-- $usage
|
||||||
|
demanage
|
||||||
|
) where
|
||||||
|
|
||||||
|
import qualified StackSet as W
|
||||||
|
import XMonad
|
||||||
|
import Operations
|
||||||
|
import Control.Monad.State
|
||||||
|
|
||||||
|
-- $usage
|
||||||
|
-- To use demanage, add this import:
|
||||||
|
--
|
||||||
|
-- > import XMonadContrib.GreedyView
|
||||||
|
--
|
||||||
|
-- And add a keybinding to it:
|
||||||
|
--
|
||||||
|
-- > , ((modMask, xK_d ), demanage)
|
||||||
|
--
|
||||||
|
|
||||||
|
-- | Stop managing the current focused window.
|
||||||
|
demanage :: X ()
|
||||||
|
demanage = do
|
||||||
|
ws <- gets windowset
|
||||||
|
modify (\s -> s { windowset = maybe ws (flip W.delete ws) (W.peek ws) })
|
||||||
|
refresh
|
@@ -27,6 +27,7 @@ import XMonadContrib.Circle ()
|
|||||||
import XMonadContrib.Combo ()
|
import XMonadContrib.Combo ()
|
||||||
import XMonadContrib.CopyWindow ()
|
import XMonadContrib.CopyWindow ()
|
||||||
import XMonadContrib.Decoration ()
|
import XMonadContrib.Decoration ()
|
||||||
|
import XMonadContrib.DeManage ()
|
||||||
import XMonadContrib.Dmenu ()
|
import XMonadContrib.Dmenu ()
|
||||||
import XMonadContrib.DwmPromote ()
|
import XMonadContrib.DwmPromote ()
|
||||||
import XMonadContrib.DynamicLog ()
|
import XMonadContrib.DynamicLog ()
|
||||||
|
Reference in New Issue
Block a user