Dynamic Menus

For Dynamic menus I just made a function that acts upon any directory you feed the function, eg.

DestroyFunc DynamicMenu
AddToFunc DynamicMenu

  • I PipeRead “for files in $[FVWM_USERDIR]/$0/* ; do echo AddToMenu $0 basename $files Switch$0 basename $files ; done”

call it with DynamicMenu playlists and it will look in $[FVWM_USERDIR]/playlists and give you a menu for any files it finds, with a call to Switchplaylists which can be whatever. I even use it for my wallpaper menu with some extra scripting to get the thumbnail icons

[color=red]Edited by theBlackDragon:
–> Split from How to Mount/uMount with one Function[/color] as it’s a different subject really.