gconftool

From Noah.org
Jump to navigationJump to search


Dump repository

This is useful to see what has changed between changes when using a tool like CompizConfig Settings Manager (CCSM).

gconftool-2 --dump

Search for repository keys

You can use wild-cards (*):

$ gconftool-2 --search-key maximize_*
 /apps/metacity/window_keybindings/maximize_horizontally = disabled
 /apps/metacity/window_keybindings/maximize_vertically = disabled
 /apps/compiz/plugins/wobbly/screen0/options/maximize_effect = true
 /apps/compiz/plugins/group/screen0/options/maximize_unmaximize_all = false
 /apps/compiz/plugins/winrules/screen0/options/maximize_match = 
 /apps/compiz/general/allscreens/options/maximize_window_vertically_key = Disabled
 /apps/compiz/general/allscreens/options/maximize_window_key = <Alt>F10
 /apps/compiz/general/allscreens/options/maximize_window_horizontally_key = Disabled
...

Search for repository values

This is not built in, but you can fake it.

Search for the what was assigned to the F11 keyboard key:

$ gconftool-2 -R / | grep F11         
    maximize_vertically = <Alt>F11
    full_screen = F11
       initiate_key = <Control>F11
      maximize_window_vertically_key = <Alt>F11
    open_start_here = <Alt>F11

Then get more detail and the full repository path by search for a key that looks close to what you were looking for:

$ gconftool-2 --search-key maximize_vertically*
 /apps/metacity/window_keybindings/maximize_vertically = <Alt>F11
 /schemas/apps/metacity/window_keybindings/maximize_vertically = Schema (type: `string' list_type: '*invalid*' car_type: '*invalid*' cdr_type: '*invalid*' locale: `C')

Get the value of a repository key

$ gconftool-2 -g /apps/metacity/global_keybindings/show_desktop
<Control><Alt>d

Set repository key/values

Assign a keyboard shortcut to maximize vertically and horizontally.

gconftool-2 --type string --set /apps/compiz-1/general/screen0/options/toggle_window_maximized_vertically_key '<Control><Alt>v'
gconftool-2 --type string --set /apps/compiz-1/general/screen0/options/toggle_window_maximized_horizontally_key '<Control><Alt>h'

Script for favorite options

#!/bin/sh
gconftool-2 --type string --set /apps/compiz-1/general/screen0/options/toggle_window_maximized_vertically_key '<Control><Alt>v'
gconftool-2 --type string --set /apps/compiz-1/general/screen0/options/toggle_window_maximized_horizontally_key '<Control><Alt>h'
gconftool-2 --type=string --set /apps/compiz-1/general/screen0/options/show_desktop_key '<Control><Alt>d'
gconftool-2 --type string --set /apps/metacity/general/focus_mode 'mouse'
gconftool-2 --type boolean --set /apps/metacity/general/auto_raise false

This is for older versions of Gnome

#!/bin/sh
gconftool-2 --type=string --set /apps/compiz/general/allscreens/options/toggle_window_maximized_horizontally_key '<Control><Alt>h'
gconftool-2 --type=string --set /apps/compiz/general/allscreens/options/toggle_window_maximized_vertically_key '<Control><Alt>v'
gconftool-2 --type=string --set /apps/compiz/general/allscreens/options/show_desktop_key '<Control><Alt>d'

# gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_up 'disable'
# gconftool-2 --type=string --set /apps/metacity/window_keybindings/raise '<Ctrl><Alt>Up'
# gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_down 'disable'
# gconftool-2 --type=string --set /apps/metacity/window_keybindings/lower '<Ctrl><Alt>Down'
# gconftool-2 --type=string --set /apps/metacity/window_keybindings/activate_window_menu '<Ctrl><Alt>space'
# gconftool-2 --type=string --set /apps/metacity/window_keybindings/begin_move '<Alt>space'
# gconftool-2 --type=string --set /apps/metacity/window_keybindings/move_to_workspace_left '<shift><alt>Left'
# gconftool-2 --type=string --set /apps/metacity/window_keybindings/move_to_workspace_right '<shift><alt>Right'