mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Now that the user configs are on the website, it is time to deprecate them. At the same time deprecated X.C.Monad, which hasn't been updated since 2008 and X.C.Prime, which has confused users quite recently, thinking it to be a better starting place. Fixes: https://github.com/xmonad/xmonad-contrib/issues/677 Fixes: https://github.com/xmonad/xmonad-contrib/issues/595 Related: https://github.com/xmonad/xmonad-web/pull/49
81 lines
2.9 KiB
Haskell
Executable File
81 lines
2.9 KiB
Haskell
Executable File
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans #-}
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
---------------------------------------------------------------------
|
|
-- |
|
|
-- A mostly striped down configuration that demonstrates spawnOnOnce
|
|
--
|
|
---------------------------------------------------------------------
|
|
module XMonad.Config.Saegesser {-# DEPRECATED "This module contains a personal configuration, to be removed from xmonad-contrib. If you use this module, please copy the relevant parts to your configuration or obtain a copy of it on https://xmonad.org/configurations.html and include it as a local module." #-} where
|
|
|
|
import System.IO
|
|
|
|
import XMonad
|
|
|
|
import XMonad.Hooks.DynamicLog
|
|
import XMonad.Hooks.ManageDocks
|
|
import XMonad.Hooks.ManageHelpers
|
|
import XMonad.Hooks.UrgencyHook
|
|
import XMonad.Hooks.FadeInactive
|
|
|
|
import XMonad.Layout.NoBorders
|
|
import XMonad.Layout.ResizableTile
|
|
import XMonad.Layout.Mosaic
|
|
|
|
import XMonad.Util.Run
|
|
import XMonad.Util.Cursor
|
|
import XMonad.Util.NamedScratchpad
|
|
import XMonad.Util.Scratchpad
|
|
import XMonad.Util.SpawnOnce
|
|
|
|
import XMonad.Actions.CopyWindow
|
|
import XMonad.Actions.SpawnOn
|
|
|
|
import qualified XMonad.StackSet as W
|
|
|
|
main = do
|
|
myStatusBarPipe <- spawnPipe "xmobar"
|
|
xmonad $ docks $ withUrgencyHook NoUrgencyHook $ def
|
|
{ terminal = "xterm"
|
|
, workspaces = myWorkspaces
|
|
, layoutHook = myLayoutHook
|
|
, manageHook = myManageHook <+> manageSpawn
|
|
, startupHook = myStartupHook
|
|
, logHook = myLogHook myStatusBarPipe
|
|
, focusFollowsMouse = False
|
|
}
|
|
|
|
myManageHook = composeOne
|
|
[ isDialog -?> doFloat
|
|
, className =? "trayer" -?> doIgnore
|
|
, className =? "Skype" -?> doShift "chat"
|
|
, appName =? "libreoffice" -?> doShift "office"
|
|
, return True -?> doF W.swapDown
|
|
]
|
|
|
|
myWorkspaces = [ "web", "emacs", "chat", "vm", "office", "media", "xterms", "8", "9", "0"]
|
|
|
|
myStartupHook = do
|
|
setDefaultCursor xC_left_ptr
|
|
spawnOnOnce "emacs" "emacs"
|
|
spawnNOnOnce 4 "xterms" "xterm"
|
|
|
|
myLayoutHook = smartBorders $ avoidStruts standardLayouts
|
|
where standardLayouts = tiled ||| mosaic 2 [3,2] ||| Mirror tiled ||| Full
|
|
tiled = ResizableTall nmaster delta ratio []
|
|
nmaster = 1
|
|
delta = 0.03
|
|
ratio = 0.6
|
|
|
|
myLogHook p = do
|
|
copies <- wsContainingCopies
|
|
let check ws | ws == "NSP" = "" -- Hide the scratchpad workspace
|
|
| ws `elem` copies = xmobarColor "red" "black" ws -- Workspaces with copied windows are red on black
|
|
| otherwise = ws
|
|
dynamicLogWithPP $ xmobarPP { ppHidden = check
|
|
, ppOutput = hPutStrLn p
|
|
, ppUrgent = xmobarColor "white" "red"
|
|
, ppTitle = xmobarColor "green" "" . shorten 180
|
|
}
|
|
fadeInactiveLogHook 0.6
|