Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1738537
  • 博文数量: 410
  • 博客积分: 9563
  • 博客等级: 中将
  • 技术积分: 4517
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-03 19:59
个人简介

文章分类

全部博文(410)

文章存档

2017年(6)

2016年(1)

2015年(3)

2014年(4)

2013年(32)

2012年(45)

2011年(179)

2010年(140)

分类: LINUX

2010-09-06 10:25:02

默认情况下,在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

 


效果图
阅读(1261) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~