Personal tools

Xmonad/Using xmonad in Unity 2D

From HaskellWiki

< Xmonad(Difference between revisions)
Jump to: navigation, search
(New page: {{xmonad}} Category:XMonad ==Introduction== There are enough differences between the Gnome 3 and Gnome 2 panel that may cause you to look for something else. This guide will help you...)
 
(replacing XMonad Session /w working version from Nafai's config.)
 
(3 intermediate revisions by one user not shown)
Line 11: Line 11:
   
 
==Preparation==
 
==Preparation==
  +
  +
Install Unity 2D:
  +
  +
<pre>
  +
% sudo apt-get install unity-2d-panel
  +
</pre>
   
 
Create the following files:
 
Create the following files:
Line 28: Line 34:
   
   
# /usr/share/gnome-session/sessions/xmonad.desktop
+
# /usr/share/gnome-session/sessions/xmonad.session
Name=Xmonad session
+
[GNOME Session]
  +
Name=Xmonad Unity-2D Desktop
 
RequiredComponents=gnome-settings-daemon;
 
RequiredComponents=gnome-settings-daemon;
 
RequiredProviders=windowmanager;panel;
 
RequiredProviders=windowmanager;panel;

Latest revision as of 16:07, 14 October 2011

Xmonad-logo-small.png

XMonad

Contents

[edit] 1 Introduction

There are enough differences between the Gnome 3 and Gnome 2 panel that may cause you to look for something else. This guide will help you setup XMonad to be used with Unity 2D.

Unity 2D is different from Unity 3D in a few significant ways: Unity 2D comprises a set of programs (panel, launcher, etc) and allows you to choose which window manager you want to use. On the other hand, Unity 3D is a Compiz plugin, so it can be seen as a window manager (like Gnome Shell).

This guide assumes you will run Unity 2D using the Gnome 3 libraries.

[edit] 2 Preparation

Install Unity 2D:

% sudo apt-get install unity-2d-panel

Create the following files:

# /usr/share/applications/xmonad.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Xmonad
Exec=xmonad
NoDisplay=true
X-GNOME-WMName=Xmonad
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-Autostart-Notify=true


# /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


# /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
Type=XSession

[edit] 3 XMonad Setup

First, configure XMonad as you would for it to be used in Gnome. Next you need to make the following changes to your xmonad.hs:

Add the following to your manage hook:

myManageHook = composeAll [
  -- other hooks,
  , className =? "Unity-2d-panel"    --> doIgnore
  , className =? "Unity-2d-launcher" --> doIgnore
  -- more hooks

The Unity 2d panel declares 2 different window types and that seems to be confusing XMonad, so you'll have to explicitely add a gap at the top:

import XMonad.Layout.Gaps

myLayouts = gaps [(U, 24)] $
  -- your other layout configuration

Now you should be ready to login. Make sure you choose the XMonad GNOME session in GDM.

[edit] 4 Unity 2D setup

Unity 2D is still using GConf for its configuration, so using GConf Editor, look under desktop/gnome/unity-2d/launcher to see how you can tweak the launcher behavior.