haven't seen it? ... A sub-menu for the default apps in Puppy...
(Edit May 31st, 2015, 23 h 00, Gatineau time:
A much prettier and much faster version is here and illustrated
in following posts.)
Sooo obvious and sooo useful !
Code: Select all
#!/bin/sh
# /usr/local/bin/progs-default.sh
# But : créer un aemenu des logiciels par défaut
# dans PuppyLinux pour le gest. de fen. aewm, echinus ou autre.
# Dépendance : aemenu
# (c) musher0, 30 mai 2015.
####
cd /usr/local/bin/
ls -Algoh --file-type defau* | awk '$1 !~ /lrw/ && $7 !~ /.cdr/ && $7 !~ /.bak/ && $7 !~ /han/ { print $7 }' > liste-progs
case ${LANG:0:2} in
fr)Header="~ Par défaut ~"
Footer="~ dans Puppy ~"
Vide="Certaines entrées peuvent être vides."
;;
*)Header="~ By default ~"
Footer=" ~ in Puppy ~"
Vide="Some entries may be empty."
;;
esac
echo "menu \" $Header\"" > progs-default
echo "cmd \"~~~~~~~~~~\" \" \"" >> progs-default
for i in `cat liste-progs`;do
echo "cmd ${i#*t} $i" >> progs-default
done
echo "cmd \"~~~~~~~~~~\" \" \"" >> progs-default
echo end >> progs-default
echo "cmd \" $Footer\" \" \"" >> progs-default
echo "menu \"~~~~~~~~~\"" >> progs-default
echo "cmd \" $Vide\" \"\"" >> progs-default
echo end >> progs-default >> progs-default
echo "cmd \" ~ 'Chooser' ~\" /usr/bin/defaults-chooser" >> progs-default
aemenu -rc /usr/local/bin/progs-default
rm -f liste-progs
The wiggly line warns that some entries may be empty. The last line
invites the user to use the "Default Chooser" to fill those voids or to insert
your own default programs.
Finally, you'll need aemenu, from the aewm package, as a dependency
to get to this sub-menu profit. Don't go hunting on the 'Net, there are 2-3
ready-made, compiled, copies lying around on this board. Just put your
muzzle to the ground, and use your usual detective powers!
And don't enjoy, nah, don't bother enjoying this. Enjoyment is overrated.
Bye for now.
musher0