guest@dotshare [~/groups/wms/xmonad] $ ls My-old-XMonad-config/ | cat

My old XMonad config (raw, dl)

eddiegj Dec 07, 2013 (wms/xmonad)
  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
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
import XMonad
import Data.Monoid
import System.Exit
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.Place
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.EwmhDesktops
import XMonad.Actions.CycleWS
--import XMonad.Layout.Spiral
import XMonad.Layout.Spacing
import XMonad.Layout.Tabbed
import XMonad.Layout.NoBorders
--import XMonad.Layout.PerWorkspace

import qualified XMonad.StackSet as W
import qualified Data.Map        as M

varFocusFollowsMouse    :: Bool
varClickJustFocuses	    :: Bool
varMyLogHook            :: X ()


-- SETTING VARIABLES
-- =================================================================================
varFocusFollowsMouse    = True
varClickJustFocuses     = False
varBorderWidth          = 0
varBorderColor          = "#0099CC"
varBorderFocusColor     = "#7EC0EE"
varXmonadKey            = mod1Mask
varAppKey               = mod4Mask
varWorkspaces           = ["default","web","text","term","video", "audio"]
varFadeAmount           = 0.4
varOpenAsRoot           = "gksu -u root"

-- APPLICATION VARIABLES
-- =================================================================================
varTerminalApp          = "urxvt"
varAppTerminalApp       = "urxvt -fg green"
varRootTerminalApp      = varOpenAsRoot ++ " 'urxvt -fg redI   '"
varMusicApp             = varAppTerminalApp ++ " mocp"
varVideoApp             = "vlc"
varBrowserApp           = "chromium"
varPrivateBrowserApp    = varBrowserApp ++ " --incognito"
varMailApp              = varBrowserApp ++ " --app=http://mail.google.com"
varFileMngrApp          = "pcmanfm"
varRunApp               = "gmrun"
varSoundApp             = varAppTerminalApp ++ " -class pop-up -g 120x30  -e 'alsamixer --card=0'"
varTextApp              = "sublime_text"
varSreenshotApp         = varAppTerminalApp ++ " -class pop-up -g 50x1 -e 'scrot -c -d 5 -e mv -v $f ~/Afbeeldingen/Screenshots'"

varApp1Name           = "Tumblr"
varUserApp1             = varBrowserApp ++ " --app=http://tumblr.com  --user-data-dir=/home/eddie/.config/google-chrome/tumblr"
varApp2Name           = "Tumblr 2"
varUserApp2             = varBrowserApp ++ " --app=http://tumblr.com  --user-data-dir=/home/eddie/.config/google-chrome/tumblr2"
varApp3Name           = "Tumblr 3"
varUserApp3             = varBrowserApp ++ " --app=http://tumblr.com  --user-data-dir=/home/eddie/.config/google-chrome/tumblr3"
varApp4Name           = "Facebook"
varUserApp4             = varBrowserApp ++ " http://facebook.com/"
varApp5Name           = "Undefined"
varUserApp5             = ""
varApp6Name           = "Undefined"
varUserApp6             = ""
varApp7Name           = "Undefined"
varUserApp7             = ""
varApp8Name           = "Undefined"
varUserApp8             = ""
varApp9Name           = "KeePassX"
varUserApp9             = "keepassx"
varApp10Name          = "Connect thuis"
varUserApp10            = varAppTerminalApp ++ " '/opt/tools/bin/connect thuis'"
varApp11Name          = "GTK Theme"
varUserApp11            = "lxappearance"
varApp12Name          = "Maik Cam"
varUserApp12            = varVideoApp ++ " /home/eddie/BabyCam.m3u"


-- HELP MENU
-- =================================================================================
varHelp = unlines ["",
        " -- Start Applications [AppKey]",
        " ==================================================",
        " Terminal",
        "    ===[ AppKey-Return ]===",
        " Run Program",
        "    ===[ AppKey-R ]===",
        " Browser",
        "    ===[ AppKey-B ]===",
        " Private Browser",
        "    ===[ AppKey-Shift-T ]===",
        " eMail",
        "    ===[ AppKey-E ]===",
        " Music player",
        "    ===[ AppKey-M ]===",
        " Video Player",
        "    ===[ AppKey-V ]===",
        " Text Editor",
        "    ===[ AppKey-T ]===",
        " File Manager",
        "    ===[ AppKey-F ]===",
        " Manage Sound",
        "    ===[ AppKey-S ]===",
        " Screenshot",
        "    ===[ PrtSc ]===",
        "",
        " -- User Definable keys [Function keys]",
        " Appkey-F1  ----- " ++ varApp1Name,
        " Appkey-F2  ----- " ++ varApp2Name,
        " Appkey-F3  ----- " ++ varApp3Name,
        " Appkey-F4  ----- " ++ varApp4Name,
        " Appkey-F5  ----- " ++ varApp5Name,
        " Appkey-F6  ----- " ++ varApp6Name,
        " Appkey-F7  ----- " ++ varApp7Name,
        " Appkey-F8  ----- " ++ varApp8Name,
        " Appkey-F9  ----- " ++ varApp9Name,
        " Appkey-F10 ----- " ++ varApp10Name,
        " Appkey-F11 ----- " ++ varApp11Name,
        " Appkey-F12 ----- " ++ varApp12Name,
        "",
        "",
        " -- Desktop Keys [ModKey]",
        " ==================================================",
        " Close",
        " ----- modKey-Shift-K",
        " Rotate Layout",
        " ----- modKey-Space",
        " Push back in to tiling",
        " ----- modKey-Shift-F",
        " Go To Next Window",
        " ----- modKey-Tab",
        " Go To Previous Window",
        " ----- modKey-Shift-Tab",
        " Rotate Layout",
        " ----- modKey-Space ]===",
        " Rotate Layout",
        " ----- modKey-Space ]===",
        " Rotate Layout",
        " ----- modKey-Space ]===",
        " Rotate Layout",
        " ----- modKey-Space ]===",

        "modKey-Shift-f         Unfloat - Push in to tiling",
        "modKey-Shift-Tab       Go To Next Window",
        "modKey-Return          Swap with Master",
        "modKey-Up              Shrink Master Area",
        "modKey-Down            Expand Master Area",
        "modKey-Left            Previous Workspace",
        "modKey-Right           Next Workspace",
        "",
        "modKey-Shift-i         Show this help menu",
        "modKey-q               Reconfigure",
        "modKey-Shift-q         Logout"]
        --"modKey-Shift-space     Reverse Rotate Layout",
        --"modKey-f               Float - Push out of tiling",

-- XMONAD LAYOUT
-- =================================================================================
varLayout =  spacing 3 $ simpleTabbed ||| Mirror tiled ||| tiled ||| noBorders Full
    where
        tiled   = Tall nmaster delta ratio
        nmaster = 1
        ratio   = 1/2
        delta   = 3/100


-- Hooks
-- =================================================================================
varManageHook = placeHook simpleSmart <+> composeAll
-- varManageHook = composeAll
    [ className                                  =? "toWSAudio"          --> doShift "audio"
    , className                                  =? "toWSVideo"          --> doShift "video"
    , className                                  =? "toWSDefault"        --> doShift "default"
    , className                                  =? "toWSWeb"            --> doShift "web"
    , className                                  =? "toWStext"           --> doShift "text"
    , className                                  =? "toWSTerm"           --> doShift "term"
    , stringProperty "WM_WINDOW_ROLE"            =? "pop-up"             --> doFloat
    , appName                                    =? "mail.google.com"    --> doFloat
    , appName                                    =? "feh"                --> doFullFloat
    , className                                  =? "Vlc"                --> doFloat
    , className                                  =? "pop-up"             --> doFloat
    , className                                  =? "Xmessage"           --> doFloat
    , className                                  =? "Gxmessage"          --> doFloat
    , className                                  =? "Lxappearance"       --> doFloat
    , isFullscreen                                                       --> doFullFloat
    , isDialog                                                           --> doFloat ]


-- KEYS
-- ================================================================================
varKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $


   -- APPLICATION KEYS
   -- -----------------------------------------------------------------------------

    -- launch Terminal
    [ ((varAppKey,		                 xK_Return), spawn varTerminalApp)
    , ((varAppKey .|. shiftMask,         xK_Return), spawn varRootTerminalApp)

    -- launch Video
    , ((varAppKey,                       xK_v     ), spawn varVideoApp)

    -- launch Music
    , ((varAppKey,                       xK_m     ), spawn varMusicApp)

    -- launch Sound Manager
    , ((varAppKey,                       xK_s     ), spawn varSoundApp)

    -- launch Sound Manager
    , ((varAppKey,                       xK_f     ), spawn varFileMngrApp)

    -- launch text Editor
    , ((varAppKey,                       xK_t     ), spawn varTextApp)

    -- launch Browser
    , ((varAppKey,                       xK_b     ), spawn varBrowserApp)
    , ((varAppKey .|. shiftMask,         xK_b     ), spawn varPrivateBrowserApp)

    -- launch Mail
    , ((varAppKey,                       xK_e     ), spawn varMailApp)

    -- print Sreen
    , ((0,                               xK_Print ), spawn varSreenshotApp)

    -- User Apps - Function keys
    , ((varAppKey,                       xK_F1    ), spawn varUserApp1)
    , ((varAppKey,                       xK_F2    ), spawn varUserApp2)
    , ((varAppKey,                       xK_F3    ), spawn varUserApp3)
    , ((varAppKey,                       xK_F4    ), spawn varUserApp4)
    , ((varAppKey,                       xK_F5    ), spawn varUserApp5)
    , ((varAppKey,                       xK_F6    ), spawn varUserApp6)
    , ((varAppKey,                       xK_F7    ), spawn varUserApp7)
    , ((varAppKey,                       xK_F8    ), spawn varUserApp8)
    , ((varAppKey,                       xK_F9    ), spawn varUserApp9)
    , ((varAppKey,                       xK_F10   ), spawn varUserApp10)
    , ((varAppKey,                       xK_F11   ), spawn varUserApp11)
    , ((varAppKey,                       xK_F12   ), spawn varUserApp12)

    -- XF86AudioLowerVolume
    , ((controlMask,                     xK_Up    ), spawn "amixer set Master playback 3-")
    -- XF86AudioRaiseVolume
    , ((controlMask,                     xK_Down  ), spawn "amixer set Master playback 3+")
    -- XF86AudioMute
    , ((controlMask,                     xK_space ), spawn "amixer set Master playback 0")

    -- launch gmrun
    , ((varAppKey,		                 xK_r     ), spawn varRunApp)
    , ((varAppKey .|. shiftMask,         xK_r     ), spawn varOpenAsRoot)


   -- WINDOW MANAGEMENT KEYS
   -- ------------------------------------------------------------------------------

    -- close focused window
    , ((varXmonadKey .|. shiftMask, 	  xK_k     ), kill)

     -- Rotate through the available layout algorithms
    , ((varXmonadKey,                     xK_space ), sendMessage NextLayout)
    --, ((varXmonadKey .|. shiftMask,       xK_space ), sendMessage PrevLayout)

    -- Move focus to the next window
    , ((varXmonadKey,                     xK_Tab   ), windows W.focusDown)

    -- Move focus to the previous window
    , ((varXmonadKey .|. shiftMask,       xK_Tab   ), windows W.focusUp  )

    -- Swap the focused window and the master window
    , ((varXmonadKey,                     xK_Return), windows W.swapMaster)

    -- Shrink the master area
    , ((varXmonadKey,                     xK_Up    ), sendMessage Shrink)

    -- Expand the master area
    , ((varXmonadKey,                     xK_Down  ), sendMessage Expand)
 
    -- Move to previous workspace
   , ((varXmonadKey,                      xK_Left  ), prevWS)

    -- Move to next workspace
    , ((varXmonadKey,                     xK_Right ), nextWS)

    -- Push window back into tiling
    , ((varXmonadKey .|. shiftMask,       xK_f ), withFocused $ windows . W.sink)
    -- , ((varXmonadKey,                     xK_f ), withFocused $ windows . doFloat)

    -- Quit xmonad
    , ((varXmonadKey .|. shiftMask,       xK_q     ), io (exitWith ExitSuccess))

    -- Restart xmonad
    , ((varXmonadKey,                     xK_q     ), spawn "xmonad --recompile; xmonad --restart")

    -- Run xmessage with a summary of the default keybindings (useful for beginners)
    , ((varXmonadKey .|. shiftMask,       xK_i     ), spawn ("echo \"" ++ varHelp ++ "\" | gxmessage -wrap -file -"))


    -- Media Keys
    , ((0,                          0x1008ff12  ), spawn "vol mute") -- XF86AudioMute
    , ((0,                          0x1008ff11  ), spawn "vol down") -- XF86AudioLowerVolume
    , ((0,                          0x1008ff13  ), spawn "vol up") -- XF86AudioRaiseVolume
    ]



varMyLogHook = fadeInactiveLogHook fadeAmount
	where fadeAmount = varFadeAmount

main = xmonad $ withUrgencyHook dzenUrgencyHook { args = ["-bg", "darkgreen", "-xs", "1"] }
               $ defaultConfig
        { modMask               = varXmonadKey
        , terminal              = varTerminalApp
        , borderWidth           = varBorderWidth
        , workspaces            = varWorkspaces
        , normalBorderColor     = varBorderColor
        , focusedBorderColor    = varBorderFocusColor
        , keys                  = varKeys
        , layoutHook            = varLayout
        , logHook               = varMyLogHook
        , manageHook            = varManageHook
        , handleEventHook       = fullscreenEventHook
        }

CLICK TO VIEW

x

Notes

An old config found on my pc for xmonad, i have no screenshot for this anymore. You could use this script for refferences to build your own config