XMonad 的新手,到目前为止很喜欢它。我有一个相当普通/常规的 XMonad 设置,并且遇到了dmenu问题。当我登录并点击时,mod+p
什么也没有发生。如果我然后打开一个终端并点击xmonad --restart
then mod+p
,dmenu
将会工作。
我的一定有什么问题xmonad.hs
?我尝试了 XMonad 的非自定义设置,一切正常(即dmenu
登录后工作)。
我的问题:
- 我的有什么问题
xmonad.hs
吗? - 为什么不
dmenu
工作,除非我xmonad --restart
? - 在启动 xmonad 时,是否会出现某些故障
xmonad.start
会阻止 dmenu 正确加载?
这是我的文件(从overthink借来的)。:
xmonad.hs
import System.IO
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run(spawnPipe)
import XMonad.Hooks.ICCCMFocus
myWorkspaces = ["1", "2", "3", "4", "5", "6"]
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
]
main = do
xmproc <- spawnPipe "/usr/bin/xmobar /home/aaron/.xmobarrc"
xmonad $ defaultConfig { terminal = "urxvt" }
{ manageHook = manageDocks <+> manageHook defaultConfig
, startupHook = takeTopFocus >> setWMName "LG3D" -- fix for Java apps
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, modMask = mod4Mask -- Rebind Mod to the Windows key
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "gnome-screensaver-command --lock") ]
xmonad.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Xmonad-****
Comment=Ligthweight, pretentious tiling window manager
Exec=xmonad.start
Icon=xmonad.png
Type=XSession
xmonad.start
#!/bin/bash
xrdb -merge .Xresources
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype percent --width 10 --heighttype pixel --height 20 --transparent true --alpha 0 --tint 0x333333 &
# settings daemon is a prereq for some other gnome apps
gnome-settings-daemon &
# Network monitor (connections, vpns) applet in tray
if [ -x /usr/bin/nm-applet ] ; then
nm-applet --sm-disable &
fi
# volume indicator in tray
if [ -x /usr/bin/gnome-sound-applet ] ; then
gnome-sound-applet &
fi
eval $(gnome-keyring-daemon --start)
export GNOME_KEYRING_SOCKET
export GNOME_KEYRING_PID
#exec xmonad
dbus-launch --exit-with-session xmonad
谢谢你的帮助!