config
unknown
haskell
3 years ago
6.4 kB
3
Indexable
Never
import XMonad import Data.Monoid import System.Exit import qualified XMonad.StackSet as W import qualified Data.Map as M import XMonad.Actions.SpawnOn import XMonad.Layout import XMonad.Layout.NoBorders import XMonad.Layout.Tabbed import XMonad.Layout.Fullscreen import XMonad.Layout.ThreeColumns import XMonad.Layout.Magnifier import XMonad.Hooks.ManageHelpers import XMonad.Layout.CenteredMaster import XMonad.Layout.Grid import XMonad.Layout.Renamed import XMonad.Actions.Submap import XMonad.Util.SpawnOnce import XMonad.Util.Run import XMonad.Util.EZConfig import XMonad.Util.NamedScratchpad --import XMonad.Hooks.EwmhDesktops myLayoutHook = ThreeCol 1 (3/100) (1/2) ||| noBorders(Full) ||| centerMaster Grid myTerminal = "urxvt" myModMask = mod4Mask myManageHook = manageSpawn <+> manageHook def<+> namedScratchpadManageHook myScratchPads myScratchPads :: [NamedScratchpad] myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm ] where spawnTerm = "urxvtc -t scratchpad -hold" findTerm = title =? "scratchpad" manageTerm = customFloating $ W.RationalRect l t w h where h = 0.9 w = 0.9 t = 0.95 -h l = 0.95 -w myStartupHook = do spawnAndDo (doRectFloat (W.RationalRect 0.1 0.1 0.4 0.8) <+> doShift "1") "emacs" spawnOn "2" "emacs" spawnOn "3" "brave" spawnOn "4" "urxvt" -- spawnOn "1" "~/urxvtc.sh -hold -e ~/fun.sh" myKeys :: [(String, X ())] myKeys = \c -> mkKeymap c $ [ ("M-C-r", spawn "xmonad --recompile") -- Recompiles xmonad , ("M-s t", namedScratchpadAction myScratchPads "terminal") ] main :: IO () main = do xmproc <- spawnPipe "xmobar -x 0 ~/.xmobarrc" xmonad $ def {terminal = myTerminal {- , focusFollowsMouse = myFocusFollowsMouse , clickJustFocuses = myClickJustFocuses , borderWidth = myBorderWidth -} , modMask = myModMask {- , workspaces = myWorkspaces , normalBorderColor = myNormalBorderColor , focusedBorderColor = myFocusedBorderColor -} -- key bindings , keys = myKeys -- , mouseBindings = myMouseBindings -- hooks, layouts , layoutHook = myLayoutHook , manageHook = myManageHook {- , handleEventHook = myEventHook , logHook = myLogHook -} , startupHook = myStartupHook } `additionalKeysP` myKeys {- XMonad will use ghc to recompile, because "/home/su/.xmonad/build" does not exist. Error detected while loading xmonad configuration file: /home/su/.xmonad/xmonad.hs xmonad.hs:61:10: error: * Couldn't match expected type: [(String, X ())] with actual type: XConfig l0 -> M.Map (KeyMask, KeySym) (X ()) * The lambda expression `\ c -> mkKeymap c $ ...' has one value argument, but its type `[(String, X ())]' has none In the expression: \ c -> mkKeymap c $ [("M-C-r", spawn "xmonad --recompile"), ("M-s t", namedScratchpadAction myScratchPads "terminal")] In an equation for `myKeys': myKeys = \ c -> mkKeymap c $ [("M-C-r", spawn "xmonad --recompile"), ....] | 61 | myKeys = \c -> mkKeymap c $ | ^^^^^^^^^^^^^^^^^^... xmonad.hs:82:30: error: * Couldn't match expected type: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ()) with actual type: [(String, X ())] * In the `keys' field of a record In the first argument of `additionalKeysP', namely `def {terminal = myTerminal, modMask = myModMask, keys = myKeys, layoutHook = myLayoutHook, manageHook = myManageHook, startupHook = myStartupHook}' In the second argument of `($)', namely `def {terminal = myTerminal, modMask = myModMask, keys = myKeys, layoutHook = myLayoutHook, manageHook = myManageHook, startupHook = myStartupHook} `additionalKeysP` myKeys' | 82 | , keys = myKeys | ^^^^^^ Please check the file for errors. xmonad: xmessage: executeFile: does not exist (No such file or directory) [su@bkkavin ~]$ ./dot#.sh [su@bkkavin ~]$ xmonad --recompile XMonad will use ghc to recompile, because "/home/su/.xmonad/build" does not exist. Error detected while loading xmonad configuration file: /home/su/.xmonad/xmonad.hs xmonad.hs:61:10: error: * Couldn't match expected type: [(String, X ())] with actual type: XConfig l0 -> M.Map (KeyMask, KeySym) (X ()) * The lambda expression `\ c -> mkKeymap c $ ...' has one value argument, but its type `[(String, X ())]' has none In the expression: \ c -> mkKeymap c $ [("M-C-r", spawn "xmonad --recompile"), ("M-s t", namedScratchpadAction myScratchPads "terminal")] In an equation for `myKeys': myKeys = \ c -> mkKeymap c $ [("M-C-r", spawn "xmonad --recompile"), ....] | 61 | myKeys = \c -> mkKeymap c $ | ^^^^^^^^^^^^^^^^^^... xmonad.hs:82:30: error: * Couldn't match expected type: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ()) with actual type: [(String, X ())] * In the `keys' field of a record In the first argument of `additionalKeysP', namely `def {terminal = myTerminal, modMask = myModMask, keys = myKeys, layoutHook = myLayoutHook, manageHook = myManageHook, startupHook = myStartupHook}' In the second argument of `($)', namely `def {terminal = myTerminal, modMask = myModMask, keys = myKeys, layoutHook = myLayoutHook, manageHook = myManageHook, startupHook = myStartupHook} `additionalKeysP` myKeys' | 82 | , keys = myKeys | ^^^^^^ Please check the file for errors. xmonad: xmessage: executeFile: does not exist (No such file or directory) -}