modkeyを使用せずにxmonadからフローティングウィンドウをドラッグしてサイズ変更

modkeyを使用せずにxmonadからフローティングウィンドウをドラッグしてサイズ変更

私の.xmonad/xmonad.hsファイルには、ウィンドウをドラッグしてサイズを変更する方法を制御する次の行があります。モードキーを必要としないようにどのように変更できますか?

myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $

    -- mod-button1, Set the window to floating mode and move by dragging
    [ ((modm,button1), (\w -> focus w >> mouseMoveWindow w
                                       >> windows W.shiftMaster))

    -- mod-button2, Raise the window to the top of the stack
    , ((modm,button2), (\w -> focus w >> windows W.shiftMaster))

    -- mod-button3, Set the window to floating mode and resize by dragging
    , ((modm,button3), (\w -> focus w >> mouseResizeWindow w
                                       >> windows W.shiftMaster))

    -- you may also bind events to the mouse scroll wheel (button4 and button5)
    ]

ベストアンサー1

たとえば、modmに変更してみてください。0

, ((0,button2), (\w -> focus w >> windows W.shiftMaster))

(望むよりこの記事は、modKeyサンプルのマウスバインディングなしで使用するためのものです。)。

しかし、バインディングを設定する(0,button1)通常のマウスクリックおそらく、もはやGUIプログラムにアクセスできなくなります(私は試したことがありません)。

また、レイアウト修飾子を見てくださいBorderResize(フロートレイアウトなどへの依存関係を参照してください。リンクされたページの最初の段落を参照してください。)

おすすめ記事