python 在右侧显示器上打开guake

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 在右侧显示器上打开guake相关的知识,希望对你有一定的参考价值。

    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 = 0
        return window_rect

以上是关于python 在右侧显示器上打开guake的主要内容,如果未能解决你的问题,请参考以下文章

guake 3.4发布,支持切分窗口

Guake Terminal ── linux下完美帅气的终端

Ubuntu 安装Guake

vscode打开多个文件

ubuntu系统下使用终端安装guake出现错误的解决办法

text Guake修复退出选项卡