Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating custom GNOME menus with scripts

0 views
Skip to first unread message

Ignoramus1711

unread,
Jan 22, 2009, 1:28:41 PM1/22/09
to
Here's what I would like to do:

Write a script that adds (only if it does not exist) a custom GNOME
menu "My Custom Menu".

It would have the following structure:

My Custom Menu
Item 1
Sub-Item 1.1
Sub-Item 1.2
Item 2
Item 3

How can I populate menus using scripts? Is there something like
add-menu-to-gnome command, or some such. Thanks

--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/

noi ance

unread,
Jan 22, 2009, 8:03:51 PM1/22/09
to
On Thu, 22 Jan 2009 12:28:41 -0600, Ignoramus1711 typed this message:

> Here's what I would like to do:
>
> Write a script that adds (only if it does not exist) a custom GNOME menu
> "My Custom Menu".
>
> It would have the following structure:
>
> My Custom Menu
> Item 1
> Sub-Item 1.1
> Sub-Item 1.2
> Item 2
> Item 3
>
> How can I populate menus using scripts? Is there something like
> add-menu-to-gnome command, or some such. Thanks

That seems like a opportunity to learn the case statement
$ man bash

If you're using a desktop, you could use one of the menu editors, add a
custom menu or add a drawer to your panel, all containing your sub-items.

Florian Diesch

unread,
Jan 22, 2009, 7:30:44 PM1/22/09
to
Ignoramus1711 <ignora...@NOSPAM.1711.invalid> wrote:

> Here's what I would like to do:
>
> Write a script that adds (only if it does not exist) a custom GNOME
> menu "My Custom Menu".
>
> It would have the following structure:
>
> My Custom Menu
> Item 1
> Sub-Item 1.1
> Sub-Item 1.2
> Item 2
> Item 3
>
> How can I populate menus using scripts? Is there something like
> add-menu-to-gnome command, or some such. Thanks

See <http://standards.freedesktop.org/menu-spec/latest/> for how menus
are defined.


Florian
--
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------

Ignoramus1711

unread,
Jan 22, 2009, 9:34:25 PM1/22/09
to

I want to write a bash script to set up a GNOME menu. I do not want to
do it via GUI such as a menu editor. The reason is that the same menu
will be used by many people on many desktops, and it is dynamic by its
nature (the example I provided was a simplification).

Rob S

unread,
Jan 25, 2009, 11:30:49 PM1/25/09
to
Ignoramus1711 wrote:
> On 2009-01-23, noi ance <n...@siam.com> wrote:
>> On Thu, 22 Jan 2009 12:28:41 -0600, Ignoramus1711 typed this message:
>>
>>> Here's what I would like to do:
>>>
>>> Write a script that adds (only if it does not exist) a custom GNOME menu
>>> "My Custom Menu".
>>>
>>> It would have the following structure:
>>>
>>> My Custom Menu
>>> Item 1
>>> Sub-Item 1.1
>>> Sub-Item 1.2
>>> Item 2
>>> Item 3
>>>
>>> How can I populate menus using scripts? Is there something like
>>> add-menu-to-gnome command, or some such. Thanks
>> That seems like a opportunity to learn the case statement
>> $ man bash
>>
>> If you're using a desktop, you could use one of the menu editors, add a
>> custom menu or add a drawer to your panel, all containing your sub-items.
>
> I want to write a bash script to set up a GNOME menu. I do not want to
> do it via GUI such as a menu editor. The reason is that the same menu
> will be used by many people on many desktops, and it is dynamic by its
> nature (the example I provided was a simplification).
>
Have a gander at Zenity http://live.gnome.org/Zenity

You can write little guis that are called when certain parameters are
met in a script. I've only just started working with it and so far I'm
finding it quite useful.

--
Rob
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Frequent lock ups are a symptom of not enough memory but only in the way
that nosebleeds are a symptom of gunshot wounds to the head.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

0 new messages