Guake Terminal 双屏 显示在第二屏

less than 1 minute read

在有双屏幕的时候,Guake Terminal总是显示在左边的屏幕上。而我,使用笔记本,习惯左边是扩展的大屏幕用来放文档,而termial在右边笔记本的屏幕上。需要一些Hacking或者说Debugging吧。

打开/usr/lib/guake/guake.py文件,找到

window_rect = screen.get_monitor_geometry()

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
return window_rect
修改为:
window_rect = screen.get_monitor_geometry(1)

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
return window_rect
重启Guake Terminal就大功告成了。
参考链接:
1. http://www.dotmana.com/weblog/2011/02/guake-dual-screen-options/
2. http://guake.org/ticket/201

 

Categories:

Updated: