Hello community, here is the log from the commit of package qtile for openSUSE:Factory checked in at 2018-05-16 18:42:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qtile (Old) and /work/SRC/openSUSE:Factory/.qtile.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qtile" Wed May 16 18:42:50 2018 rev:6 rq:609036 version:0.11.1+20180513.39ced15a Changes: -------- --- /work/SRC/openSUSE:Factory/qtile/qtile.changes 2018-04-11 14:00:26.018181581 +0200 +++ /work/SRC/openSUSE:Factory/.qtile.new/qtile.changes 2018-05-16 18:44:44.532466801 +0200 @@ -1,0 +2,8 @@ +Wed May 16 07:05:05 UTC 2018 - p...@cervinka.net + +- Update to version 0.11.1+20180513.39ced15a: + * Fix TaskList when not using markup + * Fix the dmenu extension use of fontsize + * Adds new formating options for tasklist + +------------------------------------------------------------------- Old: ---- qtile-0.11.1+20180406.68ddde55.tar.xz New: ---- qtile-0.11.1+20180513.39ced15a.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qtile.spec ++++++ --- /var/tmp/diff_new_pack.kPEdDb/_old 2018-05-16 18:44:45.160444107 +0200 +++ /var/tmp/diff_new_pack.kPEdDb/_new 2018-05-16 18:44:45.164443963 +0200 @@ -17,7 +17,7 @@ Name: qtile -Version: 0.11.1+20180406.68ddde55 +Version: 0.11.1+20180513.39ced15a Release: 0 Summary: A pure-Python tiling window manager # All MIT except for: libqtile/widget/pacman.py:GPL (v3 or later) ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.kPEdDb/_old 2018-05-16 18:44:45.224441795 +0200 +++ /var/tmp/diff_new_pack.kPEdDb/_new 2018-05-16 18:44:45.228441650 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/qtile/qtile.git</param> - <param name="changesrevision">68ddde553f7ba8c0a92a0dec1bff131270afbaf9</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">39ced15a03a5ffe9903381183cb2fc80b13176e7</param></service></servicedata> \ No newline at end of file ++++++ qtile-0.11.1+20180406.68ddde55.tar.xz -> qtile-0.11.1+20180513.39ced15a.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtile-0.11.1+20180406.68ddde55/docs/manual/install/arch.rst new/qtile-0.11.1+20180513.39ced15a/docs/manual/install/arch.rst --- old/qtile-0.11.1+20180406.68ddde55/docs/manual/install/arch.rst 2018-04-06 14:24:41.000000000 +0200 +++ new/qtile-0.11.1+20180513.39ced15a/docs/manual/install/arch.rst 2018-05-14 02:02:22.000000000 +0200 @@ -2,52 +2,12 @@ Installing on Arch Linux ======================== -Qtile is available on the `AUR`_ as: - -======================= ======================= -Package Name Description -======================= ======================= -`qtile`_ stable branch (release) -`qtile-python3-git`_ development branch -======================= ======================= - -Using an AUR Helper -=================== - -The preferred way to install Qtile is with an `AUR helper`_. For example, -if you use `yaourt`_: - -.. code-block:: bash - - yaourt -S <package-name> - -Using makepkg -============= - -The latest version of either package can be obtained by downloading a snapshot -or cloning its repository: - -.. code-block:: bash - - # snapshot - curl -s https://aur.archlinux.org/cgit/aur.git/snapshot/<package-name>.tar.gz | tar -xvzf - - # or repository - git clone https://aur.archlinux.org/<package-name>.git - -Next makepkg has to be called in the directory where the files were saved. It -installs missing dependencies using pacman, builds the package, installs it -and removes obsolete build-time dependencies afterwards: +Stable versions of Qtile are currently packaged for Arch Linux. To install this package, run: .. code-block:: bash - cd <package-name> - makepkg -sri + pacman -S qtile -Please see the ArchWiki for more information on `installing packages from the AUR`_. +Please see the ArchWiki for more information on `Qtile`_. -.. _AUR: https://wiki.archlinux.org/index.php/AUR -.. _AUR Helper: https://wiki.archlinux.org/index.php/AUR_Helpers -.. _installing packages from the AUR: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages -.. _qtile: https://aur.archlinux.org/packages/qtile/ -.. _qtile-python3-git: https://aur.archlinux.org/packages/qtile-python3-git/ -.. _yaourt: https://archlinux.fr/yaourt-en +.. _Qtile: https://wiki.archlinux.org/index.php/Qtile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtile-0.11.1+20180406.68ddde55/libqtile/extension/dmenu.py new/qtile-0.11.1+20180513.39ced15a/libqtile/extension/dmenu.py --- old/qtile-0.11.1+20180406.68ddde55/libqtile/extension/dmenu.py 2018-04-06 14:24:41.000000000 +0200 +++ new/qtile-0.11.1+20180513.39ced15a/libqtile/extension/dmenu.py 2018-05-14 02:02:22.000000000 +0200 @@ -71,7 +71,7 @@ font = self.dmenu_font elif self.font: if self.fontsize: - font = '-'.join((self.font, self.fontsize)) + font = '{}-{}'.format(self.font, self.fontsize) else: font = self.font self.configured_command.extend(("-fn", font)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtile-0.11.1+20180406.68ddde55/libqtile/widget/tasklist.py new/qtile-0.11.1+20180513.39ced15a/libqtile/widget/tasklist.py --- old/qtile-0.11.1+20180406.68ddde55/libqtile/widget/tasklist.py 2018-04-06 14:24:41.000000000 +0200 +++ new/qtile-0.11.1+20180513.39ced15a/libqtile/widget/tasklist.py 2018-05-14 02:02:22.000000000 +0200 @@ -4,6 +4,7 @@ # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 Sean Vig +# Copyright (c) 2018 Piotr Przymus # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -24,8 +25,10 @@ # SOFTWARE. from __future__ import division +import re import cairocffi +from .. import pangocffi from .. import bar, hook from . import base @@ -75,6 +78,13 @@ "Max size in pixels of task title." "(if set to None, as much as available.)" ), + + ( + "title_width_method", + None, + "Method to compute the width of task title. (None, 'uniform'.)" + "Defaults to None, the normal behaviour." + ), ( "spacing", None, @@ -100,6 +110,36 @@ 'e.g., "V " or "\U0001F5D7 "' ), ( + 'markup_normal', + None, + 'Text markup of the normal window state. Supports pangomarkup with markup=True.' + 'e.g., "{}" or "<span underline="low">{}</span>"' + ), + ( + 'markup_minimized', + None, + 'Text markup of the minimized window state. Supports pangomarkup with markup=True.' + 'e.g., "{}" or "<span underline="low">{}</span>"' + ), + ( + 'markup_maximized', + None, + 'Text markup of the maximized window state. Supports pangomarkup with markup=True.' + 'e.g., "{}" or "<span underline="low">{}</span>"' + ), + ( + 'markup_floating', + None, + 'Text markup of the floating window state. Supports pangomarkup with markup=True.' + 'e.g., "{}" or "<span underline="low">{}</span>"' + ), + ( + 'markup_focused', + None, + 'Text markup of the focused window state. Supports pangomarkup with markup=True.' + 'e.g., "{}" or "<span underline="low">{}</span>"' + ), + ( 'icon_size', None, 'Icon size. ' @@ -114,6 +154,7 @@ self.add_defaults(base.MarginMixin.defaults) self._icons_cache = {} self._box_end_positions = [] + self.markup = False if self.spacing is None: self.spacing = self.margin_x @@ -122,6 +163,8 @@ calculate box width for given text. If max_title_width is given, the returned width is limited to it. """ + if self.markup: + text = re.sub('<[^<]+?>', '', text) width, _ = self.drawer.max_layout_size( [text], self.font, @@ -137,16 +180,43 @@ appropriate characters are prepended. """ state = '' + markup_str = self.markup_normal + + # Enforce markup and new string format behaviour when + # at least one markup_* option is used. + # Mixing non markup and markup may cause problems. + if self.markup_minimized or self.markup_maximized\ + or self.markup_floating or self.markup_focused: + enforce_markup = True + else: + enforce_markup = False + if window is None: pass elif window.minimized: state = self.txt_minimized + markup_str = self.markup_minimized elif window.maximized: state = self.txt_maximized + markup_str = self.markup_maximized elif window.floating: state = self.txt_floating + markup_str = self.markup_floating + elif window is window.group.currentWindow: + markup_str = self.markup_focused + + window_name = window.name if window and window.name else "?" + + # Emulate default widget behavior if markup_str is None + if enforce_markup and markup_str is None: + markup_str = "%s{}" % (state) + + if markup_str is not None: + self.markup = True + window_name = pangocffi.markup_escape_text(window_name) + return markup_str.format(window_name) - return "%s%s" % (state, window.name if window and window.name else "?") + return "%s%s" % (state, window_name) @property def windows(self): @@ -177,14 +247,22 @@ else: icons = [self.get_window_icon(w) for w in windows] - # calculated width for each task according to icon and task name - # consisting of state abbreviation and window name + # Obey title_width_method if specified + if self.title_width_method == "uniform": + width_uniform = width_total // window_count + width_boxes = [width_uniform for w in range(window_count)] + else: + # Default behaviour: calculated width for each task according to + # icon and task name consisting + # of state abbreviation and window name + width_boxes = [(self.box_width(names[idx]) + + ((self.icon_size + self.padding_x) if icons[idx] else 0)) + for idx in range(window_count)] + # Obey max_title_width if specified - width_boxes = [(self.box_width(names[idx]) + - ((self.icon_size + self.padding_x) if icons[idx] else 0)) - for idx in range(window_count)] if self.max_title_width: width_boxes = [min(w, self.max_title_width) for w in width_boxes] + width_sum = sum(width_boxes) # calculated box width are to wide for available widget space: @@ -244,7 +322,11 @@ hook.subscribe.client_killed(self.remove_icon_cache) def drawtext(self, text, textcolor, width): + if self.markup: + self.layout.markup = self.markup + self.layout.text = text + self.layout.font_family = self.font self.layout.font_size = self.fontsize self.layout.colour = textcolor