Jump to content

Fluxbox Menu Icons


Recommended Posts

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

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

 

 

Thats it :P

Link to post
Share on other sites
Edit ~/.fluxbox/menu and add <> tags pointing to the icon

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

 

 

Thats it :P

 

 

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.

Link to post
Share on other sites
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

 

[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

Link to post
Share on other sites

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

 

[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

 

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 -

Link to post
Share on other sites
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.

Link to post
Share on other sites
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:

MENUFILENAME=/home/znx/.fluxbox/menu

 

To be:

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:

[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.

Link to post
Share on other sites
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.

 

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

Link to post
Share on other sites
What's the version of Fluxbox you are using? The following is a working example from Fluxbox v0.9.14-r1:

 

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

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.

Link to post
Share on other sites

OK.. so I decided that the automenu idea was a terrible solution.. so I wrote a script that should fix it up for you :D

 

Right... so lets begin..

 

Make a file ~/.fluxbox/iconmmap (TWO M's!)

aterm:/usr/share/icons/aterm.png
firefox:/usr/share/icons/firefox.png

 

The item on the left of the : is the text (inside the brackets in the menufile) that you see on the output of fluxbox. So if you see "hello there" then thats what you need. The stuff on the right of the : is the path to the icon you want alongside the text. Simple enough?

 

Once you have that in place.. you can run my script:

 

#!/bin/sh

for item in `cat ~/.fluxbox/iconmmap`
do
text=`echo $item | cut -d':' -f1`
icon=`echo $item | cut -d':' -f2`

sed -i "/(${text})/s@}.*@} <${icon}>@" ~/.fluxbox/menu
done

 

Put this in ~/bin. I called mine fluxbox-iconmmap which made sense to me :P Make sure to chmod the file to be executable.

 

After this you can run:

fluxbox-generate_menu && flubox-iconmmap

 

The first will build the menu, the second will add your choice of icons to the menu entries !

 

woot ^_^

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...