Re: FVWM: Most used applications?

From: Chris Rouch <crouch_at_pobox.com>
Date: Wed, 5 May 2004 10:17:07 +0200

On Wed, 5 May 2004 00:31:55 -0400 (EDT)
Nicholas Paul Johnson <nickjohnson_at_virginia.edu> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Shay,
>
> I don't think fvwm supports this directly; but you can script it...
>
> If you could wrap all of your apps from a script which keeps a tally
> of number of times its been run, then you would be able to create such
> a menu. Unfortunately, you would still need to restart fvwm before
> this menu is updated.
>

You can make it dynamic, e.g.

+ "&Most Recent%recent.png%" Popup Recent
+ DynamicPopupAction Piperead showrecent

An quick example showrecent script - just to show it is working
dynamically:
#!/bin/bash
cat <<EOF
DestroyMenu recreate "Recent"
AddToMenu Recent
+ "`date`" Exec exec xmessage ok

EOF

The way I would implement this is to use the launch script to log to a
file what is being run, and use a showrecent script to parse this file
and decide what is appropriate to display in the "Most recent" menu. If
you add a timestamp then you can do this by count or by date. Add a cron
job to clear out everything that is too old and this would be really
sweet.

Time to start hacking.

BTW the DynamicPopupAction stuff is straight out of the man page (fvwm
2.5.10)

Chris

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed May 05 2004 - 03:20:30 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST