Open smirnov-vs opened 8 years ago
I know this pbl...
Untested but something like this should fix it:
diff --git a/src/guake/guake_app.py b/src/guake/guake_app.py
index d8caf9b..346f12f 100644
--- a/src/guake/guake_app.py
+++ b/src/guake/guake_app.py
@@ -947,6 +947,7 @@ class Guake(SimpleGladeApp):
# and the width of unity dock. => unity_dock
found = False
unity_hide = 0
+ unity_position = "Left"
# float() conversion might mess things up. Add 0.01 so the comparison will always be
# valid, even in case of float("10.10") = 10.099999999999999
if float(platform.linux_distribution()[1]) + 0.01 >= 12.10:
@@ -957,6 +958,9 @@ class Guake(SimpleGladeApp):
unity_dock = int(subprocess.check_output(
['/usr/bin/dconf', 'read',
'/org/compiz/profiles/unity/plugins/unityshell/icon-size']) or "48")
+ unity_position = subprocess.check_output(
+ ['/usr/bin/dconf', 'read',
+ '/com/canonical/unity/launcher/launcher-position']) or "Left"
found = True
except:
# in case of error, just ignore it, 'found' will not be set to True and so
@@ -971,7 +975,7 @@ class Guake(SimpleGladeApp):
unity_dock = unity_icon_size + 17
# launcher_hide_mode = 1 => autohide
- if unity_hide != 1:
+ if unity_hide != 1 and unity_position == "Left":
log.debug("correcting window width because of launcher width %s "
"(from %s to %s)",
unity_dock,
I run a setup with dual monitors. Guake on the left monitor and unity launcher on the right monitor in the left position. It doesn't appear the current code accounts for a screen with no unity launcher. At least in my situation, a quick workaround is to comment out the width correction code.
Ubuntu 14.04 Guake 0.8.5
If you'll move unity bar to bottom, guake would not be full width.