PDA

View Full Version : Compiz Desktop Menu


crdlb
February 15th, 2008, 05:05 AM
Thanks to a minor change onestone made to vpswitch today, I've been able to write a little app which acts as a desktop menu for compiz. To use it:

copy the compiz-deskmenu file to /usr/bin
copy the org.compiz_fusion.deskmenu.service file to /usr/share/dbus-1/services


Then in ccsm, set General Options > Commands > Commands > Command Line 0 (or your first unused slot) to compiz-deskmenu
and Commands > Key bindings > Run command 0 to <Control>Space

To make it work by middle-clicking on the desktop (this is the part that requires the very latest commit in vpswitch), in Viewport Switcher, set the "Plugin for initiate action" to core and the "Action name for initiate" to run_command0_key (in 0.6, you would drop the '_key', but that doesn't matter since it doesn't work in 0.6 anway)

The Window list feature requires gnome-python-desktop (for its libwnck bindings), but it will just omit the window list if that isn't installed. Launchers can be added by copying .desktop files (from /usr/share/applications) to ~/.config/compiz/deskmenu . For now, you can sort them by renaming the desktop files to be numbered in the order you want (1-epiphany.desktop, 2-gnome-terminal.desktop, etc)

And, most importantly, it will not work at all unless you're running a dbus session bus.

some-guy
February 15th, 2008, 06:17 PM
but this removes the middle-click-spin-cube functionality, doesn't it ;)

crdlb
February 15th, 2008, 06:26 PM
but this removes the middle-click-spin-cube functionality, doesn't it ;) Yup, but as a loyal user of wall, that doesn't bother me too much :)

You could skip the vpswitch step and just use it via a keybinding (like <Control>Space) if you really wanted to.

plun
February 16th, 2008, 03:18 PM
Works great, thanks !

http://pix.nofrag.com/d/8/b/08b801bdd4f7fb6e58dba72cf142a.png (http://pix.nofrag.com/d/8/b/08b801bdd4f7fb6e58dba72cf142a.html)

darkmagus
February 16th, 2008, 04:41 PM
Thanks, it'll be very useful to me :)

crdlb
February 22nd, 2008, 10:21 PM
I've rewritten it in C (so no gnome-python-desktop dependency anymore) and it now uses an XML configuration file to build the menu. The main advantage of this at the moment is that you can have submenus by putting menu tags inside of other menu tags. I'll be writing a menu editor for it next.

You can find it on git: http://gitweb.compiz-fusion.org/?p=users/crdlb/compiz-deskmenu;a=summary

plun
March 3rd, 2008, 10:31 AM
Tested and works...

python-lxml also installed

The reload function was a little confusing and
perhaps it better to always reload the xml file ?

Should it be possible to import gnome-main-menu ?

Thanks ! :)

some-guy
March 3rd, 2008, 04:20 PM
python-lxml isn't a dependency, it uses C now remember? ;)

EDIT: I stand corrected by adamk

adamk
March 3rd, 2008, 04:28 PM
python-lxml is a requirement for compiz-deskmenu-editor :-)

Adam

plun
March 3rd, 2008, 06:08 PM
python-lxml isn't a dependency, it uses C now remember? ;)



Well, the terminal never lies....:D if it it tells me that something is missing
its just to fix it... :p someone was smart an invented it...:cool:

I saw that drag and drop now was included... testing...:)

spielc
March 27th, 2008, 06:54 PM
Hey i just wanted to tell you that this plugin rocks. In my eyes this is definitely one of the most useful ones.

I do have one question tho: Everything works fine if i just define a simple executable file as a launcher but as soon as i try to do something more "complicated" it doesn't work.

for exampe: as i am a native german-speaker i'd like to use a unicode-enabled version of xterm to accomplish that you just have to add the commandline-option '-u8'. it does work perfectly if i run this command in a already running instance of xterm. but when i specify that this command as the command of a launcher it doesn't work. Smart as i am i said to myself well just put the command in a shell-script and specify this as launcher but that's not working neither. The xterm itself comes up but it looks like the arguments passed to it are dropped somehow.

As i do have some knowledge of C i had a look at your code and i suspected gdk_spawn_on_screen to misbehave and i replaced this function with execvp but as funny as it sounds that's a no-go neither. i wrote a little test-application using execvp to execute xterm -u8 and it works perfectly when i run it manually from commandline but as soon as i replace gdk_spawn_on_screen with execvp in deskmenu-menu.c it refuses to work. Well it works but it still seems to discard the parameter.

Do you have an idea what could be wrong with it?

spielc
March 28th, 2008, 06:57 PM
I think i found what the problem was: I borked my localization up somehow but now everything works as expected. So once again a big thanks for this awesome piece of software!!

gourgi
July 30th, 2008, 12:49 PM
crdlb thanks for another great application!!!
great compiz contribution!

here is a bug(?) i found:
i'm trying to make a menu launcher by using a png icon located here
/usr/local/share/trix/gfx/mail.png
but the icon is not displayed at all.
here is what i get from terminal

compiz-deskmenu-editor
/usr/bin/compiz-deskmenu-editor:97: GtkWarning: could not load image: Icon 'mail' not present in theme

self.show_all()
/usr/bin/compiz-deskmenu-editor:733: GtkWarning: could not load image: Icon 'mail' not present in theme

gtk.main()
/usr/bin/compiz-deskmenu-editor:733: GtkWarning: could not load image: Icon '/usr/local/share/trix/gfx/mail' not present in theme

gtk.main()

do i have to copy the icon to /usr/share/icons ?
maybe it is because of .png format?
or maybe because it is not a "default theme" icon ?

also is there a way to display windowlist from current viewport only ?


i'm going to play a couple days with this applications and i'll try to make how to when i learn/have enough to show.
i really really like it !! and this will save some screen space cause it surelly replaces most of my panels usage.

thanks

Michael61
August 11th, 2008, 09:49 AM
I'm using compiz 0.7.6 and the compiz-desktop plugin, compiled from source. Issuing


compiz-deskmenu


from a terminal launches the deskmenu properly under my mouse cursor. But when I try to launch it via a keybinding or viewpoint-switcher plugin, it doesn't, writing the following error:


Error: Process /usr/bin/compiz-deskmenu-menu exited with status 1


Strange! Can you help?