guest@dotshare [~/groups/wms/xmonad] $ ls emacs-laptop/ | cat

emacs-laptop (scrot) (+1 likes)

iyzsong May 16, 2013 (wms/xmonad)

xmonad.hs(raw, dl)

SCROT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import           Data.Monoid
import           XMonad
import qualified XMonad.StackSet             as W
import           XMonad.Util.Cursor
import           XMonad.Util.EZConfig
import           XMonad.Actions.CycleWS
import           XMonad.Actions.Warp
import           XMonad.Hooks.DynamicLog
import           XMonad.Hooks.SetWMName
import           XMonad.Hooks.ManageDocks
import           XMonad.Hooks.ManageHelpers
import           XMonad.Layout.Accordion
import           XMonad.Layout.NoBorders
import           XMonad.Layout.Simplest

main = do
  xmonad $ defaultConfig
    { keys                 = myKeys
    , modMask              = mod4Mask
    , workspaces           = myWorkspaces
    , focusFollowsMouse    = False
    , borderWidth          = 2
    , normalBorderColor    = "#202020"
    , focusedBorderColor   = "#808080"
    , layoutHook           = myLayout
    , logHook              = myLogHook
    , manageHook           = myManageHook
    , startupHook          = myStartupHook
    , handleEventHook      = myEventHook
    }

myWorkspaces = map show [1..9]

myLogHook =
  dynamicLogString defaultPP >>= xmonadPropLog

myLayout = (myTall ||| myMTall ||| mySimplest ||| myAccordion) where
  myTall      = avoidStruts $ Tall 1 0.1 0.5
  myMTall     = avoidStruts $ Mirror $ Tall 1 0.1 0.5
  myAccordion = avoidStruts $ noBorders $ Accordion
  mySimplest  = noBorders Simplest

myKeys = \c -> mkKeymap c $
  [ ("M-w p",             windows $ W.focusUp)
  , ("M-w n",             windows $ W.focusDown)
  , ("M-w m",             windows $ W.focusMaster)
  , ("M-w S-p",           windows $ W.swapUp)
  , ("M-w S-n",           windows $ W.swapDown)
  , ("M-w S-m",           windows $ W.swapMaster)
  , ("M-w s",             withFocused $ windows . W.sink)
  , ("M-w c",             kill)
  , ("M-w <Space>",       shiftTo Next EmptyWS)
  , ("M-w <Tab>",         shiftNextScreen)
  , ("M-<Space> e",       moveTo Next EmptyWS)
  , ("M-<Space> p",       moveTo Prev HiddenNonEmptyWS)
  , ("M-<Space> n",       moveTo Next HiddenNonEmptyWS)
  , ("M-<Space> t",       toggleWS)
  , ("M-<Space> <Tab>",   nextScreen)
  , ("M-<Space> <Space>", swapNextScreen)
  , ("M-<Return>",        sendMessage NextLayout)
  , ("M-b c",             warpToWindow 0.5 0.5)
  ]

myEventHook = mempty

myManageHook = composeOne $ concat
  [ [ transience ]
  , [ appName  =? x -?> doIgnore       | x <- myIgnore ]
  , [ appName  =? x -?> doCenterFloat  | x <- myFloat  ]
  , [ isDialog      -?> doCenterFloat ]
  ] where
    myFloat  = ["Dialog"]
    myIgnore = ["Conky"]

myStartupHook = do
  setDefaultCursor xC_plus

CLICK TO VIEW

x

.xmobarrc(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
Config { font = "xft:Terminus:size=10"
       , bgColor = "#101010"
       , fgColor = "grey"
       , position = Top
       , lowerOnStart = True
       , hideOnStart = False
       , allDesktops = True
       , overrideRedirect = True
       , persistent = False
       , border = NoBorder
       , borderColor = "blue"
       , commands = [ Run MultiCpu   ["-t","<fc=red><autobar></fc>"]        50
                    , Run Memory     ["-t","<fc=green><usedbar></fc>"]      50
                    , Run Date       "<fc=orange>%H:%M</fc>"    "date"      50
                    , Run DynNetwork ["-m 4", "-t","<fc=lightgreen><rx><icon=/home/song/Pictures/icons/stlarch/downarrow1.xbm/><tx><icon=/home/song/Pictures/icons/stlarch/uparrow1.xbm/></fc>"]                                                    50
                    , Run XMonadLog
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%XMonadLog%}{%dynnetwork% %multicpu% %memory% %date%"
       }
 

x

Notes

We all enjoy emacs style keybinds right :3
The stlarch icons can be found in AUR.