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

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

 

Right... so lets begin..

 

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



Code:
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:

 



Code:
#!/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:



Code:
fluxbox-generate_menu && flubox-iconmmap




 

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

 

woot :)

Pages: 1 2