On a xinerama-enabled display, dmenu will normally appear spanning the top of all your screens. It’s kind of annoying. To fix it, you need this patch against dmenu 2.8 and this code in your Config.hs:

In the “import” block:

import Data.Maybe
import Control.Monad.State
import qualified StackSet as W

Anywhere you like:

dmenu :: X ()
dmenu = do
    ws <- gets workspace
    let curscreen = fromIntegral $ fromMaybe 0 (M.lookup (W.current ws) (W.ws2screen ws)) :: Int
    spawn $ "exe=`dmenu_path | dmenu -xs " ++ show (curscreen+1) ++ "` && exec $exe" 

And bind mod-p (or whatever you prefer, of course) to that action.

Back to site index