Linux-Noob Forums

Full Version: Fluxbox Menu Icons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

How do I set up my fluxbox menu to have icons?

[/url][url=http://fluxbox.sourceforge.net/zoom.php?sh...ro_fluxbox3.jpg]http://fluxbox.sourceforge.net/zoom.php?sh...ro_fluxbox3.jpg


Edit ~/.fluxbox/menu and add <> tags pointing to the icon



Code:
[exec] (my wonderful life)  {rm ~znx/life} </usr/share/pixmaps/znxlives.png>




 

 

Thats it :P


Quote:Edit ~/.fluxbox/menu and add <> tags pointing to the icon

Code:
[exec] (my wonderful life)  {rm ~znx/life} </usr/share/pixmaps/znxlives.png>

<div>


 

 

Thats it :P

</div>
 

 

I have got to the ~/.fluxbox/menu but I don't know where to add the [exec] (my wonderful life) {rm ~znx/life} </usr/share/pixmaps/znxlives.png>

 

Where do I put the [exec]

What is (my wonderful life) refurring to, just something in the menu?? and {rm ~znx/life}

znx your user and what is the /life ?

 

The path for the icon is understandable.


Quote:I have got to the ~/.fluxbox/menu but I don't know where to add the [exec] (my wonderful life) {rm ~znx/life} </usr/share/pixmaps/znxlives.png> 

Where do I put the [exec]

What is (my wonderful life) refurring to, just something in the menu?? and {rm ~znx/life}

znx your user and what is the /life ?

 

The path for the icon is understandable.
 

hehe, OK that was an example entry, you will need to understand how fluxbox builds its menus

 



Code:
[exec] (Terminal) {aterm -tr +sb) </usr/share/icons/aterm.png>
[exec] (FireFox) {firefox} </usr/share/icons/firefox.xpm>




 

These are examples, you will need to edit the paths ..

 

the [exec] means that this is a command statement (i.e. a program link in the menu)

the (Terminal) is the text that will be shown in the menu

the {aterm -tr +sb} is the command that it will execute when I click on the menu

the </usr/share/icons/aterm.png> is the icon that will be shown alongside the (Terminal) text


Quote:<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentcommentid="7373" data-ipsquote-username="Navrax" data-cite="Navrax" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="2058" data-ipsquote-contentclass="forums_Topic"><div>
I have got to the ~/.fluxbox/menu but I don't know where to add the [exec] (my wonderful life) {rm ~znx/life} </usr/share/pixmaps/znxlives.png>

 

Where do I put the [exec]

What is (my wonderful life) refurring to, just something in the menu?? and {rm ~znx/life}

znx your user and what is the /life ?

 

The path for the icon is understandable.
 

hehe, OK that was an example entry, you will need to understand how fluxbox builds its menus

 



Code:
[exec] (Terminal) {aterm -tr +sb) </usr/share/icons/aterm.png>
[exec] (FireFox) {firefox} </usr/share/icons/firefox.xpm>




 

These are examples, you will need to edit the paths ..

 

the [exec] means that this is a command statement (i.e. a program link in the menu)

the (Terminal) is the text that will be shown in the menu

the {aterm -tr +sb} is the command that it will execute when I click on the menu

the </usr/share/icons/aterm.png> is the icon that will be shown alongside the (Terminal) text



</div></blockquote>
 

I absolutely must be doing something wrong somewhere. I've edited the config just as you've demonstrated and fluxbox-generate_menu to see results but nothing. Where might I be going wrong?

i'm also using 16x16 icons. I've used both .xpm and .png -


Quote:I've edited the config just as you've demonstrated and fluxbox-generate_menu to see results but nothing.
Ehm, did you run 'fluxbox-generate_menu' after you modified the file? If yes then that is your problem. This command is used to generate a generic menu if you don't already have one. And if you've edited the menu file and called 'fluxbox-generate_menu' afterwards your original menu file gets overwritten by the generic one (check for a backup in ~/.fluxbox/menu.bak). In Fluxbox it is not necessary to run any command after you've edited ~/.fluxbox/menu, the changes get applied immediately when saving the file.


Quote:I've edited the config just as you've demonstrated and fluxbox-generate_menu to see results but nothing.
 

What you can do is one of two things, create a file called usermenu in the ~/.fluxbox directory, this will get auto appended to your menu file, of course this means that you loose the ability to edit the main menu file.

 

OR

 

So what you can do instead is this:

 

Edit ~/.fluxbox/menuconfig and alter:



Code:
MENUFILENAME=/home/znx/.fluxbox/menu




 

To be:



Code:
MENUFILENAME=/home/znx/.fluxbox/automenu




 

What this will do is make the generate command create the automenu file instead of the main menu file. You can then edit the main menu file to your hearts content and not loose content when you run the generate command.

 

To continue to gain the benefit of the generate command you can add this to the ~/.fluxbox/menu:



Code:
[include] (/home/znx/.fluxbox/automenu)




 

Of course this will mean duplication, lots of it .. but then you can have a personal icon'd menu with the addition of an auto menu.


Quote:<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentcommentid="7385" data-ipsquote-username="Navrax" data-cite="Navrax" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="2058" data-ipsquote-contentclass="forums_Topic"><div>I've edited the config just as you've demonstrated and fluxbox-generate_menu to see results but nothing.
Ehm, did you run 'fluxbox-generate_menu' after you modified the file? If yes then that is your problem. This command is used to generate a generic menu if you don't already have one. And if you've edited the menu file and called 'fluxbox-generate_menu' afterwards your original menu file gets overwritten by the generic one (check for a backup in ~/.fluxbox/menu.bak). In Fluxbox it is not necessary to run any command after you've edited ~/.fluxbox/menu, the changes get applied immediately when saving the file.



</div></blockquote>
 

Even when i re-edit the config and don't use fluxbox-generate_menu the icons still do not show up and their paths are correct in the ~/.fluxbox/menu


What's the version of Fluxbox you are using? The following is a working example from Fluxbox v0.9.14-r1:

 



Code:
[exec] (Gaim) {gaim} </usr/share/pixmaps/gaim.png>





Quote:What's the version of Fluxbox you are using? The following is a working example from Fluxbox v0.9.14-r1: 



Code:
[exec] (Gaim) {gaim} </usr/share/pixmaps/gaim.png>

<div>


</div>
As it turns out THIS linux-noob was doing everything in root. I switched to my average-user and everything worked out great. Thanks guys.

Pages: 1 2