Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pynotify
- n = pynotify.Notification("This is my title", "This is my description")
- n.set_hint('x', 200)
- n.set_hint('y', 400)
- n.show()
- import gtk.gdk
- import pynotify
- n = pynotify.Notification("This is my title", "This is my description")
- n.set_hint('x', gtk.gdk.screen_width()/2.)
- n.set_hint('y', gtk.gdk.screen_height()/2.)
- n.show()
- from Tkinter import *
- r = Tk()
- r.withdraw()
- width, height = r.winfo_screenwidth(), r.winfo_screenheight()
- from commands import getstatusoutput
- status, output = getstatusoutput("xwininfo -root")
- width = re.compile(r"Width: (d+)").findall(output)[0]
- height = re.compile(r"Height: (d+)").findall(output)[0]
- from win32api import GetSystemMetrics
- width = GetSystemMetrics (0)
- height = GetSystemMetrics (1)
- print "Screen resolution = %dx%d" % (width, height)
Add Comment
Please, Sign In to add comment