From ArchWiki
< Compiz
Revision as of 18:19, 26 March 2014 by Chazza (talk | contribs) (Emerald)
Jump to: navigation, search

This article details more advanced Compiz configuration. It is assumed that you have successfully installed Compiz and have a basic, working configuration. For information on installation, basic configuration and troubleshooting, please consult the Compiz article.

Settings storage options

Configuration backends

By default, Compiz stores its configuration settings in a plain text file ~/.config/compiz-1/compizconfig/Default.ini. In ccsm this is known as 'Flat-file Configuration Backend.'

Compiz can also store its settings in the GSettings or GConf databases. To change how Compiz saves its settings open ccsm and click on the 'Preferences' tab in the left hand column. Then choose your desired backend from the list under 'Backend.'

You can also change the backend manually by editing the ~/.config/compiz-1/compizconfig/config file.

Edit the line below:

backend = ini
  • ini = Flat File Configuration Backend
  • gsettings = GSettings Configuration Backend
  • gconf = GConf Configuration Backend

Once you have edited and saved the file the change will take place immediately. There is no need to log out.


Profiles allow you to switch between different sets of Compiz settings easily. To create a new profile open ccsm and click on the 'Preferences' tab. Under 'Profile' click the plus sign to add a new profile or the minus sign to delete one. All changes made in ccsm will be written to your current profile.

Profiles are specific to the backend you are using. For instance, if you are using the GSettings backend then any new profile you create will be a GSettings profile. If you switch to a different backend then your current profile will not work and you will automatically switch to a profile available for that backend.

Note: If you see more than one profile named 'Default' this is probably because you have used more than one backend e.g. you will have a default profile for ini and a default profile for GSettings or GConf.

Window decoration themes

This section does not provide information on installing or starting a Compiz window decorator. See the following sections of the Compiz article for installing and starting a window decorator.


Many Emerald themes are available for download here. Emerald themes can be installed and managed using the emerald-theme-manager program. For downloaded themes, unzip the tarball and then install it using the 'Import' option in the theme manager.

Emerald themes are store in two locations:

  • /usr/share/emerald/themes -- system
  • ~/.emerald/themes -- user

The currently selected Emerald theme is copied into the ~/.emerald/theme directory.

Emerald settings such as window button pulse can be configured in emerald-theme-manager and are written to the ~/.emerald/settings.ini file.


Many Metacity themes are available for download here. Once downloaded, they should be unpacked into the user's ~/.themes directory (create it if it doesn't exist.) You could also place themes in /usr/share/themes if you wish. To select a theme, open dconf-editor and expand org --> gnome --> desktop --> wm and click on 'preferences.' Change the value of the key 'Theme' to the name of the theme you wish to use. By default, gtk-window-decorator uses the Adwaita metacity theme which is provided by the gnome-themes-standard package.

If changing the Metacity theme has no effect, see this section of the Compiz article.


Kwin themes can be downloaded, installed and managed using the KDE systemsettings panel.

Workspaces and Viewports

Unlike many other window managers, Compiz does not use multiple workspaces by default. Instead, it uses one workspace but splits it into multiple sections known as viewports.

If you would like to use standard workspaces, open ccsm and navigate to 'General Options' --> 'Desktop Size.' Set the 'Horizontal Virtual Size' and 'Vertical Virtual Size' to 1. Change the 'Number of Desktops' from 1 to your desired number of workspaces.

Plugins such as 'Desktop Cube' and 'Desktop Wall' are incompatible with standard workspaces. They must use Compiz's viewports. For the 'Desktop Cube' plugin to work properly, the 'Vertical Virtual Size' and 'Number of Desktops' must be set to 1. The 'Horizontal Virtual Size' should be set to 4 if you want a cube shape. Setting the 'Horizontal Virtual Size' to another value will result in a different shape being created. Set the value to 2 if you want a desktop plane.

Tip: If you are switching from viewports to standard workspaces or vice versa, you will need to restart any panels, docks or pagers that are running.

Keyboard shortcuts

Below is a list of the default keyboard shortcuts for Compiz.

  • Switch windows = Alt+Tab.
  • Switch to next desktops = Ctrl+Alt+←.
  • Switch to previous desktop = Ctrl+Alt+→.
  • Move window = Alt+Left click.
  • Resize window = Alt+Right click.

A more detailed list can be found under CommonKeyboardShortcuts in the Compiz wiki or you can always just look at your plugin's configuration.

Extra shortcuts can be added using the commands plugin in ccsm.

Edge bindings

Besides mouse and key bindings, Compiz can also assign commands to certain actions involving the screen edges e.g. dragging a window to the screen edge. For instance: the 'Rotate Cube' plugin has an option to switch to the next viewport if a window is dragged to the screen edge. Edge bindings can usually be disabled, through ccsm, by unticking 'Edge Flip' options in the plugin's settings section or by disabling actions which have the screen icon next to them in the 'Bindings' section of the relevant plugin.


Almost all Compiz functionality is implemented using plugins. Some plugins must be enabled for standard window manager functionality. Please see this section of the Compiz article for more details. Plugins that provide extra functionality, above and beyond standard window management, are discussed here.


If you want to compare two windows side by side by dragging them to the edges of the screen, similar to the 'Aero Snap' feature introduced in Windows 7, enable the 'Grid' plugin in ccsm. If you are using the 'Desktop Wall' or 'Rotate Cube' plugin then disable the 'Edge Flip' options in that plugin's section to ensure that windows do not move to the next desktop when dragged to the screen edge.

Tip: The plugin in ccsm labelled 'Snapping Windows' merely adds resistance to the edges of the screen. It does not resize windows that are dragged to the screen edge.


The 'Scale' plugin provides an option to view scaled thumbnails of all windows in the current viewport, similar to the 'Present Windows' feature in KDE or the 'Overview Mode' in GNOME Shell. Firstly, enable the plugin in ccsm. Then, to access the view, move the mouse cursor into the top right corner. The hotcorner position can be configured in the 'Bindings' tab of the plugin's settings section.

Widget Layer

The 'Widget Layer' plugin allows you to define certain windows as widgets. Widget windows are shown on a separate 'layer' of the screen. When the widget layer is hidden, all windows defined as widget windows will be iconified. By default, the widget layer is shown and hidden using F9 key.

To define a window as a widget, open ccsm and navigate to the 'Widget Layer' plugin. Click on the 'Behaviour' tab and click on the plus sign button next to the 'Widget Windows' field. In the dialog box that appears, choose 'Window Title' from the 'Type' menu. In the 'Value' field enter the title for the window you wish to define as a widget e.g. galculator.

Screen Magnification

There are two Compiz plugins that can provide magnification functionality. The first is 'Magnifier' which acts much like a magnifying glass (everything within the rectangular box will be zoomed.) The magnifier can be used by enabling the plugin in ccsm and pressing Super+m.

The other plugin is called 'Enhanced Desktop Zoom.' When this plugin is enabled, pressing the Super key and scrolling the middle mouse button will magnify the part of the desktop that is under the mouse cursor.

Crash handler

It is a good idea to enable the 'Crash handler' plugin in ccsm. This plugin ensures that if, for whatever reason, Compiz fails to start with the session or crashes at some point during the session, crash logs will be dumped and an alternative window manager will be started. To specify a window manager that can replace Compiz in the event of a crash, click on the 'Crash handler' plugin and tick the 'Start Other Window Manager' option. Then, in the 'Window Manager Command Line' field, enter a command to start the window manager of choice; see this section of the Compiz article.

Flat-file sample configurations

The following examples are posted ~/.config/compiz-1/compizconfig/Default.ini files.

Compiz 0.9.11 example with Cube, Grid and other plugins enabled (annotated)

s0_focus_prevention_level = 0 ## this disables focus prevention
s0_active_plugins = core;composite;crashhandler;opengl;decor;move;imgsvg;place;text;imgpng;imgjpeg;compiztoolbox;grid;regex;resize;wobbly;animation;workspacenames;cube;rotate;switcher; ## a list of all the enabled plugins

[rotate] ## change cube rotation settings
s0_speed = 1.850000 ## cube rotation slowed down so there is no 'bounce' when switching viewports
s0_edge_flip_dnd = false ## stops the cube from rotating when a window is dragged to the screen edge (set this if using grid)
s0_edge_flip_window = false ## same as above

s0_top_color = #a2a2a2ff
s0_bottom_color = #a2a2a2ff
s0_skydome_gradient_start_color = #f3f2ceff
s0_skydome_gradient_end_color = #87879eff
s0_skydome = true ## if skydome is set to false, the cube will be surrounded by blackness. set to true if you want a colour gradient or a picture behind your cube

s0_command = emerald --replace ## this starts emerald with compiz.

s0_start_wm = true ## if crash handler plugin is enabled, this option ensures that another window manager will be loaded if Compiz crashes
s0_wm_cmd = xfwm4 --replace ## this option defines the window manager that will replace Compiz in the event of a crash. I've chosen xfwm but it could be metacity or openbox or any other wm
s0_icon = false ## this stops icons being shown in the alt-tab switcher. only window previews are shown
s0_minimized = false ## this stops minimised windows from being shown in the switcher
s0_put_restore_key = <Super>F5 ## I've remapped the restore key to Super+F5. the original binding is Alt+F5 but it clashes with Unmaximize Window in ccsm general options
s0_outline_color = #635bac9f ## the default selection colours for grid are orange and brown. here I've changed them to shades of blue
s0_fill_color = #706a9a4f ## same as above

s0_mode = 2 ## smart window placement method chosen
s0_mode_matches = title=Application Finder;title=File Operation Progress; ## this defines windows for which I want special placement options.
s0_mode_modes = 1;1; ## placement mode 1 is centered. the windows defined above will be centered

Compiz as tiling window manager without window decorations

  • ctrl+alt+[numpad] arranges the current window
  • left and right bottom corner shows Taskbar
  • mouse control for everything (but typing ;))
  • some effects
  • & more
as_active_plugins = core;session;glib;grid;notification;workarounds;place;put;wall;regex;blur;dbus;fs;inotify;widget;animation;resize;text;mousepoll;obs;expo;fade;move;staticswitcher;mag;scale;scaleaddon;
s0_hsize = 2
s0_vsize = 2

as_show_switcher = false
s0_edgeflip_dnd = true
as_flip_down_edge = 

as_reflection = false
as_vp_brightness = 100.000000
as_expo_edge = 
as_expo_button = Button9
as_mipmaps = true
as_zoom_time = 0.150000
as_vp_distance = 0.000000

as_initiate_edge = 
as_initiate_all_button = Button8
s0_darken_back = false
s0_opacity = 100
s0_overlay_icon = 0
s0_multioutput_mode = 1
as_show_desktop = false
s0_hover_time = 100
s0_spacing = 4
s0_timestep = 0.100000
s0_speed = 2.615500

s0_window_highlight = true
s0_highlight_color = #ffffff08
s0_window_title = 0

as_zoom_in_button = <TopEdge>Button4
as_zoom_out_button = <TopEdge>Button5
s0_mode = 2
s0_radius = 600

s0_multioutput_mode = 3
s0_mode = 2

as_notification_daemon_fix = true
as_firefox_menu_fix = true
as_legacy_fullscreen = true
as_qt_fix = true
as_convert_urgency = true

as_opacity = 85 

s0_filter = 1
s0_independent_tex = true
s0_mipmap_lod = 1.700000
s0_gaussian_radius = 7
s0_alpha_blur_match = (any) & !(class=Conky)

as_put_next_output_button = Button10
s0_speed = 10.441400
s0_timestep = 0.100000 

s0_opacity_matches = type=dock | Tooltip | Menu | PopupMenu | DropdownMenu;(any) & !( | class=Gimp | class=Inkscape | class=Xfdesktop | class=Ristretto);
s0_opacity_values = 70;90;

s0_close_effects = animation:Dream;animation:Fade;animation:Fade;
s0_open_effects = animation:Magic Lamp;animation:Fade;animation:Fade;
s0_focus_effects = animation:Dodge;
s0_open_durations = 150;100;100;
s0_close_durations = 150;100;100;
s0_minimize_durations = 150;
s0_shade_durations = 150;
s0_focus_durations = 150;

s0_bg_brightness = 100
s0_fade_time = 0.250000
s0_match = type=Dock
as_toggle_edge = BottomLeft|BottomRight
s0_end_on_click = false

s0_highlight_mode = 2
s0_highlight_rect_hidden = 2
as_next_key = Disabled
as_next_no_popup_key = <Alt>Tab
as_prev_all_key = Disabled

See also