Guest User

Untitled

a guest
Jun 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. import pynotify
  2.  
  3. n = pynotify.Notification("This is my title", "This is my description")
  4. n.set_hint('x', 200)
  5. n.set_hint('y', 400)
  6. n.show()
  7.  
  8. import gtk.gdk
  9. import pynotify
  10.  
  11. n = pynotify.Notification("This is my title", "This is my description")
  12. n.set_hint('x', gtk.gdk.screen_width()/2.)
  13. n.set_hint('y', gtk.gdk.screen_height()/2.)
  14. n.show()
  15.  
  16. from Tkinter import *
  17. r = Tk()
  18. r.withdraw()
  19. width, height = r.winfo_screenwidth(), r.winfo_screenheight()
  20.  
  21. from commands import getstatusoutput
  22. status, output = getstatusoutput("xwininfo -root")
  23. width = re.compile(r"Width: (d+)").findall(output)[0]
  24. height = re.compile(r"Height: (d+)").findall(output)[0]
  25.  
  26. from win32api import GetSystemMetrics
  27. width = GetSystemMetrics (0)
  28. height = GetSystemMetrics (1)
  29. print "Screen resolution = %dx%d" % (width, height)
Add Comment
Please, Sign In to add comment