[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[K12OSN] bash script: generate icewm menus

icewm-menu-gnome2  never satisfied me because it leaves out all of the
kde applications.  Then I discovered icewm-xdg-menu which is great
except it has a tendency to  hang the users session for 20 seconds
after authentication.     I put together this script that uses
icewm-xdg-menu to output a formatted file ready to be added to
/usr/share/icewm/menu.    I hope some other icewm users find this



Today="`date +%F`"
#This will generate a formatted file that can me added to /usr/share/icewm/menu.

echo "menu Applications  folder {" > icemenu-$Today

icewm-xdg-menu  | awk -F / '{print $1}' | grep menu | sed 's/prog//' |
while read line

echo $line  { >> icemenu-$Today
# Carefull, sometimes the category names don't agree.
# Run icewm-xdg-menu on the command line and make sure that
# the second word is the same as the word after  "--root-folder".
# If not, add more sed statements in a similar fashion.

name=$( echo "$line"  | awk -F'"' '{print $2}'| sed -e s'/SMART\
Board\ Software/smarttech-software/' -e s'/Sound\ &\
Video/Multimedia/' -e s'/Programming/Development/' )

/usr/bin/icewm-xdg-menu --root-folder "$name"  >> icemenu-$Today
echo } >> icemenu-$Today

echo } >> icemenu-$Today

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]