cd /
;
apropos
;
find *
;
On peut l'utiliser pour générer un menu dans fluxbox :
#!/bin/sh # Licence MIT # author: prx <prx@si3t.ch> # fill ~/.config/lsdesktop.exclude with files to # ignore. Example : # $ cat ~/.config/lsdesktop.exclude # xdvi.desktop # mimeinfo.desktop # put menus in ~/.fluxbox/automenus/ cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" cache="$cachedir/lsdesktop.cache" menudir=$HOME/.fluxbox/automenus/ desktopfilespath="$HOME/.local/share/applications \ /usr/local/share/applications\ /usr/share/applications" fluxboxmenu() { OLDIFS=$IFS IFS=':' while read -r c n cmd; do echo "[exec] (${n}) {${cmd}}" done IFS=$OLDIFS } # update application list if [ ! -f "${cache}" -o -n "$(find ${desktopfilespath} -newer ${cache} 2>/dev/null)" ] then lsdesktop -s ':' > ${cache} mkdir -p $menudir # a menu file for each categories grep "^Graphics" ${cache} | fluxboxmenu > $menudir/graphics.menu grep "^Development" ${cache} | fluxboxmenu > $menudir/development.menu grep "^Settings" ${cache} | fluxboxmenu > $menudir/settings.menu grep "^System" ${cache} | fluxboxmenu > $menudir/system.menu grep "^Utility" ${cache} | fluxboxmenu > $menudir/utility.menu grep "^Game" ${cache} | fluxboxmenu > $menudir/game.menu grep "^Network" ${cache} | fluxboxmenu > $menudir/network.menu grep "^Office" ${cache} | fluxboxmenu > $menudir/office.menu grep "^Multimedia" ${cache} | fluxboxmenu > $menudir/multimedia.menu fi
Ou encore avec dmenu :
#!/bin/sh # Licence MIT # author: prx <prx@si3t.ch> # print a list of available .desktop files in dmenu # works well with dmenu mouse patch # https://tools.suckless.org/dmenu/patches/mouse-support/ ## # require lsdesktop # https://si3t.ch/code/lsdesktop/ ## # fill ~/.config/lsdesktop.exclude with files to # ignore. Example : # $ cat ~/.config/lsdesktop.exclude # xdvi.desktop # mimeinfo.desktop cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" cache="$cachedir/ddesktop" desktopfilespath="$HOME/.local/share/applications /usr/local/share/applications" if [ ! -f "${cache}" -o -n "$(find ${desktopfilespath} -newer ${cache} 2>/dev/null)" ] then lsdesktop -s '::' | cut -d'::' -f2- | column -t -s '::' > ${cache} fi p="Run:" cat ${cache} |\ match -p "$p" | \ sed -e 's/^.* //g' |\ ${SHELL:-"/bin/sh"} &