1. Edit your flux menu to contain the following section:
Code: Select all
[submenu] (procinfo) {}
[include] (/usr/share/commonbox/fbprocmenu.txt)
[end]
Code: Select all
#!/usr/bin/env python2.2
import sys,os,string
from time import sleep
while 1:
os.system("ps axh -o pid= -o comm= > /usr/share/commonbox/fbproc.txt")
os.system("touch /usr/share/commonbox/fbprocmenu.txt")
fh = open('/usr/share/commonbox/fbproc.txt', 'r+')
ft = open('/usr/share/commonbox/fbprocmenu.txt', 'r+')
ft.write('[begin] (procinfo) {}\n')
for line in fh.readlines():
line = line[:-1]
line = " [exec] (kill "+line+") {kill "+line+"}\n"
ft.write(line)
ft.write('[end]')
fh.close()
ft.close()
sleep(5)
os.system("rm /usr/share/commonbox/fbprocmenu.txt")
3. To run it automatically, put it to your .xinitrc:
exec fbprocmenu &
The result can be seen here.
I am sure it can be improved much, to contain more info etc.


