[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cac ban giup fix voi



file xmonad.hs:
[[email protected] ~]$ cat .xmonad/xmonad.hs 
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
 
myManageHook = composeAll
    [ className =? "Gimp"      --> doFloat
    , className =? "Vncviewer" --> doFloat
    ]
 
main = do
    xmproc <- spawnPipe "/path/to/xmobarbinary /home/jgoerzen/.xmobarrc"
    xmonad $ defaultConfig
        { manageHook = manageDocks <+> myManageHook -- make sure to 
include myManageHook definition from above
                        <+> manageHook defaultConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
        , logHook = dynamicLogWithPP xmobarPP
                        { ppOutput = hPutStrLn xmproc
                        , ppTitle = xmobarColor "green" "" . shorten 50
                        }
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        [ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command 
-lock")
        , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((0, xK_Print), spawn "scrot")
        ]

[[email protected] ~]$ xmonad --recompile
Error detected while loading xmonad configuration file: /home/abbey/.xmonad/xmonad.hs

xmonad.hs:26:72:
    lexical error in string/character literal at character '\n'

Please check the file for errors.

xmonad: xmessage: executeFile: does not exist (No such file or directory)

Tim hoai ma khong thay '\n' o cho nao? Fix loi nay ra sao? Thk.