2016-06-19 02:45:00 +00:00
|
|
|
import System.IO
|
2016-09-18 03:24:23 +00:00
|
|
|
import Data.List
|
|
|
|
import Graphics.X11.ExtraTypes.XF86
|
2016-06-19 02:45:00 +00:00
|
|
|
import XMonad
|
2016-09-18 03:24:23 +00:00
|
|
|
import XMonad.Actions.Volume
|
2016-06-19 02:45:00 +00:00
|
|
|
import XMonad.Hooks.DynamicLog
|
|
|
|
import XMonad.Hooks.EwmhDesktops
|
|
|
|
import XMonad.Hooks.ManageDocks
|
|
|
|
import XMonad.Layout.IndependentScreens
|
2016-09-18 03:24:23 +00:00
|
|
|
import XMonad.Prompt
|
|
|
|
import XMonad.Prompt.Shell
|
|
|
|
import XMonad.Prompt.Ssh
|
|
|
|
import XMonad.Prompt.Window
|
2016-06-19 02:45:00 +00:00
|
|
|
import XMonad.Util.EZConfig(additionalKeys)
|
|
|
|
import XMonad.Util.Run(spawnPipe)
|
|
|
|
|
2016-09-18 03:24:23 +00:00
|
|
|
myManageHook = composeAll
|
|
|
|
[ className =? "chromium" --> doShift "1:web_0"
|
|
|
|
, manageDocks
|
|
|
|
]
|
|
|
|
|
2016-06-19 02:45:00 +00:00
|
|
|
main = do
|
|
|
|
xmproc <- spawnPipe "xmobar"
|
|
|
|
xmonad $ ewmh defaultConfig
|
|
|
|
{ handleEventHook =
|
|
|
|
handleEventHook defaultConfig <+> fullscreenEventHook
|
2016-09-18 03:24:23 +00:00
|
|
|
, manageHook = manageDocks <+> myManageHook <+> manageHook defaultConfig
|
2016-06-19 02:45:00 +00:00
|
|
|
, modMask = mod4Mask
|
2016-11-29 02:50:47 +00:00
|
|
|
, workspaces = ["1:web_0", "2:web_1", "3:terminal", "4:code", "5", "6", "7", "8", "9"]
|
2016-12-03 19:04:05 +00:00
|
|
|
, terminal = "termite"
|
2016-06-19 02:45:00 +00:00
|
|
|
, layoutHook = avoidStruts $ layoutHook defaultConfig
|
|
|
|
, logHook = dynamicLogWithPP xmobarPP
|
|
|
|
{ ppOutput = hPutStrLn xmproc
|
|
|
|
, ppTitle = xmobarColor "green" "" . shorten 50
|
|
|
|
}
|
|
|
|
} `additionalKeys`
|
|
|
|
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock; xset dpms force off")
|
|
|
|
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
|
2016-09-18 03:24:23 +00:00
|
|
|
, ((mod4Mask, xK_p), shellPrompt defaultXPConfig)
|
|
|
|
, ((mod4Mask, xK_s), sshPrompt defaultXPConfig)
|
2016-06-19 02:45:00 +00:00
|
|
|
, ((0, xK_Print), spawn "scrot")
|
2016-09-18 03:24:23 +00:00
|
|
|
, ((mod4Mask .|. shiftMask, xK_l), spawn "slock")
|
|
|
|
, ((mod4Mask, xK_g), windowPromptGoto
|
|
|
|
defaultXPConfig { autoComplete = Just 500000 } )
|
|
|
|
, ((mod4Mask .|. shiftMask, xK_g), windowPromptBring
|
|
|
|
defaultXPConfig { autoComplete = Just 500000 } )
|
|
|
|
, ((0, xF86XK_AudioLowerVolume), lowerVolume 4 >> return ())
|
|
|
|
, ((0, xF86XK_AudioRaiseVolume), raiseVolume 4 >> return ())
|
|
|
|
, ((0, xF86XK_AudioMute), toggleMute >> return())
|
2016-11-29 02:50:47 +00:00
|
|
|
, ((0, xF86XK_MonBrightnessUp), spawn "xbacklight -inc 20")
|
|
|
|
, ((0, xF86XK_MonBrightnessDown), spawn "xbacklight -dec 20")
|
|
|
|
, ((0, xF86XK_KbdBrightnessUp), spawn "sudo /usr/bin/kb-brightness up 20")
|
|
|
|
, ((0, xF86XK_KbdBrightnessDown), spawn "sudo /usr/bin/kb-brightness down 20")
|
2016-06-19 02:45:00 +00:00
|
|
|
]
|