我正在使用 Arch Linux (4.7.5-1-拱门) 与 xmonad (xmonad 0.12) 窗口管理器。我是 xmonad 的新手,并且仍在学习中。我没有做太多修改,所以我的xmonad.hs
修改很小。
import XMonad
import XMonad.Layout.Spacing
import Graphics.X11.ExtraTypes.XF86
import XMonad.Util.EZConfig
import XMonad.Hooks.ManageHelpers
manageHook = manageDocks <+> (isFullscreen --> doFullFloat) <+> manageHook defaultConfig
myLayout = tiled ||| Mirror tiled ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = spacing 3 $ Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmonad $ defaultConfig
{layoutHook = myLayout
}
我面临的问题是我无法使某些应用程序全屏显示。截至目前,当我按下 时F11,只有 mozilla firefox 会进入全屏。以下应用程序(以及更多)F11根本不遵守。 - gedit 文本编辑器 - evince 文档查看器 - emacs - leafpad
当我按下 时什么也没有发生F11。即使我手动单击全屏按钮,它也不会响应⇱⇲(如下所示)。
有什么方法可以让 xmonad 上的内容全屏显示吗?
答案1
只需添加XMonad.Hooks.EwmhDesktops.fullscreenEventHook到你的handleEventHook定义。这是我的摘录配置
import XMonad.Hooks.EwmhDesktops
main = do
xmonad $ docks $ ewmh def {
handleEventHook = handleEventHook def <+> XMonad.Hooks.EwmhDesktops.fullscreenEventHook,
modMask = mod4Mask,
terminal = "terminator",
workspaces = myWorkspaces,
layoutHook = myLayoutHook,
manageHook = manageSpawn <+> myManageHook <+> manageHook def,
borderWidth = 1,
normalBorderColor = black,
focusedBorderColor = yellow,
focusFollowsMouse = False,
logHook = dynamicLogWithPP xmobarPP {
ppOutput = hPutStrLn xmproc,
ppTitle = xmobarColor "green" "" . shorten 50}
}`additionalKeys`