The solution is very simple, as you want to align your Guake screen to your right hand side monitor so in starting position (x, y) of screen, y co-ordinate is going to be same i.e. it will start from 0 but x coordinate will change and it should be equal to width of you left side monitor. To be able to do this you need to do 2 things.
I. Change monitor number to 1, as suggested above. In line
window_rect = screen.get_monitor_geometry(0)
Replace 0 by 1.
II. Add first screen width in x position of starting co-ordinate. to do this.
Replace
if width < total_width:
if halignment == ALIGN_CENTER:
window_rect.x = (total_width - window_rect.width) / 2
elif halignment == ALIGN_LEFT:
window_rect.x = 0
elif halignment == ALIGN_RIGHT:
window_rect.x = total_width - window_rect.width
window_rect.y = 0
return window_rect
By
if width < total_width:
if halignment == ALIGN_CENTER:
window_rect.x += (total_width - window_rect.width) / 2
elif halignment == ALIGN_LEFT:
window_rect.x += 0
elif halignment == ALIGN_RIGHT:
window_rect.x += total_width - window_rect.width
window_rect.y = 0
return window_rect
Once you do these changes and restart guake (Quit and start again), You should get the desired alignment of Guake screen.
Hope this helps :)