You are not logged in.

#1 2012-11-03 18:03:18

Psionic
Member
Registered: 2012-11-03
Posts: 3

How to install java xmonad patch

Im having focus issues with netbeans & xmonad I think I have a fix http://mth.io/posts/xmonad-java-focus/ however as I do not know any haskell I have no idea how I add the patch to the existant configuration - here

-- make sure to edit paths to xmobar and .xmobarrc to match your system.
    -- If xmobar is in your $PATH, and its config is in ~/.xmobarrc you don't
    -- need the xmobar path or config file, use: xmproc <- spawnPipe "xmobar"

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO

main = do
    xmproc <- spawnPipe "xmobar"
    xmonad $ defaultConfig
        { manageHook = manageDocks <+> manageHook defaultConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
        , logHook = dynamicLogWithPP xmobarPP
                        { ppOutput = hPutStrLn xmproc
                        , ppTitle = xmobarColor "green" "" . shorten 50
                        }
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
        , startupHook         = setWMName "LG3D"
        } `additionalKeys`
        [ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
        , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((0, xK_Print), spawn "scrot")
        ]

I know its an exact copy from a tutorial but I do not really want to get into haskell at the moment. I was wondering if someone could tell me how the patch is applied in my case.

Offline

#2 2012-11-03 18:15:34

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: How to install java xmonad patch

While I understand the importance of learning how to patch I believe you could just add 'wmname LG3D &' to your ~/.xinitrc and java apps will work correctly.

Make sure you install https://www.archlinux.org/packages/comm … 86/wmname/

Last edited by doug piston (2012-11-03 18:40:33)

Offline

#3 2012-11-03 19:52:00

Psionic
Member
Registered: 2012-11-03
Posts: 3

Re: How to install java xmonad patch

Doing that only fixes my original problem of "greyed out" frames in java applications. My problem now is that I am transiently unable to type in certain text boxes etc. It is a documented bug but im not sure how to fix it.

Offline

#4 2012-11-03 21:29:39

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: How to install java xmonad patch

I also was unable to type text in text boxes (using IntelliJ, not Netbeans but it should be very similar). Launching IntelliJ with JRE 6 solved the issue.

Offline

#5 2012-11-04 19:20:28

Psionic
Member
Registered: 2012-11-03
Posts: 3

Re: How to install java xmonad patch

bump

Offline

Board footer

Powered by FluxBB