Skip to content
Find file
229fa65 Aug 27, 2014
61 lines (45 sloc) 1.81 KB
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
import XMonad
import XMonad.Hooks.DynamicLog
import System.IO
import XMonad.Layout.Spacing
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Layout.LayoutModifier
import XMonad.Hooks.ManageDocks
import Control.Arrow(second)
main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig
-- My layout
myLayout = tiled ||| Mirror tiled ||| Full
where
-- Add spacing between windows
tiled = smartSpacing 3 $ Tall nmaster delta ratio
-- One window in master window by default
nmaster = 1
-- Default ratio of master/nonmaster window
ratio = 1/2
-- Percentage of screen to increment by when resizing panes
delta = 3/100
-- Command to launch the bar
myBar = "xmobar"
-- Border width
myBorderWidth = 1
-- My PP
myPP = xmobarPP { ppCurrent = xmobarColor "yellow" "" . wrap "[" "]"
, ppLayout = const "" }
-- Key binding to toggle the gap for the bar
toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
-- Define amount and names of workspaces
myWorkspaces = ["1:main", "2:dev", "3:www", "4:docs", "5:hamster", "6", "7:chat", "8:term"]
-- Main configuration
myConfig = defaultConfig { terminal = "xfce4-terminal",
borderWidth = myBorderWidth,
-- focusedBorderColor = "#68e862",
normalBorderColor = "60A1AD",
layoutHook = smartBorders myLayout,
manageHook = manageDocks <+> manageHook defaultConfig,
workspaces = myWorkspaces
} `additionalKeys`
[ (( mod1Mask, xK_Tab), spawn "/home/matija/scripts/switchKbLayout.sh")
]
Something went wrong with that request. Please try again.