Created
November 25, 2015 02:00
-
-
Save sam33r/6d4e4c93aea159d96d5a to your computer and use it in GitHub Desktop.
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
-- My XMonad Config | |
import XMonad | |
import XMonad.Actions.CycleWS | |
import XMonad.Actions.UpdatePointer | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.FadeInactive | |
import XMonad.Layout.Accordion | |
import XMonad.Layout.Fullscreen | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.Spiral | |
import XMonad.Layout.Tabbed | |
import XMonad.Layout.ThreeColumns | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
myManageHook = composeAll | |
[ className =? "Gimp" --> doFloat | |
, className =? "Vncviewer" --> doFloat | |
, title =? "VLC media player" --> doFloat | |
] | |
myLogHook :: X () | |
myLogHook = fadeInactiveLogHook fadeAmount | |
where fadeAmount = 0.8 | |
myLayout = avoidStruts ( | |
Tall 1 (3/100) (1/2) ||| | |
ThreeCol 1 (3/100) (1/2) ||| | |
ThreeColMid 1 (3/100) (1/2) ||| | |
Accordion ||| | |
Mirror (Tall 1 (3/100) (1/2)) ||| | |
tabbed shrinkText tabConfig ||| | |
Full ||| | |
noBorders (fullscreenFull Full) ||| | |
spiral (6/7)) | |
-- Colors for text and backgrounds of each tab when in "Tabbed" layout. | |
tabConfig = defaultTheme { | |
activeBorderColor = "#7C7C7C", | |
activeTextColor = "#CEFFAC", | |
activeColor = "#000000", | |
inactiveBorderColor = "#7C7C7C", | |
inactiveTextColor = "#EEEEEE", | |
inactiveColor = "#000000" | |
} | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar ~/.config/xmobar/xmobarrc" | |
xmonad $ ewmh defaultConfig | |
{ manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above | |
<+> manageHook defaultConfig | |
, layoutHook = myLayout -- avoidStruts $ layoutHook defaultConfig $ myLayout | |
, logHook = myLogHook <+> dynamicLogWithPP xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "green" "" . shorten 50 | |
} | |
>> updatePointer (Relative 0.5 0.5) | |
, modMask = mod4Mask -- Rebind Mod to the Windows key | |
, borderWidth = 4 | |
, normalBorderColor = "#000000" | |
, focusedBorderColor = "#E87F2A" | |
, handleEventHook = handleEventHook defaultConfig <+> XMonad.Hooks.EwmhDesktops.fullscreenEventHook | |
} `additionalKeys` | |
[ ((mod4Mask .|. shiftMask, xK_z), spawn "gnome-screensaver-command -l &") | |
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s") | |
, ((0, xK_Print), spawn "scrot") | |
, ((0, xK_KP_Begin), spawn "xdotool click 1") | |
, ((0, xK_F8), spawn "xdotool click 1") | |
, ((0, xK_KP_Left), spawn "xdotool mousemove_relative -- -10 0") | |
, ((0, xK_KP_Down), spawn "xdotool mousemove_relative -- 0 10") | |
, ((0, xK_KP_Up), spawn "xdotool mousemove_relative -- 0 -10") | |
, ((0, xK_KP_Right), spawn "xdotool mousemove_relative -- 10 0") | |
, ((mod4Mask, xK_KP_Left), spawn "xdotool mousemove_relative -- -100 0") | |
, ((mod4Mask, xK_KP_Down), spawn "xdotool mousemove_relative -- 0 100") | |
, ((mod4Mask, xK_KP_Up), spawn "xdotool mousemove_relative -- 0 -100") | |
, ((mod4Mask, xK_KP_Right), spawn "xdotool mousemove_relative -- 100 0") | |
, ((mod4Mask .|. controlMask, xK_KP_Up), spawn "xdotool click 4") | |
, ((mod4Mask .|. controlMask, xK_KP_Down), spawn "xdotool click 5") | |
, ((mod4Mask .|. controlMask, xK_Left), moveTo Prev NonEmptyWS) | |
, ((mod4Mask .|. controlMask, xK_Right), moveTo Next NonEmptyWS) | |
, ((mod1Mask .|. controlMask .|. shiftMask, xK_Left), shiftToPrev) | |
, ((mod1Mask .|. controlMask .|. shiftMask, xK_Right), shiftToNext) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment