Skip to content

Instantly share code, notes, and snippets.

@danchoi
Created October 20, 2012 14:39
Show Gist options
  • Save danchoi/3923443 to your computer and use it in GitHub Desktop.
Save danchoi/3923443 to your computer and use it in GitHub Desktop.
Setting up Xmonad in Ubuntu Oneiric

Notes on getting Xmonad running on Ubuntu 12

For setting up Xmonad on OS X Lion, click here.

Install Xmonad with sudo apt-get install xmonad.

The following settings are adapted with modifications from http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome#Ubuntu_Oneiric.

Put this configuration in /usr/share/xsessions/xmonad-gnome-session.desktop:

[Desktop Entry]
Name=Xmonad GNOME
Comment=Tiling window manager
TryExec=/usr/bin/gnome-session
Exec=gnome-session --session=xmonad

Put this configuration in /usr/share/gnome-session/sessions/xmonad.session:

[GNOME Session]
Name=Xmonad Unity-2D Desktop
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel
DefaultProvider-windowmanager=xmonad
DefaultProvider-panel=unity-2d-panel

Then save this to ~/.xmonad/xmonad.hs:

import XMonad
import XMonad.Config.Gnome
import XMonad.Layout.Gaps

myLayouts = gaps [(U,24)] 

myManageHook = composeAll (
  [ manageHook gnomeConfig
  , className =? "Unity-2d-panel" --> doIgnore
  , className =? "Unity-2d-launcher" --> doIgnore
  ])

main = xmonad gnomeConfig { manageHook = myManageHook }

Log out and log into the "XMonad GNOME" session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment