Created
July 22, 2017 08:47
-
-
Save ruanyf/65893d5d5916bb2ffefd8ea69ff869f7 to your computer and use it in GitHub Desktop.
xmonad 配置文件范例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
main = do | |
xmproc <- spawnPipe "xmobar" | |
xmonad $ defaultConfig | |
{ manageHook = manageDocks <+> manageHook defaultConfig | |
, layoutHook = avoidStruts $ layoutHook defaultConfig | |
, logHook = dynamicLogWithPP xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "green" "" . shorten 50 | |
} | |
, modMask = mod4Mask -- Rebind Mod to the Windows key | |
} `additionalKeys` | |
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock; xset dpms force off") | |
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s") | |
, ((0, xK_Print), spawn "scrot") | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment