mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Essentially, whenever the tutorial actually has decent material on the subject matter. The replacement is roughly done as follows: - logHook → tutorial - keybindings → tutorial, as this is thoroughly covered - manageHook → tutorial + X.D.Extending, as the manageHook stuff the tutorial talks about is a little bit of an afterthought. - X.D.Extending (on its own) → tutorial + X.D.Extending - layoutHook → tutorial + X.D.Extending, as the tutorial, while talking about layouts, doesn't necessarily have a huge focus there. - mouse bindings → leave this alone, as the tutorial does not at all talk about them.
51 lines
1.7 KiB
Haskell
51 lines
1.7 KiB
Haskell
-----------------------------------------------------------------------------
|
|
-- |
|
|
-- Module : XMonad.Actions.Promote
|
|
-- Description : Alternate promote function for xmonad.
|
|
-- Copyright : (c) Miikka Koskinen 2007
|
|
-- License : BSD3-style (see LICENSE)
|
|
--
|
|
-- Maintainer : xmonad@s001.ethrael.com
|
|
-- Stability : unstable
|
|
-- Portability : unportable
|
|
--
|
|
-- Alternate promote function for xmonad.
|
|
--
|
|
-- Moves the focused window to the master pane. All other windows
|
|
-- retain their order. If focus is in the master, swap it with the
|
|
-- next window in the stack. Focus stays in the master.
|
|
--
|
|
-----------------------------------------------------------------------------
|
|
|
|
module XMonad.Actions.Promote (
|
|
-- * Usage
|
|
-- $usage
|
|
promote
|
|
) where
|
|
|
|
import XMonad
|
|
import XMonad.StackSet
|
|
|
|
-- $usage
|
|
--
|
|
-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
|
|
--
|
|
-- > import XMonad.Actions.Promote
|
|
--
|
|
-- then add a keybinding or substitute 'promote' in place of swapMaster:
|
|
--
|
|
-- > , ((modm, xK_Return), promote)
|
|
--
|
|
-- For detailed instructions on editing your key bindings, see
|
|
-- <https://xmonad.org/TUTORIAL.html#customizing-xmonad the tutorial>.
|
|
|
|
-- | Move the focused window to the master pane. All other windows
|
|
-- retain their order. If focus is in the master, swap it with the
|
|
-- next windo in the stack. Focus stays in the master.
|
|
promote :: X ()
|
|
promote = windows $ modify' $
|
|
\c -> case c of
|
|
Stack _ [] [] -> c
|
|
Stack t [] (x:rs) -> Stack x [] (t:rs)
|
|
Stack t ls rs -> Stack t [] (reverse ls ++ rs)
|