View difference between Paste ID: APnmXuZj and xqfkh8bk
SHOW: | | - or go back to the newest paste.
1
import XMonad
2
import XMonad.Hooks.DynamicLog
3
import XMonad.Hooks.ManageDocks
4
import XMonad.Util.Run(spawnPipe)
5-
import XMonad.Util.EZConfig(additionalKeys)
5+
import XMonad.Util.EZConfig(additionalKeysP)
6
import System.IO
7
import XMonad.Actions.WindowGo
8
9
myManageHook = composeAll
10
    [ className =? "Gimp"      --> doFloat
11
    , className =? "Vncviewer" --> doFloat
12
    --, className =? "mplayer" --> doFloat
13
    ]
14
-- instead of the sendMessage composition in the keybinding, you could also use this to "make Master" and "change to layout Full" whenever a window has the "Firefox" classname
15
16
main = do
17
    xmproc <- spawnPipe "xmobar"
18
    xmodproc <- spawnPipe "xmodmap ~/.Xmodmap"
19
    fproc <- spawnPipe "firefox"
20
    termproc <- spawnPipe "lxterminal"
21
    xmonad $ defaultConfig
22
        { manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
23
                        <+> manageHook defaultConfig
24
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
25
        , logHook = dynamicLogWithPP $ xmobarPP
26
                        { ppOutput = hPutStrLn xmproc
27
                        , ppTitle = xmobarColor "green" "" . shorten 50
28
                        }
29
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
30-
        } `additionalKeys`
30+
31-
        [ ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
31+
        } `additionalKeysP`
32-
        , ((0, xK_Print), spawn "scrot")
32+
        [ ("C-<Print>", spawn "sleep 0.2; scrot -s")
33-
        , ((controlMask, xK_f), runOrRaiseMaster "firefox" (className =? "Firefox")) >> (sendMessage $ JumpToLayout "Full")
33+
        , ("<Print>", spawn "scrot")
34
        , ("M-f", (runOrRaiseMaster "firefox" (className =? "Firefox")) >> (sendMessage $ JumpToLayout "Full"))
35
        ]
36
37