Skip to content

Instantly share code, notes, and snippets.

@kuzux
Created July 12, 2010 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuzux/472455 to your computer and use it in GitHub Desktop.
Save kuzux/472455 to your computer and use it in GitHub Desktop.
import XMonad
import XMonad.Layout
import XMonad.Layout.ResizableTile
import XMonad.Layout.Tabbed
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Accordion
import XMonad.Layout.NoBorders
import XMonad.Layout.IM
import XMonad.Layout.Reflect
import XMonad.Config.Gnome
import XMonad.Util.EZConfig
import XMonad.Hooks.ManageDocks
import XMonad.Actions.GridSelect
import XMonad.Actions.CycleWS
main = xmonad $ gnomeConfig { terminal = "terminator",
modMask = mod4Mask,
manageHook = manageHook gnomeConfig <+> composeAll myManageHook,
layoutHook = smartBorders . avoidStruts $ myLayout,
workspaces = myWorkspaces
} `additionalKeysP` [
("M-e", goToSelected defaultGSConfig),
("M-<R>", nextWS),
("M-<L>", prevWS),
("M-s", toggleWS),
("M-C-<R>", shiftToNext >> nextWS),
("M-C-<L>", shiftToPrev >> prevWS),
("M-o", spawn "transset-df -a --dec .1"),
("M-S-o", spawn "transset-df -a --inc .1"),
("M-a", sendMessage MirrorExpand),
("M-z", sendMessage MirrorShrink),
("<Print>", spawn "gnome-screenshot --interactive"),
("S-<Print>", spawn "scrot '%d-%m-%y-%R.png' -e 'mv $f ~/Pictures/Screenshot'")
] `removeKeysP` [ "M-p" ]
myManageHook :: [ManageHook]
myManageHook =
[ resource =? "Do" --> doIgnore,
className =? "Wine" --> doFloat,
browser "Firefox",
browser "Chromium-browser",
im "Pidgin",
net_other "Transmission",
net_other "Gwibber",
net_other "Xchat",
net_other "Software-center",
net_other "Synaptic",
docs "Evince",
gimp "Gimp-2.6",
media "Vlc",
media "Totem",
media "Banshee",
media "Rhythmbox"]
where browser = associate "Browser"
im = associate "IM"
net_other = associate "Net-Other"
docs = associate "Docs"
media = associate "Media"
gimp = associate "Gimp"
myWorkspaces :: [String]
myWorkspaces = ["Browser", "IM", "Net-Other", "Docs", "Terminal1", "Terminal2", "Games", "Gimp", "Media"]
associate :: WorkspaceId -> String -> ManageHook
associate area wmClass = className =? wmClass --> doShift area
myTabbed = noBorders $ tabbedBottom shrinkText myTheme
where myTheme = defaultTheme { decoHeight = 21 }
myLayout = onWorkspace "Browser" (Full ||| myTabbed) $
onWorkspace "IM" tiled $
onWorkspace "Gimp" (gimpLayout ||| standardLayout) $
onWorkspace "Docs" (Mirror Accordion ||| standardLayout) $
standardLayout
where standardLayout = tiled ||| Mirror tiled ||| (noBorders Full) ||| myTabbed
tiled = ResizableTall 1 (3/100) (1/2) []
gimpLayout = withIM (0.11) (Role "gimp-toolbox") $
reflectHoriz $ withIM (0.15) (Role "gimp-dock") Full
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment