Skip to content

Instantly share code, notes, and snippets.

@realazizk
Created June 6, 2016 22:34
Show Gist options
  • Save realazizk/6710d3f69322db385feef77a5f76a758 to your computer and use it in GitHub Desktop.
Save realazizk/6710d3f69322db385feef77a5f76a758 to your computer and use it in GitHub Desktop.
My patch solves multiple monitor problem on Guake 0.4.4
--- guake_old 2016-06-06 17:47:33.841266053 -0400
+++ guake 2016-06-06 17:18:49.109200465 -0400
@@ -826,22 +826,21 @@
width = 100
halignment = self.client.get_int(KEY('/general/window_halignment'))
- # get the rectangle just from the first/default monitor in the
- # future we might create a field to select which monitor you
- # wanna use
- window_rect = screen.get_monitor_geometry(0)
+ # Gets the rect on the current monitor
+ window_rect = screen.get_monitor_geometry(
+ screen.get_monitor_at_window(screen.get_active_window())
+ )
total_width = window_rect.width
window_rect.height = window_rect.height * height / 100
window_rect.width = window_rect.width * width / 100
-
- 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
+
+ # 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
return window_rect
def get_running_fg_processes(self):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment