让xmonad与gimp相兼容

1231阅读 0评论2010-09-06 bailiangcn
分类:LINUX

默认情况下,在xmonad下面gimp窗口会很乱,需要配置layout,我的xomonad.hs改成了这样

import XMonad
import XMonad.Config.Gnome
import XMonad.ManageHook
import qualified XMonad.StackSet as W
import XMonad.Hooks.SetWMName

import XMonad.Config.Desktop

import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Reflect

myWorkspaces = ["1:main","2:web","3:gvim","4:media","5:graph","6:browse","7:dev","8:office","9:other"]

myManageHook = composeAll [ (className =? "Firefox" <&&> resource=? "Download") --> doFloat
        , (className =? "Firefox" <&&> resource =? "DTA") --> doFloat
        , (className =? "Vmplayer" <&&> title=? "new of Windows XP office - VMware Player") --> doF (W.shift "8:office")
        , (className =? "Rhythmbox" ) --> doF (W.shift "4:media")
        , className =? "Gimp-2.6"     --> doShift "5:graph"
        , className =? "MyPaint"     --> doShift "9:other"
        ]

main = do
xmonad $ gnomeConfig
    {
        modMask = mod4Mask
        -- set the mod key to the windows key
        , XMonad.focusFollowsMouse = False
        --不设置鼠标跟随
        ,layoutHook = desktopLayoutModifiers $ gimp
        , workspaces = myWorkspaces
        , manageHook = myManageHook <+> manageHook gnomeConfig
        , startupHook = setWMName "LG3D"
    }
    where
      gimp = withIM (0.11) (Role "gimp-toolbox") $ reflectHoriz $
             withIM (0.15) (Role "gimp-dock") $ reflectHoriz $
             layoutHook gnomeConfig

 


效果图
上一篇:收集了一些gimp资料
下一篇:ubuntu 10.04 安装spark记录