Пример #1
0
 def cmd_focus_next_monitor(self):
     monitor = Monitor.current_monitor_from_list(self.monitors)
     nextMonitor = Utility.next_item(self.monitors, monitor)
     if(nextMonitor and nextMonitor.tilers[self.group].has_windows()):
         window = nextMonitor.tilers[self.group].get_current_window()
         if(window != None):
             window.focus()
Пример #2
0
 def cmd_move_to_next_monitor(self):
     window = Window.focused_window(self.windows)
     # if(window.validate()):
     monitor = Monitor.monitor_from_window_in_list(self.monitors, window)
     nextMonitor = Utility.next_item(self.monitors, monitor)
     if(monitor != nextMonitor):
         tiler = monitor.tilers[self.group]
         nextTiler = nextMonitor.tilers[self.group]
         tiler.remove_window(window)
         nextTiler.add_window(window)
         window.focus()
Пример #3
0
    def cmd_focus_next_monitor(self):

        monitor = Monitor.current_monitor_from_list(self.monitors) 

        nextMonitor = Utility.next_item(self.monitors, monitor)

        if nextMonitor and nextMonitor.tilers[self.group].windows:

            window = nextMonitor.tilers[self.group].windows[0]

            if not window.focus():

                nextMonitor.tilers[self.group].remove_window(window)
Пример #4
0
    def cmd_focus_next_monitor(self):

        monitor = Monitor.current_monitor_from_list(self.monitors)

        nextMonitor = Utility.next_item(self.monitors, monitor)

        if nextMonitor and nextMonitor.tilers[self.group].windows:

            window = nextMonitor.tilers[self.group].windows[0]

            if not window.focus():

                nextMonitor.tilers[self.group].remove_window(window)
Пример #5
0
    def focus_next(self):
        """
        Sets focus on the next window
        """

        window = Utility.next_item(self.windows, Window.focused_window())

        if window:            
            
            if not window.focus():

                self.remove_window(window)

        else:

            self.focus_primary()
Пример #6
0
    def focus_next(self):
        """
        Sets focus on the next window
        """

        window = Utility.next_item(self.windows, Window.focused_window())

        if window:

            if not window.focus():

                self.remove_window(window)

        else:

            self.focus_primary()
Пример #7
0
    def next_layout(self):
        """
        Switch to the next layout
        """
        
        nextLayout = Utility.next_item(self.layouts, self.currentLayout) 

        if nextLayout: 

            self.currentLayout = nextLayout

        self.masterarea = self.currentLayout.maxSize // 2

        self.tile_windows()

        if not Window.focused_window().center_cursor():

            self.remove_window(Window.focused_window())
Пример #8
0
    def next_layout(self):
        """
        Switch to the next layout
        """

        nextLayout = Utility.next_item(self.layouts, self.currentLayout)

        if nextLayout:

            self.currentLayout = nextLayout

        self.masterarea = self.currentLayout.maxSize // 2

        self.tile_windows()

        if not Window.focused_window().center_cursor():

            self.remove_window(Window.focused_window())
Пример #9
0
    def cmd_shift_to_next_monitor(self):

        window = Window.focused_window()

        if window.validate():

            monitor = Monitor.monitor_from_window_in_list(self.monitors, window) 
            nextMonitor = Utility.next_item(self.monitors, monitor)

            if nextMonitor:
                
                tiler = monitor.tilers[self.group]
                nextTiler = nextMonitor.tilers[self.group]

                if window in tiler.windows:

                    tiler.remove_window(window)

                if window not in nextTiler.windows:

                    nextTiler.add_window(window)

                window.focus()
Пример #10
0
    def cmd_shift_to_next_monitor(self):

        window = Window.focused_window()

        if window.validate():

            monitor = Monitor.monitor_from_window_in_list(
                self.monitors, window)
            nextMonitor = Utility.next_item(self.monitors, monitor)

            if nextMonitor:

                tiler = monitor.tilers[self.group]
                nextTiler = nextMonitor.tilers[self.group]

                if window in tiler.windows:

                    tiler.remove_window(window)

                if window not in nextTiler.windows:

                    nextTiler.add_window(window)

                window.focus()