gconftool

From Noah.org
Revision as of 17:02, 20 August 2010 by Root (talk | contribs)
Jump to navigationJump to search


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 keys

Assign a keyboard key to maximize vertically and horizontally.

$ gconftool-2 --type string --set /apps/compiz/general/allscreens/options/maximize_window_vertically_key "<Alt>F11"
$ gconftool-2 --type string --set /apps/compiz/general/allscreens/options/maximize_window_horizontally_key "<Alt>F12"

Scripts for favorite options

#!/bin/sh
gconftool-2 --type=string --set /apps/metacity/window_keybindings/maximize_horizontally '<Ctrl><Alt>h'
gconftool-2 --type=string --set /apps/metacity/window_keybindings/maximize_vertically '<Ctrl><Alt>v'
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'