Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java GUI Xmonad not working

Java GUI applications only give me a blank window, I tried:

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

and setting this:

_JAVA_AWT_WM_NONREPARENTING=1 

and this:

AWT_TOOLKIT=MToolkit

and I tried using "wmname" suckless tools. None of those methods worked for me. Two questions:

  1. Is there any other possibility?
  2. What am I getting wrong?

I use java 8 and below is my currently minimal xmonad config.

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")
        ]
like image 634
oliverwiegers Avatar asked Jan 24 '17 16:01

oliverwiegers


1 Answers

so finally I found out it is:

borderWidth = 0,

after disabling this setting or setting it to any positive value everything works like a charm.

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

Sorry for bothering you guys. I hope the information can help anyone.

like image 123
oliverwiegers Avatar answered Sep 28 '22 10:09

oliverwiegers