Featured image of post Cambiar monitor guake

Cambiar monitor guake

Cuando tienes varios monitores, guake por defecto arranca en el monitor de la izquierda, para colocarlo en la derecha hay que editar el ejecutable de guake

Cuando tienes varios monitores, guake por defecto arranca en el monitor de la izquierda, para colocarlo en la derecha hay que editar el ejecutable de guake

vim /usr/bin/guake

Buscar la función get_final_window_rect y sustituirla por esta:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    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'))

        # future we might create a field to select which monitor you
        # wanna use
        #monitor = 0 # use the left most monitor
        monitor = screen.get_n_monitors() - 1 # use the right most monitor

        monitor_rect = screen.get_monitor_geometry(monitor)
        window_rect = monitor_rect.copy()
        window_rect.height = window_rect.height * height / 100
        window_rect.width = window_rect.width * width / 100

        if width < monitor_rect.width:
            if halignment == ALIGN_CENTER:
                window_rect.x = monitor_rect.x + (monitor_rect.width - window_rect.width) / 2
            elif halignment == ALIGN_LEFT:
                window_rect.x = monitor_rect.x
            elif halignment == ALIGN_RIGHT:
                window_rect.x = monitor_rect.x + monitor_rect.width - window_rect.width

        window_rect.y = monitor_rect.y
        return window_rect

Fuentes: 0

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Esto es el footer
Creado con Hugo
Tema Stack diseñado por Jimmy