16

Other than looking though each active plugin and manually searching for keybindings / keyboard-shortcuts in use by compiz, is there a 'simple' way to gather this information?

i.e. Some panel that displays all currently active keybindings in use (by compiz), or some terminal command to do same.

Keyboard-shortcuts does not appear to list certain specific compiz shortcuts.

Thanks

Jay_11
  • 173

3 Answers3

12

Here's a (very long) one-liner that returns all shortcuts from all active plugins:

for i in $(gconftool-2 --get /apps/compiz-1/general/screen0/options/active_plugins|sed "s/\[\|\]//g"|sed "s/,/ /g"); do echo "# $i:"; gconftool-2 -a /apps/compiz-1/plugins/"$i"/screen0/options | grep "_key\|_button\|trigger_\|initiate\ \|panel_first_menu\|keyboard_focus\|execute_command\|show_launcher" | grep -v "Disabled\|=[[:space:]]*$" | sort; done; echo -e "\n# metacity overrides:"; gconftool-2 -a /apps/metacity/global_keybindings | grep -v "disabled\|cycle\|switch_panels" | sort; gconftool-2 -a /apps/metacity/window_keybindings | grep -v "disabled" | sort

Update:
Above version now gets all non-empty/disabled keybindings (key, mouse, key+mouse) from all active plugins.

However, the value of the key X-GNOME-WMSettingsModule in /usr/share/applications/compiz.desktop makes Metacity override several Compiz keys. You will notice the italic labels in ccsm - that's when the value comes from Metacity and not Compiz.

As I found no easy way to fix this, I simply added all Metacity shortcuts to the end of the output.

htorque
  • 64,798
  • 1
    That seems to do the job very nicely, thanks. Although it does return show_desktop_key = d, rather than d as I have redefined it. – Jay_11 May 13 '11 at 13:11
  • Now that's weird... changing the wall "left_key" changes "/apps/metacity/global_keybindings/switch_to_workspace_left" instead. Seems some keybindings you change in Compiz are set for metacity? That would make the task a bit harder. :-/ – htorque May 13 '11 at 13:48
  • Thank you for the update. Now shows the modified value for reveal desktop under # metacity overrides: -- Very nice job, Thanks again. – Jay_11 May 14 '11 at 11:37
  • Note that since there are multiple commands there, if you want to save the output in a file, you should wrap that whole thing in parens and redirect the output after the trailing paren. – nealmcb Jun 23 '12 at 21:44
  • Thanks! I note that in Precise 12.04, metacity doesn't seem to be running, so I guess folks would want to leave those last two parts out? It might be easier to see and understand it all if you used multiple lines. – nealmcb Jun 23 '12 at 21:46
  • 1
    This no longer works as of 14.04: No value set for /apps/compiz-1/general/screen0/options/active_plugins – Jonathan Hartley Nov 18 '15 at 20:01
1

You don't need to chain 2 sed scripts, they could be one, separated by ';'. But even simpler would be piping to tr. For 12.04 without metacity this should be:

for i in $(gconftool-2 --get /apps/compiz-1/general/screen0/options/active_plugins|tr '[],' ' '); do echo "# $i:"; gconftool-2 -a /apps/compiz-1/plugins/"$i"/screen0/options | grep "_key\|_button\|trigger_\|initiate\ \|panel_first_menu\|keyboard_focus\|execute_command\|show_launcher" | grep -v "Disabled\|=[[:space:]]*$" | sort; done

However, as Jay_11 already noted, the whole construct seems to show part of what goes into compiz, not the result. E.g. I get close_window_key = <Alt>F4, but I turned that off. As an avid Emacs user I don't let a window manager get near anything except <Super>, but this doesn't show!

So the question remains: What is compiz really doing?

Daniel
  • 159
-2

i got a nice webpage for this ;)

https://web.archive.org/web/20110430205154/http://ranjith.zfs.in/ubuntu-10-04-compiz-fusion-keyboard-shortcuts/

janot
  • 1,672
glaasje
  • 220