Xfce on FreeBSD
My (FreeBSD 8.1 + Xfce 4.6.2)
http://picasaweb.google.com/suganth.ramaswamy/XfceOnFreeBSD#5542165835961543186
My (FreeBSD 8.1 + Xfce 4.6.2)
http://picasaweb.google.com/suganth.ramaswamy/XfceOnFreeBSD#5542165835961543186
import XMonad
import XMonad.Config.Xfce
import System.Exit
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.ManageDocks
import XMonad.Layout.MouseResizableTile
import XMonad.Layout.NoBorders
import qualified XMonad.StackSet as W
import qualified Data.Map as M
main = xmonad $ xfceConfig
{
modMask = mod4Mask,
keys = myKeys,
terminal = myTerminal,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
manageHook = myManageHook <+> manageHook xfceConfig,
layoutHook = myLayout,
borderWidth = myBorderWidth
}
------------------------------------------------------------------------
myTerminal = "xfce4-terminal"
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here. Modified for
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
, ((modm, xK_l ), spawn "xfce4-appfinder")
, ((modm .|. shiftMask, xK_j ), kill)
, ((modm, xK_space ), sendMessage NextLayout)
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
, ((modm, xK_Tab ), windows W.focusDown)
, ((modm, xK_h ), windows W.focusDown)
, ((modm, xK_t ), windows W.focusUp )
, ((modm, xK_m ), windows W.focusMaster )
, ((modm, xK_Return), windows W.swapMaster)
, ((modm .|. shiftMask, xK_h ), windows W.swapDown )
, ((modm .|. shiftMask, xK_t ), windows W.swapUp )
, ((modm, xK_d ), sendMessage Shrink)
, ((modm, xK_n ), sendMessage Expand)
, ((modm, xK_g ), sendMessage ShrinkSlave)
, ((modm, xK_c ), sendMessage ExpandSlave)
, ((modm, xK_y ), withFocused $ windows . W.sink)
, ((modm , xK_w ), sendMessage (IncMasterN 1))
, ((modm , xK_v ), sendMessage (IncMasterN (-1)))
, ((modm , xK_b ), sendMessage ToggleStruts)
, ((modm .|. shiftMask, xK_apostrophe ), io (exitWith ExitSuccess))
, ((modm , xK_apostrophe ), spawn "xmonad --recompile; xmonad --restart")
]
++
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_4]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
-- ++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
-- [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows .
-- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
------------------------------------------------------------------------
myWorkspaces = ["1","2","3","4"]
myNormalBorderColor = "#000000"
myFocusedBorderColor = "#000099"
myBorderWidth = 2
------------------------------------------------------------------------
------------------------------------------------------------------------
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "Vlc" --> doRectFloat (W.RationalRect 0.4 0.25 0.54 0.54)
, title =? "Buddy List" --> doRectFloat (W.RationalRect 0.7 0.0 0.3 0.5)
, title =? "Whisker Menu" --> doRectFloat (W.RationalRect 0.0 0.0 0.4 0.95)
, className =? "Xfce4-terminal" --> doRectFloat (W.RationalRect 0.5 0.44 0.5 0.52)
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
, stringProperty "WM_WINDOW_ROLE" =? "conversation" --> doRectFloat (W.RationalRect 0.5 0.5 0.5 0.45) ]
------------------------------------------------------------------------
myLayout = avoidStruts $ noBorders Full ||| mouseResizableTile{ draggerType = FixedDragger 0 3} ||| mouseResizableTileMirrored { draggerType = FixedDragger 0 3 }
------------------------------------------------------------------------
exec xcompmgr -c &
exec startxfce4 --with-ck-launch