Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to use Guake at right monitor.

So I added this ppa by sudo add-apt-repository ppa:cberner/guake, and sudo apt-get update.

https://launchpad.net/~cberner/+archive/guake/+index?field.series_filter=raring

Instruction says that I can set monitor_index somehow. But I couldn't find how to configure.

Does someone know about this?

share|improve this question

2 Answers 2

I use two monitors and wanted Guake to be displayed on the right one (where by default it is displayed on the left one).

What I did was to edit my /usr/bin/guake/ file replacing the get_final_window_rect method with this:

def get_final_window_rect(self):
"""Gets the final size of the main window of guake. The height
is the window_height property, width is window_width and the
horizontal alignment is given by window_alignment.
"""
screen = self.window.get_screen()
height = self.client.get_int(KEY('/general/window_height'))
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
monitor = 1 # use the right most monitor
window_rect = screen.get_monitor_geometry(monitor)
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
        if monitor == 1:
                right_window_rect = screen.get_monitor_geometry(0)
                window_rect.x += right_window_rect.width
    elif halignment == ALIGN_LEFT:
        window_rect.x = 0
    elif halignment == ALIGN_RIGHT:
        window_rect.x = total_width - window_rect.width
window_rect.y = window_rect.y = 0
return window_rect

Basically, it uses 1 as the monitor index and later on, adds the right screen width to the start point display of the guake window

hope this helps!

share|improve this answer

I haven't tested this but I think you can just edit /usr/bin/guake since it is a python script.

Find

window_rect = screen.get_monitor_geometry(0) #line 824 on my machine

and change the 0 to the index of the monitor you want guake to display in.

share|improve this answer
    
I edited the line 0 to 1 in /usr/lib/guake/guake.py. And restart guake, but nothing changes. –  Tetsu Apr 8 at 23:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.