Update configuration for new laptop, Fixes for new qtile internal api, PrintScreen button function, Compositor and Clipboard manager, Fix mouse actions
This commit is contained in:
		
							parent
							
								
									baece2297f
								
							
						
					
					
						commit
						95d2c26854
					
				
					 10 changed files with 68 additions and 48 deletions
				
			
		| 
						 | 
					@ -90,6 +90,7 @@ try:
 | 
				
			||||||
    logger.error("Initializing theme variables")
 | 
					    logger.error("Initializing theme variables")
 | 
				
			||||||
    # Initialize variables from theme
 | 
					    # Initialize variables from theme
 | 
				
			||||||
    keys = Theme.keys
 | 
					    keys = Theme.keys
 | 
				
			||||||
 | 
					    mouse = Theme.mouse
 | 
				
			||||||
    groups = Theme.groups
 | 
					    groups = Theme.groups
 | 
				
			||||||
    layouts = Theme.layouts
 | 
					    layouts = Theme.layouts
 | 
				
			||||||
    widget_defaults = Theme.widget_defaults
 | 
					    widget_defaults = Theme.widget_defaults
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,6 +67,7 @@ class BaseTheme:
 | 
				
			||||||
        self.groups = self.init_groups()
 | 
					        self.groups = self.init_groups()
 | 
				
			||||||
        self.layouts = self.init_layouts()
 | 
					        self.layouts = self.init_layouts()
 | 
				
			||||||
        self.screens = self.init_screens()
 | 
					        self.screens = self.init_screens()
 | 
				
			||||||
 | 
					        self.mouse = self.init_mouse()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def init_keys(self):
 | 
					    def init_keys(self):
 | 
				
			||||||
        return [
 | 
					        return [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,8 +16,7 @@ class Config(BaseConfig):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Default Applications
 | 
					    # Default Applications
 | 
				
			||||||
    app_terminal = "terminator"
 | 
					    app_terminal = "terminator"
 | 
				
			||||||
    app_launcher = "dmenu_run -i -p '»' -nb '" + background + "' -fn 'Noto Sans-11' -nf '" + inactive_light + \
 | 
					    app_launcher = "/home/kevin/bin/dmenu_wal.sh"
 | 
				
			||||||
                   "' -sb '" + highlight + "' -sf '" + foreground + "'"
 | 
					 | 
				
			||||||
    web_browser = "firefox-developer-edition"
 | 
					    web_browser = "firefox-developer-edition"
 | 
				
			||||||
    file_manager = "thunar"
 | 
					    file_manager = "thunar"
 | 
				
			||||||
    app_chat = "franz"
 | 
					    app_chat = "franz"
 | 
				
			||||||
| 
						 | 
					@ -25,8 +24,12 @@ class Config(BaseConfig):
 | 
				
			||||||
    app_mail = "thunderbird"
 | 
					    app_mail = "thunderbird"
 | 
				
			||||||
    cmd_brightness_up = "sudo /usr/bin/xbacklight -inc 10"
 | 
					    cmd_brightness_up = "sudo /usr/bin/xbacklight -inc 10"
 | 
				
			||||||
    cmd_brightness_down = "sudo /usr/bin/xbacklight -dec 10"
 | 
					    cmd_brightness_down = "sudo /usr/bin/xbacklight -dec 10"
 | 
				
			||||||
    lock_command = "/home/kevin/bin/lock.sh"
 | 
					    lock_command = "bash /home/kevin/bin/lock.sh"
 | 
				
			||||||
    visualizer_app = "glava"
 | 
					    visualizer_app = "glava"
 | 
				
			||||||
 | 
					    cmd_screenshot = "xfce4-screenshooter -r -c -d 1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Commands
 | 
				
			||||||
 | 
					    wallpaper_config_command = "/home/kevin/bin/wal-nitrogen-noupdate"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Images
 | 
					    # Images
 | 
				
			||||||
    desktop_bg = "/home/kevin/Pictures/wallpapers/desktop.png"
 | 
					    desktop_bg = "/home/kevin/Pictures/wallpapers/desktop.png"
 | 
				
			||||||
| 
						 | 
					@ -104,7 +107,7 @@ class Config(BaseConfig):
 | 
				
			||||||
    battery_update_delay = 5
 | 
					    battery_update_delay = 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Wifi variables
 | 
					    # Wifi variables
 | 
				
			||||||
    wifi_interface = "wlp4s0"
 | 
					    wifi_interface = "wifi0"
 | 
				
			||||||
    wifi_theme_path = "/home/kevin/.config/qtile/kuro/resources/wifi"
 | 
					    wifi_theme_path = "/home/kevin/.config/qtile/kuro/resources/wifi"
 | 
				
			||||||
    wifi_update_interval = 5
 | 
					    wifi_update_interval = 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,10 +118,10 @@ class Config(BaseConfig):
 | 
				
			||||||
    volume_font = "Noto Sans"
 | 
					    volume_font = "Noto Sans"
 | 
				
			||||||
    volume_fontsize = 11
 | 
					    volume_fontsize = 11
 | 
				
			||||||
    volume_theme_path = "/home/kevin/.config/qtile/kuro/resources/volume"
 | 
					    volume_theme_path = "/home/kevin/.config/qtile/kuro/resources/volume"
 | 
				
			||||||
    volume_get_command = "pamixer --sink 2 --get-volume".split()
 | 
					    volume_get_command = "pamixer --get-volume".split()
 | 
				
			||||||
    volume_mute_command = "pamixer --sink 2 -t".split()
 | 
					    volume_mute_command = "pamixer -t".split()
 | 
				
			||||||
    volume_up_command = "pamixer --sink 2 -i 2".split()
 | 
					    volume_up_command = "pamixer -i 2".split()
 | 
				
			||||||
    volume_down_command = "pamixer --sink 2 -d 2".split()
 | 
					    volume_down_command = "pamixer -d 2".split()
 | 
				
			||||||
    volume_is_bluetooth_icon = False
 | 
					    volume_is_bluetooth_icon = False
 | 
				
			||||||
    volume_update_interval = 0.2
 | 
					    volume_update_interval = 0.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -139,8 +142,8 @@ class Config(BaseConfig):
 | 
				
			||||||
    updates_colour_available = '#f4d742'
 | 
					    updates_colour_available = '#f4d742'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Screen organization
 | 
					    # Screen organization
 | 
				
			||||||
    laptop_screen_nvidia = "eDP-1-1"
 | 
					    laptop_screen_nvidia = "DP-2"
 | 
				
			||||||
    laptop_screen_intel = "eDP1"
 | 
					    laptop_screen_intel = "DP-2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Keyboard colors
 | 
					    # Keyboard colors
 | 
				
			||||||
    do_keyboard_updates = False
 | 
					    do_keyboard_updates = False
 | 
				
			||||||
| 
						 | 
					@ -149,3 +152,5 @@ class Config(BaseConfig):
 | 
				
			||||||
    show_audio_visualizer = True
 | 
					    show_audio_visualizer = True
 | 
				
			||||||
    kill_unnecessary_glava_processes = True
 | 
					    kill_unnecessary_glava_processes = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Show thermal widget
 | 
				
			||||||
 | 
					    show_temperature = True
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -177,6 +177,9 @@ class Kuro(BaseTheme):
 | 
				
			||||||
            Key([], "XF86MonBrightnessUp", lazy.spawn(Config.get('cmd_brightness_up', 'xbacklight -inc 10'))),
 | 
					            Key([], "XF86MonBrightnessUp", lazy.spawn(Config.get('cmd_brightness_up', 'xbacklight -inc 10'))),
 | 
				
			||||||
            Key([], "XF86MonBrightnessDown", lazy.spawn(Config.get('cmd_brightness_down', 'xbacklight -dec 10'))),
 | 
					            Key([], "XF86MonBrightnessDown", lazy.spawn(Config.get('cmd_brightness_down', 'xbacklight -dec 10'))),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # Screenshot key
 | 
				
			||||||
 | 
					            Key([], "Print", lazy.spawn(Config.get('cmd_screenshot', 'xfce4-screenshooter'))),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # Toggle between different layouts as defined below
 | 
					            # Toggle between different layouts as defined below
 | 
				
			||||||
            Key([self.mod], "Tab", lazy.next_layout()),
 | 
					            Key([self.mod], "Tab", lazy.next_layout()),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -313,12 +316,12 @@ class Kuro(BaseTheme):
 | 
				
			||||||
            if Config.get('show_audio_visualizer', False):
 | 
					            if Config.get('show_audio_visualizer', False):
 | 
				
			||||||
                widgets.append(kuro.utils.widgets.AudioVisualizerWidget(
 | 
					                widgets.append(kuro.utils.widgets.AudioVisualizerWidget(
 | 
				
			||||||
                   graph_color=Config.get('visualizer_graph_color', "#ffffff"),
 | 
					                   graph_color=Config.get('visualizer_graph_color', "#ffffff"),
 | 
				
			||||||
                   fill_color=Config.get('visualizer_fill_color', "#ffffff.3"),
 | 
					                   fill_color=Config.get('visualizer_fill_color', "#ffffff"),
 | 
				
			||||||
                   border_color=Config.get('visualizer_border_color', "#000000"),
 | 
					                   border_color=Config.get('visualizer_border_color', "#000000"),
 | 
				
			||||||
                   border_width=Config.get('visualizer_graph_width', 0),
 | 
					                   border_width=Config.get('visualizer_graph_width', 0),
 | 
				
			||||||
                   line_width=Config.get('visualizer_line_width', 1),
 | 
					                   line_width=Config.get('visualizer_line_width', 0),
 | 
				
			||||||
                   margin_x=1,
 | 
					                   margin_x=0,
 | 
				
			||||||
                   margin_y=1,
 | 
					                   margin_y=0,
 | 
				
			||||||
                   frequency=1
 | 
					                   frequency=1
 | 
				
			||||||
                ))
 | 
					                ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -392,11 +395,6 @@ class Kuro(BaseTheme):
 | 
				
			||||||
                    update_delay=Config.get('battery_update_delay', 30)
 | 
					                    update_delay=Config.get('battery_update_delay', 30)
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                kuro.utils.widgets.GPUStatusWidget(
 | 
					 | 
				
			||||||
                    theme_path=Config.get('gpu_theme_path', '/home/docs/checkouts/readthedocs.org/user_builds/qtile'
 | 
					 | 
				
			||||||
                                                            '/checkouts/latest/libqtile/resources/battery-icons'),
 | 
					 | 
				
			||||||
                ),
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                kuro.utils.widgets.WifiIconWidget(
 | 
					                kuro.utils.widgets.WifiIconWidget(
 | 
				
			||||||
                    interface=Config.get('wifi_interface', 'wlp4s0'),
 | 
					                    interface=Config.get('wifi_interface', 'wlp4s0'),
 | 
				
			||||||
                    theme_path=Config.get('wifi_theme_path', '/home/docs/checkouts/readthedocs.org/user_builds/qtile'
 | 
					                    theme_path=Config.get('wifi_theme_path', '/home/docs/checkouts/readthedocs.org/user_builds/qtile'
 | 
				
			||||||
| 
						 | 
					@ -542,13 +540,12 @@ class Kuro(BaseTheme):
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def update_screens(qtile):
 | 
					    def update_screens(qtile):
 | 
				
			||||||
        out = utils.call_process(["xrandr", "--current"])
 | 
					        out = utils.call_process(["xrandr", "--current"])
 | 
				
			||||||
        mode_out = utils.call_process(["optimus-manager", "--print-mode"])
 | 
					        #mode_out = utils.call_process(["optimus-manager", "--print-mode"])
 | 
				
			||||||
        if "nvidia" in mode_out:
 | 
					 | 
				
			||||||
        video_mode = "nvidia"
 | 
					        video_mode = "nvidia"
 | 
				
			||||||
        elif "intel" in mode_out:
 | 
					        #if "nvidia" in mode_out:
 | 
				
			||||||
            video_mode = "intel"
 | 
					        #    video_mode = "nvidia"
 | 
				
			||||||
        else:
 | 
					        #elif "intel" in mode_out:
 | 
				
			||||||
            video_mode = "unknown"
 | 
					        #    video_mode = "intel"
 | 
				
			||||||
        laptop_screen = None
 | 
					        laptop_screen = None
 | 
				
			||||||
        screens = []
 | 
					        screens = []
 | 
				
			||||||
        for x in out.split("\n"):
 | 
					        for x in out.split("\n"):
 | 
				
			||||||
| 
						 | 
					@ -598,7 +595,7 @@ class Kuro(BaseTheme):
 | 
				
			||||||
                            widget.update_graph()
 | 
					                            widget.update_graph()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def show_window_info(self, qtile):
 | 
					    def show_window_info(self, qtile):
 | 
				
			||||||
        window = qtile.currentWindow if qtile else None
 | 
					        window = qtile.current_window if qtile else None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        import pprint
 | 
					        import pprint
 | 
				
			||||||
        if window:
 | 
					        if window:
 | 
				
			||||||
| 
						 | 
					@ -615,7 +612,7 @@ class Kuro(BaseTheme):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # @staticmethod
 | 
					    # @staticmethod
 | 
				
			||||||
    def toggle_window_static(self, qtile):
 | 
					    def toggle_window_static(self, qtile):
 | 
				
			||||||
        window = qtile.currentWindow
 | 
					        window = qtile.current_window
 | 
				
			||||||
        if window in self.static_windows:
 | 
					        if window in self.static_windows:
 | 
				
			||||||
            utils.notify("Unpinned {}".format(window.name), "{} has been unpinned".format(window.name))
 | 
					            utils.notify("Unpinned {}".format(window.name), "{} has been unpinned".format(window.name))
 | 
				
			||||||
            self.static_windows.remove(window)
 | 
					            self.static_windows.remove(window)
 | 
				
			||||||
| 
						 | 
					@ -636,7 +633,6 @@ class Kuro(BaseTheme):
 | 
				
			||||||
            p = utils.execute_once(["wal", "-n", "-i", "{}".format(self.current_wallpaper)])
 | 
					            p = utils.execute_once(["wal", "-n", "-i", "{}".format(self.current_wallpaper)])
 | 
				
			||||||
            p.wait()
 | 
					            p.wait()
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
 | 
					 | 
				
			||||||
            wallpaper = None
 | 
					            wallpaper = None
 | 
				
			||||||
            if os.path.isfile("/home/kevin/.cache/wal/colors.json"):
 | 
					            if os.path.isfile("/home/kevin/.cache/wal/colors.json"):
 | 
				
			||||||
                with open("/home/kevin/.cache/wal/colors.json", 'r') as f:
 | 
					                with open("/home/kevin/.cache/wal/colors.json", 'r') as f:
 | 
				
			||||||
| 
						 | 
					@ -650,8 +646,11 @@ class Kuro(BaseTheme):
 | 
				
			||||||
                p = utils.execute_once("nitrogen --restore")
 | 
					                p = utils.execute_once("nitrogen --restore")
 | 
				
			||||||
                p.wait()
 | 
					                p.wait()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # self.log_info("Starting compositor...")
 | 
					        self.log_info("Starting compositor...")
 | 
				
			||||||
        # utils.execute_once("compton -b")
 | 
					        utils.execute_once("compton -b")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.log_info("Starting clipboard manager...")
 | 
				
			||||||
 | 
					        utils.execute_once("xfce4-clipman")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Update color scheme
 | 
					        # Update color scheme
 | 
				
			||||||
        self.initialize_colorscheme()
 | 
					        self.initialize_colorscheme()
 | 
				
			||||||
| 
						 | 
					@ -724,14 +723,14 @@ class Kuro(BaseTheme):
 | 
				
			||||||
                        if not placed and isinstance(widget, kuro.utils.widgets.AudioVisualizerWidget):
 | 
					                        if not placed and isinstance(widget, kuro.utils.widgets.AudioVisualizerWidget):
 | 
				
			||||||
                            if widget.client is None:
 | 
					                            if widget.client is None:
 | 
				
			||||||
                                viz_info = widget.info()
 | 
					                                viz_info = widget.info()
 | 
				
			||||||
                                pos_x = viz_info['offset'] + widget.margin_x - 1
 | 
					                                pos_x = viz_info['offset'] + widget.margin_x
 | 
				
			||||||
                                pos_y = 0 + widget.margin_y - 1
 | 
					                                pos_y = 0 + widget.margin_y
 | 
				
			||||||
                                width = viz_info['width'] - (2 * (widget.margin_x - 1))
 | 
					                                width = viz_info['width'] - (2 * widget.margin_x)
 | 
				
			||||||
                                height = viz_info['height'] - (2 * (widget.margin_y - 1))
 | 
					                                height = viz_info['height'] - (2 * widget.margin_y)
 | 
				
			||||||
                                screen_index = self.qtile.screens.index(screen)
 | 
					                                screen_index = self.qtile.screens.index(screen)
 | 
				
			||||||
                                logger.warning("Attaching {} {} to {} on screen {}".format(client, client.window.wid, type(widget).__name__, screen_index))
 | 
					                                logger.warning("Attaching {} {} to {} on screen {}".format(client, client.window.wid, type(widget).__name__, screen_index))
 | 
				
			||||||
                                c = KuroStatic.create(client, screen, x=pos_x, y=pos_y, width=width, height=height)
 | 
					                                c = KuroStatic.create(client, screen, x=pos_x, y=pos_y, width=width, height=height)
 | 
				
			||||||
                                c.setOpacity(Config.get("bar_opacity", 1.0))
 | 
					                                c.set_opacity(Config.get("bar_opacity", 1.0))
 | 
				
			||||||
                                widget.set_client(c, screen)
 | 
					                                widget.set_client(c, screen)
 | 
				
			||||||
                                placed = True
 | 
					                                placed = True
 | 
				
			||||||
                if not placed:
 | 
					                if not placed:
 | 
				
			||||||
| 
						 | 
					@ -770,8 +769,8 @@ class Kuro(BaseTheme):
 | 
				
			||||||
        wallpaper_dir = Config.get("desktop_bg_folder", "")
 | 
					        wallpaper_dir = Config.get("desktop_bg_folder", "")
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            wallpapers = os.listdir(wallpaper_dir)
 | 
					            wallpapers = os.listdir(wallpaper_dir)
 | 
				
			||||||
        except os.error:
 | 
					        except os.error as e:
 | 
				
			||||||
            pass
 | 
					            logger.warning("Could not load wallpapers from directory: {}".format(e))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if wallpapers:
 | 
					        if wallpapers:
 | 
				
			||||||
            qtile.theme_instance.current_wallpaper = os.path.join(wallpaper_dir, random.choice(wallpapers))
 | 
					            qtile.theme_instance.current_wallpaper = os.path.join(wallpaper_dir, random.choice(wallpapers))
 | 
				
			||||||
| 
						 | 
					@ -782,7 +781,8 @@ class Kuro(BaseTheme):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def set_wallpaper(qtile, filename):
 | 
					    def set_wallpaper(qtile, filename):
 | 
				
			||||||
        p = utils.execute_once("wal-nitrogen-noupdate {}".format(filename))
 | 
					        p = utils.execute_once("{} {}".format(Config.get('wallpaper_config_command', 'wal-nitrogen-noupdate'),
 | 
				
			||||||
 | 
					                                              filename))
 | 
				
			||||||
        p.wait()
 | 
					        p.wait()
 | 
				
			||||||
        qtile.theme_instance.current_wallpaper = filename
 | 
					        qtile.theme_instance.current_wallpaper = filename
 | 
				
			||||||
        Kuro.update_colorscheme(qtile)
 | 
					        Kuro.update_colorscheme(qtile)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -183,6 +183,8 @@ class KuroTopBar(Bar):
 | 
				
			||||||
        super(KuroTopBar, self)._configure(qtile, screen)
 | 
					        super(KuroTopBar, self)._configure(qtile, screen)
 | 
				
			||||||
        self.window.handle_EnterNotify = self.handle_enter_notify
 | 
					        self.window.handle_EnterNotify = self.handle_enter_notify
 | 
				
			||||||
        self.window.handle_LeaveNotify = self.handle_leave_notify
 | 
					        self.window.handle_LeaveNotify = self.handle_leave_notify
 | 
				
			||||||
 | 
					        self.window.window.set_property("_NET_WM_NAME", "KuroTopBar")
 | 
				
			||||||
 | 
					        self.window.update_name()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def draw(self):
 | 
					    def draw(self):
 | 
				
			||||||
        if self.queued_draws == 0:
 | 
					        if self.queued_draws == 0:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,11 +24,11 @@ class KuroFloating(Floating):
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if hasattr(client, "is_static_window") and client.is_static_window:
 | 
					        if hasattr(client, "is_static_window") and client.is_static_window:
 | 
				
			||||||
            bc = client.group.qtile.colorPixel(self.border_static)
 | 
					            bc = client.group.qtile.color_pixel(self.border_static)
 | 
				
			||||||
        elif client.has_focus:
 | 
					        elif client.has_focus:
 | 
				
			||||||
            bc = client.group.qtile.colorPixel(self.border_focus)
 | 
					            bc = client.group.qtile.color_pixel(self.border_focus)
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            bc = client.group.qtile.colorPixel(self.border_normal)
 | 
					            bc = client.group.qtile.color_pixel(self.border_normal)
 | 
				
			||||||
        if client.maximized:
 | 
					        if client.maximized:
 | 
				
			||||||
            bw = self.max_border_width
 | 
					            bw = self.max_border_width
 | 
				
			||||||
        elif client.fullscreen:
 | 
					        elif client.fullscreen:
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,7 @@ class KuroFloating(Floating):
 | 
				
			||||||
        except AttributeError:
 | 
					        except AttributeError:
 | 
				
			||||||
            # this window hasn't been placed before, let's put it in a sensible spot
 | 
					            # this window hasn't been placed before, let's put it in a sensible spot
 | 
				
			||||||
            transient_for = client.window.get_wm_transient_for()
 | 
					            transient_for = client.window.get_wm_transient_for()
 | 
				
			||||||
            win = client.group.qtile.windowMap.get(transient_for)
 | 
					            win = client.group.qtile.windows_map.get(transient_for)
 | 
				
			||||||
            if win is not None:
 | 
					            if win is not None:
 | 
				
			||||||
                # if transient for a window, place in the center of the window
 | 
					                # if transient for a window, place in the center of the window
 | 
				
			||||||
                center_x = win.x + win.width / 2
 | 
					                center_x = win.x + win.width / 2
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -207,6 +207,7 @@ class WifiIconWidget(base._TextBox):
 | 
				
			||||||
        ('update_interval', 1, 'The update interval.'),
 | 
					        ('update_interval', 1, 'The update interval.'),
 | 
				
			||||||
        ('theme_path', default_icon_path(), 'Path of the icons'),
 | 
					        ('theme_path', default_icon_path(), 'Path of the icons'),
 | 
				
			||||||
        ('custom_icons', {}, 'dict containing key->filename icon map'),
 | 
					        ('custom_icons', {}, 'dict containing key->filename icon map'),
 | 
				
			||||||
 | 
					        ('disconnected_message', {'error': False, 'essid': None, 'quality': 0, 'percent': 0}, 'Message to show when WiFi is disconnected'),
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, **config):
 | 
					    def __init__(self, **config):
 | 
				
			||||||
| 
						 | 
					@ -382,6 +383,7 @@ class MediaWidget(base.InLoopPollText):
 | 
				
			||||||
        'spotify': '',
 | 
					        'spotify': '',
 | 
				
			||||||
        'vlc': '',
 | 
					        'vlc': '',
 | 
				
			||||||
        'firefox': '',
 | 
					        'firefox': '',
 | 
				
			||||||
 | 
					        'mpv': '',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    custom_player_data = {
 | 
					    custom_player_data = {
 | 
				
			||||||
| 
						 | 
					@ -574,8 +576,8 @@ class AudioVisualizerWidget(_Graph):
 | 
				
			||||||
    def update_graph(self):
 | 
					    def update_graph(self):
 | 
				
			||||||
        if self.client is not None:
 | 
					        if self.client is not None:
 | 
				
			||||||
            viz_info = self.info()
 | 
					            viz_info = self.info()
 | 
				
			||||||
            pos_x = viz_info['offset'] + self.margin_x - 1 + self.screen.x
 | 
					            pos_x = viz_info['offset'] + self.margin_x + self.screen.x
 | 
				
			||||||
            pos_y = 0 + self.margin_y - 1 + self.screen.y
 | 
					            pos_y = 0 + self.margin_y + self.screen.y
 | 
				
			||||||
            if self.old_position != (pos_x, pos_y):
 | 
					            if self.old_position != (pos_x, pos_y):
 | 
				
			||||||
                self.old_position = (pos_x, pos_y)
 | 
					                self.old_position = (pos_x, pos_y)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -662,7 +664,7 @@ class KuroTaskList(TaskList):
 | 
				
			||||||
        elif window.floating:
 | 
					        elif window.floating:
 | 
				
			||||||
            state = self.txt_floating
 | 
					            state = self.txt_floating
 | 
				
			||||||
            markup_str = self.markup_floating
 | 
					            markup_str = self.markup_floating
 | 
				
			||||||
        elif window is window.group.currentWindow:
 | 
					        elif window is window.group.current_window:
 | 
				
			||||||
            markup_str = self.markup_focused
 | 
					            markup_str = self.markup_focused
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        window_name = window.name if window and window.name else "?"
 | 
					        window_name = window.name if window and window.name else "?"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ class KuroStatic(Static):
 | 
				
			||||||
        if window.group:
 | 
					        if window.group:
 | 
				
			||||||
            window.group.remove(window)
 | 
					            window.group.remove(window)
 | 
				
			||||||
        s = KuroStatic(window.window, window.qtile, screen, x, y, width, height)
 | 
					        s = KuroStatic(window.window, window.qtile, screen, x, y, width, height)
 | 
				
			||||||
        window.qtile.windowMap[window.window.wid] = s
 | 
					        window.qtile.windows_map[window.window.wid] = s
 | 
				
			||||||
        hook.fire("client_managed", s)
 | 
					        hook.fire("client_managed", s)
 | 
				
			||||||
        return s
 | 
					        return s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,10 @@
 | 
				
			||||||
pamixer
 | 
					pamixer
 | 
				
			||||||
nitrogen
 | 
					nitrogen
 | 
				
			||||||
 | 
					notification-daemon
 | 
				
			||||||
 | 
					otf-font-awesome
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# /optional/
 | 
				
			||||||
 | 
					playerctl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					xfce4-screenshooter
 | 
				
			||||||
 | 
					xfce4-clipman-plugin
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
notify2>=0.3.1
 | 
					notify2>=0.3.1
 | 
				
			||||||
iwlib>=1.5
 | 
					iwlib>=1.5
 | 
				
			||||||
 | 
					psutil>=5.6
 | 
				
			||||||
 | 
					pytest>=4.4
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue