Skip to content

Instantly share code, notes, and snippets.

@BinRoot
Created December 28, 2013 00:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BinRoot/8154650 to your computer and use it in GitHub Desktop.
Save BinRoot/8154650 to your computer and use it in GitHub Desktop.
My current xmonad config. Made with love.
-- Author: BinRoot
-- Todo: dmenu, animations
import XMonad
import XMonad.Config.Gnome
import XMonad.Layout.NoBorders (smartBorders)
import XMonad.Hooks.FadeInactive (fadeInactiveLogHook)
import XMonad.Hooks.ManageDocks (manageDocks)
import XMonad.Hooks.SetWMName (setWMName)
import XMonad.Layout.Spacing (smartSpacing)
import XMonad.Util.EZConfig (additionalKeys)
import qualified Data.Map as M
-- changes the mod key to "super"
myModMask = mod4Mask
-- which terminal software to use
myTerminal = "gnome-terminal"
-- removes borders in fullscreen mode
myLayoutHook = smartSpacing 2 $ smartBorders (layoutHook gnomeConfig)
-- width of border around windows
myBorderWidth = 0
-- color of focused border
myFocusedBorderColor = "#ffffff"
-- color of inactive border
myNormalBorderColor = "#cccccc"
-- support xcompmgr events
myLogHook = do
logHook gnomeConfig
fadeInactiveLogHook 0.4
{- startup command for window effects
"-cfF" "c" is for soft shadows and transparency support,
"f" for fade in & fade out when creating and closing windows,
and "F" for fade when changing a window's transparency.
"-t-9 -l-11" shadows are offset 9 pixels from top of the window
and 11 pixels from the left edge
"-r9" shadow radius is 9 pixels
"-o.95" shadow opacity is set to 0.95
"-D6" the time between each step when fading windows is set to 6 milliseconds.
-}
myStartupHook = do
startupHook gnomeConfig
spawn "xcompmgr -cfF -t-9 -l-11 -r9 -o.95 -D6 &"
setWMName "LG3D"
myKeys = [ ((myModMask, xK_c), spawn "chromium-browser")
, ((myModMask, xK_o), spawn "libreoffice")
, ((myModMask, xK_g), spawn "gimp")
, ((myModMask, xK_e), spawn "emacs")
, ((myModMask .|. controlMask, xK_r), spawn "xmonad --recompile && xmonad --restart")
]
main = xmonad $ gnomeConfig
{ modMask = myModMask
, terminal = myTerminal
, layoutHook = myLayoutHook
, borderWidth = myBorderWidth
, focusedBorderColor = myFocusedBorderColor
, normalBorderColor = myNormalBorderColor
, logHook = myLogHook
, startupHook = myStartupHook
} `additionalKeys` myKeys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment