Advertisement
phjoe

ss update

Feb 14th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import appuifw as A
  2. import appswitch
  3. import fgimage
  4. import graphics as G
  5. import time
  6.  
  7. home = [u'Phone', u'Telephone', u'Telepon', u'Standby', u'Standby Mode']
  8.  
  9. ly=G.sysinfo.display_pixels()
  10. img=G.Image.new((ly[0],20))
  11. fg=fgimage.FGImage()
  12. run=1
  13.  
  14. def exit():
  15.  global run
  16.  run = 0
  17.  
  18. def shot():
  19.  for x in home:
  20.   try:
  21.    appswitch.switch_to_fg(x)
  22.   except:pass
  23.  A.e32.ao_sleep(0.01)
  24.  s=G.screenshot()
  25.  return s
  26.  
  27. ss=shot()
  28.  
  29. def hide():
  30.  global ss
  31.  fg.unset()
  32.  ss=None
  33.  
  34. def show():
  35.  global ss
  36.  if not ss:
  37.   ss=shot()
  38.  img.clear(0)
  39.  img.blit(ss,target=(0,-44))
  40.  jam=time.ctime()
  41.  img.text((5,14), u'%s' %jam,0)
  42.  fg.set(0,44,img._bitmapapi())
  43.  
  44. A.app.exit_key_handler=exit
  45. while run:
  46.  if appswitch.application_list(1)[0] in home:
  47.   show()
  48.  else:
  49.   hide()
  50.  A.e32.ao_sleep(0.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement