mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-15 03:55:45 -07:00
"dmenu" operation to spawn dmenu only on the current screen (for Xinerama)
This requires a dmenu that will accept -x and -w. Currently, This means applying this patch: http://www.jcreigh.com/dmenu/position-options.patch (I'm trying to see if I can get this into dmenu upstream; haven't heard anything back yet.)
This commit is contained in:
@@ -343,3 +343,14 @@ restart = do
|
|||||||
prog <- getProgName
|
prog <- getProgName
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
executeFile prog True args Nothing
|
executeFile prog True args Nothing
|
||||||
|
|
||||||
|
-- | Starts dmenu on the current screen. (Requires patches to dmenu for the -x
|
||||||
|
-- and -w options.)
|
||||||
|
dmenu :: X ()
|
||||||
|
dmenu = do
|
||||||
|
xinesc <- gets xineScreens
|
||||||
|
ws <- gets workspace
|
||||||
|
ws2sc <- gets wsOnScreen
|
||||||
|
let curscreen = fromMaybe 0 (M.lookup (W.current ws) ws2sc)
|
||||||
|
sc = xinesc !! curscreen
|
||||||
|
spawn $ "exe=`dmenu_path | dmenu -x " ++ (show $ rect_x sc) ++ " -w " ++ (show $ rect_width sc) ++ "` && exec $exe"
|
||||||
|
Reference in New Issue
Block a user