mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-13 11:16:01 -07:00
scripts
tests
Accordion.hs
Anneal.hs
Circle.hs
Combo.hs
Commands.hs
CopyWindow.hs
DeManage.hs
Decoration.hs
DirectoryPrompt.hs
Dmenu.hs
DragPane.hs
DwmPromote.hs
DynamicLog.hs
DynamicWorkspaces.hs
Dzen.hs
FindEmptyWorkspace.hs
FlexibleManipulate.hs
FlexibleResize.hs
FocusNth.hs
HintedTile.hs
LICENSE
LayoutHelpers.hs
LayoutHints.hs
LayoutHooks.hs
LayoutScreens.hs
MagicFocus.hs
Magnifier.hs
MetaModule.hs
Mosaic.hs
NamedWindows.hs
NoBorders.hs
README
Roledex.hs
RotSlaves.hs
RotView.hs
RunInXTerm.hs
ShellPrompt.hs
SimpleDate.hs
SimpleStacking.hs
SinkAll.hs
Spiral.hs
Square.hs
SshPrompt.hs
Submap.hs
SwitchTrans.hs
Tabbed.hs
ThreeColumns.hs
TwoPane.hs
ViewPrev.hs
Warp.hs
WorkspaceDir.hs
XMonadPrompt.hs
XPrompt.hs
57 lines
1.7 KiB
Haskell
57 lines
1.7 KiB
Haskell
{-# 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
|
|
import Graphics.X11 (Window)
|
|
|
|
-- $usage
|
|
-- To use demanage, add this import:
|
|
--
|
|
-- > import XMonadContrib.DeManage
|
|
--
|
|
-- And add a keybinding to it:
|
|
--
|
|
-- > , ((modMask, xK_d ), withFocused demanage)
|
|
--
|
|
|
|
-- | Stop managing the current focused window.
|
|
demanage :: Window -> X ()
|
|
demanage w = do
|
|
-- use modify to defeat automatic 'unmanage' calls.
|
|
modify (\s -> s { windowset = W.delete w (windowset s) })
|
|
refresh
|