def shift_focused_window_up(self):
        """
        Switches the window to the previous position
        """

        window = Window.focused_window()

        #only grab and move the window if it is in the self
        if window in self.windows:

            i = self.windows.index(window)

            #if the foreground window is first, shift everything and place it last
            if i == 0:

                j = len(self.windows) - 1
                self.windows[j], self.windows[:j] = self.windows[0], self.windows[1:]

            #else shift it with the trailing window
            else:

                j = i - 1
                self.windows[i], self.windows[j] = self.windows[j], self.windows[i]

            self.tile_windows()

            if not window.focus():

                self.remove_window(window)
    def cmd_print_focused_window_classname(self):

        win32clipboard.OpenClipboard()
        win32clipboard.EmptyClipboard()
        win32clipboard.SetClipboardText(Window.focused_window().classname)
        win32clipboard.CloseClipboard()

        print(Window.focused_window().classname)
Example #3
0
    def cmd_print_focused_window_classname(self):

        win32clipboard.OpenClipboard()
        win32clipboard.EmptyClipboard()
        win32clipboard.SetClipboardText(Window.focused_window().classname)
        win32clipboard.CloseClipboard()

        print(Window.focused_window().classname)
Example #4
0
 def cmd_toggle_tiled_floating(self):
     win = Window.focused_window(self.windows)
     if(win != None):
         if(win.floating):
             win.tile()
         else:
             win.float()
    def shift_focused_window_down(self):
        """
        Switches the window to the next position
        """
        
        #get focused window
        window = Window.focused_window()

        #only grab and move the window if it is in the self
        if window in self.windows:

            i = self.windows.index(window)

            #if the foreground window is the last window, shift everything and place it first
            if i == len(self.windows) - 1:

                self.windows[0], self.windows[1:] = self.windows[i], self.windows[:i]

            #else shift it with the following window
            else:

                self.windows[i], self.windows[i+1] = self.windows[i+1], self.windows[i]

            self.tile_windows()

            if not window.focus():

                self.remove_window(window)
    def shift_focused_window_down(self):
        """
        Switches the window to the next position
        """

        #get focused window
        window = Window.focused_window()

        #only grab and move the window if it is in the self
        if window in self.windows:

            i = self.windows.index(window)

            #if the foreground window is the last window, shift everything and place it first
            if i == len(self.windows) - 1:

                self.windows[0], self.windows[1:] = self.windows[
                    i], self.windows[:i]

            #else shift it with the following window
            else:

                self.windows[i], self.windows[i + 1] = self.windows[
                    i + 1], self.windows[i]

            self.tile_windows()

            if not window.focus():

                self.remove_window(window)
    def shift_focused_window_up(self):
        """
        Switches the window to the previous position
        """

        window = Window.focused_window()

        #only grab and move the window if it is in the self
        if window in self.windows:

            i = self.windows.index(window)

            #if the foreground window is first, shift everything and place it last
            if i == 0:

                j = len(self.windows) - 1
                self.windows[j], self.windows[:j] = self.windows[
                    0], self.windows[1:]

            #else shift it with the trailing window
            else:

                j = i - 1
                self.windows[i], self.windows[j] = self.windows[
                    j], self.windows[i]

            self.tile_windows()

            if not window.focus():

                self.remove_window(window)
    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())
    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())
Example #10
0
    def cmd_send_to_group_9(self):

        if self.group != 8:

            window = Window.focused_window() 

            if window:

                self.send_window_to_tiler(window, 8)
    def cmd_send_to_group_9(self):

        if self.group != 8:

            window = Window.focused_window()

            if window:

                self.send_window_to_tiler(window, 8)
Example #12
0
 def cmd_move_to_previous_monitor(self):
     window = Window.focused_window(self.windows)
     # if(window.validate()):
     monitor = Monitor.monitor_from_window_in_list(self.monitors, window)
     previousMonitor = Utility.previous_item(self.monitors, monitor)
     if(monitor != previousMonitor):
         tiler = monitor.tilers[self.group]
         previousTiler = previousMonitor.tilers[self.group]
         tiler.remove_window(window)
         previousTiler.add_window(window)
         window.focus()
Example #13
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()
    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()
    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()
    def focus_previous(self):
        """
        Sets focus on the previous window
        """

        #get focused window
        window = Utility.previous_item(self.windows, Window.focused_window())

        if window:

            if not window.focus():

                self.remove_window(window)

        else:

            self.focus_primary()
    def focus_previous(self):
        """
        Sets focus on the previous window
        """

        #get focused window
        window = Utility.previous_item(self.windows, Window.focused_window())

        if window: 

            if not window.focus():

                self.remove_window(window)

        else:

            self.focus_primary()
    def make_focused_primary(self):
        """
        Moves the focused window to the first place in the masterarea
        """

        window = Window.focused_window()

        #only move the focused window if it is in the tiler
        if window in self.windows:

            i = self.windows.index(window)

            windowrest = self.windows[:i]
            windowrest.extend(self.windows[i + 1:])

            #shift window location
            self.windows[0], self.windows[1:] = self.windows[i], windowrest
            self.tile_windows()

            if not window.focus():

                self.remove_window(window)
    def make_focused_primary(self):
        """
        Moves the focused window to the first place in the masterarea
        """

        window = Window.focused_window()

        #only move the focused window if it is in the tiler
        if window in self.windows:

            i = self.windows.index(window)

            windowrest = self.windows[:i]
            windowrest.extend(self.windows[i+1:])

            #shift window location
            self.windows[0], self.windows[1:] = self.windows[i], windowrest 
            self.tile_windows()

            if not window.focus():

                self.remove_window(window)
Example #20
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()
Example #21
0
    def cmd_shift_to_previous_monitor(self):

        window = Window.focused_window()

        if window.validate():

            monitor = Monitor.monitor_from_window_in_list(self.monitors, window) 
            previousMonitor = Utility.previous_item(self.monitors, monitor)

            if previousMonitor:
                
                tiler = monitor.tilers[self.group]
                previousTiler = previousMonitor.tilers[self.group]

                if window in tiler.windows:

                    tiler.remove_window(window)

                if window not in previousTiler.windows:

                    previousTiler.add_window(window)

                window.focus()
    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()
    def cmd_shift_to_previous_monitor(self):

        window = Window.focused_window()

        if window.validate():

            monitor = Monitor.monitor_from_window_in_list(
                self.monitors, window)
            previousMonitor = Utility.previous_item(self.monitors, monitor)

            if previousMonitor:

                tiler = monitor.tilers[self.group]
                previousTiler = previousMonitor.tilers[self.group]

                if window in tiler.windows:

                    tiler.remove_window(window)

                if window not in previousTiler.windows:

                    previousTiler.add_window(window)

                window.focus()
Example #24
0
    def cmd_toggle_focused_window_decoration(self):

        Window.focused_window().toggle_decoration()
Example #25
0
 def cmd_send_to_group_9(self):
     if(self.group != 8):
         window = Window.focused_window(self.windows) 
         if(window):
             self.send_window_to_tiler(window, 8)
Example #26
0
 def cmd_close_focused_window(self):
     window = Window.focused_window(self.windows)
     window.container.container.remove_window(window)
     window.close()
Example #27
0
    def cmd_close_focused_window(self):

        Window.focused_window().close()
Example #28
0
 def cmd_toggle_stacked_column(self):
     win = Window.focused_window(self.windows)
     if(win != None and win.container.toggle_stacking()):
         win.container.container.container.tile_windows()
    def cmd_close_focused_window(self):

        Window.focused_window().close()
Example #30
0
 def cmd_print_focused_window_classname(self):
     class_name = Window.focused_window(self.windows).classname
     self.notifyicon.show_balloon(class_name, 'PWT2')
     logging.debug(class_name)
     print(class_name)
Example #31
0
    def cmd_tile_focused_window(self):

        self.current_tiler.tile_window(Window.focused_window())
Example #32
0
 def cmd_focus_down(self):
     curr_win = Window.focused_window(self.windows)
     # if(curr_win == None):
         # curr_win = self.windows.values()[0]
     if(curr_win != None):
         curr_win.change_focus_down()
    def cmd_toggle_focused_window_decoration(self):

        Window.focused_window().toggle_decoration()
    def cmd_tile_focused_window(self):

        self.current_tiler.tile_window(Window.focused_window())
    def cmd_float_focused_window(self):

        self.current_tiler.float_window(Window.focused_window())
Example #36
0
    def cmd_float_focused_window(self):

        self.current_tiler.float_window(Window.focused_window())
Example #37
0
 def cmd_move_window_down(self):
     curr_win = Window.focused_window(self.windows)
     if(curr_win != None):
         curr_win.move_down()