diff options
author | Michal Minar <miminar@redhat.com> | 2015-08-02 11:13:49 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2015-08-02 11:14:06 +0200 |
commit | faf2fe322a80c7ac84a5eb7de5506e28c4e25b2b (patch) | |
tree | fde5914ea42176ed3e2eb57b9d61e7c0d051aca1 | |
parent | eda7f71b7e65adf47389bc9593ee73ee7be4fe84 (diff) | |
download | xminad-faf2fe322a80c7ac84a5eb7de5506e28c4e25b2b.tar.gz xminad-faf2fe322a80c7ac84a5eb7de5506e28c4e25b2b.tar.xz xminad-faf2fe322a80c7ac84a5eb7de5506e28c4e25b2b.zip |
Minor cleanups
Signed-off-by: Michal Minar <miminar@redhat.com>
-rw-r--r-- | src/XMonad/Local/EventHook.hs | 2 | ||||
-rw-r--r-- | src/XMonad/Local/Keys.hs | 8 | ||||
-rw-r--r-- | src/XMonad/Local/Layout.hs | 2 | ||||
-rw-r--r-- | src/XMonad/Local/Mouse.hs | 23 |
4 files changed, 25 insertions, 10 deletions
diff --git a/src/XMonad/Local/EventHook.hs b/src/XMonad/Local/EventHook.hs index d25377b..b477e0c 100644 --- a/src/XMonad/Local/EventHook.hs +++ b/src/XMonad/Local/EventHook.hs @@ -1,13 +1,11 @@ module XMonad.Local.EventHook (eventHook) where -import qualified Data.Map as M import Data.Monoid import XMonad import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.FadeWindows import XMonad.Hooks.ManageDocks -import qualified XMonad.StackSet as W eventHook :: Event -> X All eventHook = mconcat diff --git a/src/XMonad/Local/Keys.hs b/src/XMonad/Local/Keys.hs index 0a21614..8f94bdd 100644 --- a/src/XMonad/Local/Keys.hs +++ b/src/XMonad/Local/Keys.hs @@ -89,14 +89,14 @@ genericKeys conf = [ , ("C-l", sendMessage $ Go R) , ("j", BW.focusDown) , ("k", BW.focusUp) - , ("m", windows W.focusMaster) + , ("m", BW.focusMaster) , ("S-j", windows W.swapDown) , ("S-k", windows W.swapUp) , ("C-.", onGroup W.focusUp') , ("C-,", onGroup W.focusDown') , ("h", sendMessage Shrink) , ("l", sendMessage Expand) - , ("<Return>", windows W.focusMaster) + , ("<Return>", BW.focusMaster) , ("S-<Return>", DwmP.dwmpromote) , ("t", withFocused $ windows . W.sink) , (",", sendMessage (IncMasterN 1)) @@ -111,10 +111,6 @@ genericKeys conf = [ , ("C-m", withFocused (sendMessage . MergeAll)) , ("C-u", withFocused (sendMessage . UnMerge)) - -- boring windows - , ("b", BW.markBoring) - , ("S-b", BW.clearBoring) - -- minimized widnows , ("z", withFocused minimizeWindow) , ("S-z", sendMessage RestoreNextMinimizedWin) diff --git a/src/XMonad/Local/Layout.hs b/src/XMonad/Local/Layout.hs index e9a5a5a..5d4b880 100644 --- a/src/XMonad/Local/Layout.hs +++ b/src/XMonad/Local/Layout.hs @@ -63,7 +63,6 @@ chatL = IM.withIM (1%5) (IM.ClassName "Skype" $ easyLay gimpL = LN.named "GIMP" - -- $ configurableNavigation noNavigateBorders $ BW.boringWindows $ windowNavigation $ smartBorders $ IM.withIM (11/64) (IM.Role "gimp-toolbox") @@ -98,4 +97,3 @@ myTabTheme = Tab.defaultTheme , Tab.fontName = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*" , Tab.decoHeight = 24 } - diff --git a/src/XMonad/Local/Mouse.hs b/src/XMonad/Local/Mouse.hs new file mode 100644 index 0000000..b4c1bfc --- /dev/null +++ b/src/XMonad/Local/Mouse.hs @@ -0,0 +1,23 @@ +module XMonad.Local.Mouse where + +import qualified Data.Map as M + +import XMonad +import qualified XMonad.Actions.FlexibleResize as FlexR +import qualified XMonad.StackSet as W + +-- Mouse bindings: default actions bound to mouse events +mouseBindings :: XConfig Layout + -> M.Map (ButtonMask, Button) (Window -> X()) +mouseBindings (XConfig {XMonad.modMask = mm}) = M.fromList + -- mod-button1, Set the window to floating mode and move by dragging + [ ((mm, button1), \w -> focus w >> mouseMoveWindow w + >> windows W.shiftMaster) + -- mod-button2, Raise the window to the top of the stack + , ((mm, button2), windows . (W.shiftMaster .) . W.focusWindow) + -- mod-button3, Set the window to floating mode and resize by dragging + , ((mm, button3), \w -> focus w >> FlexR.mouseResizeWindow w) + -- you may also bind events to the mouse scroll wheel (button4 and button5) + , ((mm, button4), const $ windows W.swapDown) + , ((mm, button5), const $ windows W.swapUp) + ] |