Difference between revisions of "Xmonad/Config archive/TeXitoi's xmonad.hs"
< Xmonad | Config archive
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
<haskell> |
<haskell> |
||
import XMonad hiding (Tall) |
import XMonad hiding (Tall) |
||
+ | import XMonad.Actions.PhysicalScreens |
||
import XMonad.Config.Desktop |
import XMonad.Config.Desktop |
||
+ | import XMonad.Config.Xfce |
||
import XMonad.Hooks.FadeInactive |
import XMonad.Hooks.FadeInactive |
||
import XMonad.Hooks.SetWMName |
import XMonad.Hooks.SetWMName |
||
Line 9: | Line 11: | ||
import qualified Data.Map as M |
import qualified Data.Map as M |
||
import qualified XMonad.StackSet as W |
import qualified XMonad.StackSet as W |
||
+ | |||
− | |||
− | main = xmonad |
+ | main = xmonad xfceConfig { |
modMask = mod4Mask, |
modMask = mod4Mask, |
||
− | terminal = " |
+ | terminal = "xfce4-terminal", |
− | keys = \c -> myKeys c `M.union` keys |
+ | keys = \c -> myKeys c `M.union` keys xfceConfig c, |
− | startupHook = startupHook |
+ | startupHook = startupHook xfceConfig >> setWMName "LG3D", |
− | logHook = logHook |
+ | logHook = logHook xfceConfig >> fadeInactiveLogHook 0xcccccccc, |
layoutHook = desktopLayoutModifiers . smartBorders $ tiled ||| Full, |
layoutHook = desktopLayoutModifiers . smartBorders $ tiled ||| Full, |
||
− | manageHook = myManageHook <+> manageHook |
+ | manageHook = myManageHook <+> manageHook xfceConfig, |
workspaces = map show [1..8], |
workspaces = map show [1..8], |
||
focusedBorderColor = "#729fcf", |
focusedBorderColor = "#729fcf", |
||
normalBorderColor = "#aaaaaa" |
normalBorderColor = "#aaaaaa" |
||
} |
} |
||
+ | |||
− | |||
tiled = HintedTile 1 0.03 0.5 TopLeft Tall |
tiled = HintedTile 1 0.03 0.5 TopLeft Tall |
||
+ | |||
− | |||
myKeys conf@(XConfig {modMask = modm}) = M.fromList $ |
myKeys conf@(XConfig {modMask = modm}) = M.fromList $ |
||
[((modm, xK_semicolon), sendMessage (IncMasterN (-1))), |
[((modm, xK_semicolon), sendMessage (IncMasterN (-1))), |
||
((mod1Mask, xK_Tab), windows W.focusDown), |
((mod1Mask, xK_Tab), windows W.focusDown), |
||
((mod1Mask .|. shiftMask, xK_Tab), windows W.focusUp), |
((mod1Mask .|. shiftMask, xK_Tab), windows W.focusUp), |
||
− | ((mod4Mask, xK_i), sendMessage NextLayout)] |
+ | ((mod4Mask, xK_i), sendMessage NextLayout)] |
+ | ++ |
||
+ | [((modm .|. mask, key), f sc) |
||
+ | | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] |
||
+ | , (f, mask) <- [(viewScreen, 0), (sendToScreen, shiftMask)]] |
||
+ | ++ |
||
+ | [((modm .|. mask, key), f sc) |
||
+ | | (key, sc) <- zip [xK_a, xK_u, xK_i] [0..] |
||
+ | , (f, mask) <- [(viewScreen, 0), (sendToScreen, shiftMask)]] |
||
+ | ++ |
||
[((m .|. modm, k), windows $ f i) |
[((m .|. modm, k), windows $ f i) |
||
− | + | | (i, k) <- zip (workspaces conf) num |
|
− | + | , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] |
|
+ | num = numBepo |
||
+ | --num = numAzerty |
||
numBepo = [0x22,0xab,0xbb,0x28,0x29,0x40,0x2b,0x2d,0x2f,0x2a] |
numBepo = [0x22,0xab,0xbb,0x28,0x29,0x40,0x2b,0x2d,0x2f,0x2a] |
||
numAzerty = [0x26,0xe9,0x22,0x27,0x28,0x2d,0xe8,0x5f,0xe7,0xe0] |
numAzerty = [0x26,0xe9,0x22,0x27,0x28,0x2d,0xe8,0x5f,0xe7,0xe0] |
||
+ | |||
− | |||
myManageHook = composeAll $ |
myManageHook = composeAll $ |
||
[className =? "Xfce4-notifyd" --> doIgnore, |
[className =? "Xfce4-notifyd" --> doIgnore, |
||
+ | className =? "Xfrun4" --> doFloat, |
||
+ | className =? "Xfce4-appfinder" --> doFloat, |
||
className =? "mplayer2" --> doFloat] |
className =? "mplayer2" --> doFloat] |
||
++ |
++ |
||
[className =? c --> doShift w | (w, cs) <- wcs, c <- cs] |
[className =? c --> doShift w | (w, cs) <- wcs, c <- cs] |
||
− | where wcs = [("2", ["Midori", "Firefox", "Iceweasel"]), |
+ | where wcs = [("2", ["Midori", "Firefox", "Iceweasel", "Claws-mail"]), |
− | (" |
+ | ("4", ["Gajim"]), |
− | ("4", ["Claws-mail"]), |
||
("5", ["Gmpc"])] |
("5", ["Gmpc"])] |
||
</haskell> |
</haskell> |
Revision as of 10:26, 13 November 2014
import XMonad hiding (Tall)
import XMonad.Actions.PhysicalScreens
import XMonad.Config.Desktop
import XMonad.Config.Xfce
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.SetWMName
import XMonad.Layout.NoBorders
import XMonad.Layout.HintedTile
import qualified Data.Map as M
import qualified XMonad.StackSet as W
main = xmonad xfceConfig {
modMask = mod4Mask,
terminal = "xfce4-terminal",
keys = \c -> myKeys c `M.union` keys xfceConfig c,
startupHook = startupHook xfceConfig >> setWMName "LG3D",
logHook = logHook xfceConfig >> fadeInactiveLogHook 0xcccccccc,
layoutHook = desktopLayoutModifiers . smartBorders $ tiled ||| Full,
manageHook = myManageHook <+> manageHook xfceConfig,
workspaces = map show [1..8],
focusedBorderColor = "#729fcf",
normalBorderColor = "#aaaaaa"
}
tiled = HintedTile 1 0.03 0.5 TopLeft Tall
myKeys conf@(XConfig {modMask = modm}) = M.fromList $
[((modm, xK_semicolon), sendMessage (IncMasterN (-1))),
((mod1Mask, xK_Tab), windows W.focusDown),
((mod1Mask .|. shiftMask, xK_Tab), windows W.focusUp),
((mod4Mask, xK_i), sendMessage NextLayout)]
++
[((modm .|. mask, key), f sc)
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, mask) <- [(viewScreen, 0), (sendToScreen, shiftMask)]]
++
[((modm .|. mask, key), f sc)
| (key, sc) <- zip [xK_a, xK_u, xK_i] [0..]
, (f, mask) <- [(viewScreen, 0), (sendToScreen, shiftMask)]]
++
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (workspaces conf) num
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
num = numBepo
--num = numAzerty
numBepo = [0x22,0xab,0xbb,0x28,0x29,0x40,0x2b,0x2d,0x2f,0x2a]
numAzerty = [0x26,0xe9,0x22,0x27,0x28,0x2d,0xe8,0x5f,0xe7,0xe0]
myManageHook = composeAll $
[className =? "Xfce4-notifyd" --> doIgnore,
className =? "Xfrun4" --> doFloat,
className =? "Xfce4-appfinder" --> doFloat,
className =? "mplayer2" --> doFloat]
++
[className =? c --> doShift w | (w, cs) <- wcs, c <- cs]
where wcs = [("2", ["Midori", "Firefox", "Iceweasel", "Claws-mail"]),
("4", ["Gajim"]),
("5", ["Gmpc"])]