summary refs log tree commit diff stats
path: root/tag-xmonad/xmonad/xmonad.hs
blob: 56c2b00e03f45c5fbb75fee1ff08100b431f64fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import System.IO
import Data.List(isPrefixOf)

main :: IO ()
main = do
  xmproc <-spawnPipe "/usr/bin/xmobar /home/alan/.xmobarrc"
  xmonad $ defaultConfig {
    manageHook = composeOne [
       isFullscreen -?> doFullFloat,
       fmap ("mpv" `isPrefixOf`) title -?> doFullFloat
       ] <+> manageDocks <+> manageHook defaultConfig,
    layoutHook = smartBorders . avoidStruts  $  layoutHook defaultConfig,
    logHook = dynamicLogWithPP xmobarPP {
      ppOutput = hPutStrLn xmproc,
      ppTitle  = xmobarColor "#859900" "" . shorten 200,
      ppCurrent = xmobarColor "#b58900" "". wrap "[" "]",
      ppHiddenNoWindows = xmobarColor "#93a1a1" "",
      ppUrgent  = xmobarColor "#dc322f" "#b58900"
    },
    terminal = "urxvt",
    modMask = mod4Mask,
    handleEventHook = fullscreenEventHook
  }