Java GUI Xmonad无法正常工作

时间:2017-01-24 16:08:11

标签: java swing user-interface haskell xmonad

Java GUI应用程序只给我一个空白窗口,我试过:

main = do
    xmonad $ defaultConfig
    { modMask = mod4Mask
    , startupHook = setWMName "LG3D"
    -- other customizations
    }

并设置此项:

_JAVA_AWT_WM_NONREPARENTING=1 

和此:

AWT_TOOLKIT=MToolkit

我尝试使用“wmname”无懈可击的工具。 这些方法都不适合我。两个问题:

  1. 还有其他可能吗?
  2. 我出错了什么?
  3. 我使用java 8及以下版本是我目前最小的xmonad配置。

    import XMonad 
    import XMonad.Hooks.DynamicLog
    import XMonad.Hooks.SetWMName
    import XMonad.Hooks.ManageDocks
    import XMonad.Hooks.FadeInactive
    import XMonad.Util.Run(spawnPipe)
    import XMonad.Util.EZConfig(additionalKeys)
    import XMonad.Actions.UpdatePointer
    import XMonad.Hooks.EwmhDesktops
    import System.IO
    
    
    term = "termite"
    myWorkspaces = ["1","2","3","4","5"]
    
    myLogHook :: X ()
    myLogHook = fadeInactiveLogHook fadeAmount
        where fadeAmount = 0.7
    
    main = do
        xmonad $ defaultConfig { 
            startupHook = setWMName "LG3D",
            manageHook = manageDocks <+> manageHook defaultConfig,
            layoutHook = avoidStruts $ layoutHook defaultConfig,
            logHook = dynamicLog
                 >> updatePointer (0.5,0.5) (1,1)
                 >> myLogHook,
            terminal = term,
            borderWidth = 0,
            focusFollowsMouse = False,
            workspaces = myWorkspaces
            }`additionalKeys`[
                ((mod1Mask .|. shiftMask, xK_l), spawn "scrot 'lock.png' -q 1 -e 'mv $f /tmp/lock.png' && i3lock -I 1 -i /tmp/lock.png"),
                ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s"),
                ((0, xK_Print), spawn "scrot"),
                ((mod1Mask, xK_d), spawn "rofi -config /home/chrootzius/.config/rofi/config -show run")
            ]
    

1 个答案:

答案 0 :(得分:7)

所以最后我发现它是:

borderWidth = 0,

禁用此设置或将其设置为任何正值后,一切都像魅力一样。

--this works
borderWidth = [any positive value],
--for example
borderWidth = 1,

很抱歉打扰你们。我希望这些信息可以帮助任何人。