我还使用 xmonad 和 kde,以下对我有用。
import XMonad
import XMonad.Config.Desktop
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks -- dock/tray mgmt
import XMonad.Hooks.DynamicLog -- statusbar
import XMonad.Actions.CycleWS -- workspace-switching
import XMonad.Util.EZConfig -- append key/mouse bindings
import XMonad.Util.Run(spawnPipe)
import XMonad.Config.Kde
import XMonad.Layout
import XMonad.Layout.NoBorders ( noBorders, smartBorders )
import XMonad.Layout.Spacing
import System.IO
myManageHook = composeAll
[ className =? "yakuake" --> doFloat
, className =? "Yakuake" --> doFloat
, className =? "Kmix" --> doFloat
, className =? "kmix" --> doFloat
, className =? "plasma" --> doFloat
, className =? "Plasma" --> doFloat
, className =? "plasma-desktop" --> doFloat
, className =? "Plasma-desktop" --> doFloat
, className =? "krunner" --> doFloat
, className =? "ksplashsimple" --> doFloat
, className =? "ksplashqml" --> doFloat
, className =? "ksplashx" --> doFloat
]
...
...
main = do
xmonad $ ewmh desktopConfig
{ modMask = mod4Mask
, terminal = "konsole"
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
, borderWidth = 1
, normalBorderColor = "#abc123"
, focusedBorderColor = "#456def"
, layoutHook = avoidStruts myLayout
, workspaces = myWorkspaces
, startupHook = startupHook desktopConfig
, logHook = logHook' xmproc
}
`additionalKeysP` myKeys
...