Hello community,

here is the log from the commit of package azote for openSUSE:Factory checked 
in at 2020-09-14 12:32:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azote (Old)
 and      /work/SRC/openSUSE:Factory/.azote.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azote"

Mon Sep 14 12:32:56 2020 rev:5 rq:834217 version:1.7.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/azote/azote.changes      2020-06-23 
21:07:05.142325137 +0200
+++ /work/SRC/openSUSE:Factory/.azote.new.4249/azote.changes    2020-09-14 
12:34:56.337351584 +0200
@@ -1,0 +2,9 @@
+Mon Sep 14 07:26:16 UTC 2020 - Michael Vetter <[email protected]>
+
+- Update to 1.7.14:
+  * Added possibility to open images with swappy (.png only)
+  * fixed crash on the stored wallpaper folder path not found #102
+  * added support for Wayfire (possibly also for other wlroots-based
+    Wayland compositors); swaybg and wlr-randr packages required.
+
+-------------------------------------------------------------------

Old:
----
  azote-1.7.12.tar.gz

New:
----
  azote-1.7.14.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ azote.spec ++++++
--- /var/tmp/diff_new_pack.Ye1v5J/_old  2020-09-14 12:35:00.009353927 +0200
+++ /var/tmp/diff_new_pack.Ye1v5J/_new  2020-09-14 12:35:00.013353929 +0200
@@ -18,7 +18,7 @@
 
 %{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
 Name:           azote
-Version:        1.7.12
+Version:        1.7.14
 Release:        0
 Summary:        Wallpaper manager for Sway, i3 and some other WMs
 License:        GPL-3.0-only

++++++ azote-1.7.12.tar.gz -> azote-1.7.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azote-1.7.12/.github/ISSUE_TEMPLATE/bug_report.md 
new/azote-1.7.14/.github/ISSUE_TEMPLATE/bug_report.md
--- old/azote-1.7.12/.github/ISSUE_TEMPLATE/bug_report.md       1970-01-01 
01:00:00.000000000 +0100
+++ new/azote-1.7.14/.github/ISSUE_TEMPLATE/bug_report.md       2020-09-12 
02:05:21.000000000 +0200
@@ -0,0 +1,34 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - Linux distribution: [e.g. Arch, Void]
+ - WM: [e.g. sway, i3]
+
+**Azote version (please state it clearly if you use -git version):**
+ - version number from the "About" window
+
+**Additional context**
+Add any other context about the problem here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azote-1.7.12/.github/ISSUE_TEMPLATE/feature_request.md 
new/azote-1.7.14/.github/ISSUE_TEMPLATE/feature_request.md
--- old/azote-1.7.12/.github/ISSUE_TEMPLATE/feature_request.md  1970-01-01 
01:00:00.000000000 +0100
+++ new/azote-1.7.14/.github/ISSUE_TEMPLATE/feature_request.md  2020-09-12 
02:05:21.000000000 +0200
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features 
you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azote-1.7.12/CHANGELOG.md 
new/azote-1.7.14/CHANGELOG.md
--- old/azote-1.7.12/CHANGELOG.md       2020-06-23 02:04:54.000000000 +0200
+++ new/azote-1.7.14/CHANGELOG.md       2020-09-12 02:05:21.000000000 +0200
@@ -1,5 +1,11 @@
 # CHANGELOG
 
+## v1.7.14 (2020-09-12)
+- Added possibility to open images with 
[swappy](https://github.com/jtheoof/swappy) (.png only);
+- fixed crash on the stored wallpaper folder path not found 
[#102](https://github.com/nwg-piotr/azote/issues/102);
+- support for [Wayfire](https://github.com/WayfireWM/wayfire) (possibly also 
for other wlroots-based Wayland 
+compositors); `swaybg` and `wlr-randr` packages required.
+
 ## v1.7.12 (2020-06-22)
 - scale and crop to triple display with / height;
 - split vertical images vertically (is_horizontal = width >= height);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azote-1.7.12/README.md new/azote-1.7.14/README.md
--- old/azote-1.7.12/README.md  2020-06-23 02:04:54.000000000 +0200
+++ new/azote-1.7.14/README.md  2020-09-12 02:05:21.000000000 +0200
@@ -3,11 +3,11 @@
 [![Build 
Status](https://travis-ci.com/nwg-piotr/azote.svg?branch=master)](https://travis-ci.com/nwg-piotr/azote)
 
 **Azote** is a GTK+3 - based picture browser and background setter, as the 
frontend to the [swaybg](https://github.com/swaywm/swaybg) 
-(sway/Wayland) and [feh](https://feh.finalrewind.org) (X windows) commands. It 
also includes several colour management 
-tools.
+(sway/Wayland) and [feh](https://feh.finalrewind.org) (X windows) commands. 
The user interface is being developed with
+multi-headed setups in mind. Azote also includes several colour management 
tools.
 
-The program is confirmed to work on sway, i3, Openbox, Fluxbox and dwm window 
managers, on Arch Linux, Void Linux, 
-Debian and Fedora.
+The program is confirmed to work on sway, Wayfire, i3, Openbox, Fluxbox and 
dwm window managers. Wayland support is
+limited to wlroots-based compositors.
 
 
![screenshot](http://nwg.pl/Lychee/uploads/big/78510b1f9358767e8407d66e933f1d8c.png)
 
@@ -63,6 +63,13 @@
 exec ~/.azotebg
 ```
 
+### Wayfire
+
+In `~/.config/wayfire.ini` set `autostart_wf_shell = false`, and replace 
`background = wf-background` with 
+`background = ~/.azotebg`. 
+
+**Important:** optional `wlr-randr` / `wlr-randr-git` and `swaybg` packages 
are necessary.
+
 ### X window managers (i3, Openbox, dwm etc.)
 
 You need to execute `~/.fehbg` from your window manager’s startup file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azote-1.7.12/azote/main.py 
new/azote-1.7.14/azote/main.py
--- old/azote-1.7.12/azote/main.py      2020-06-23 02:04:54.000000000 +0200
+++ new/azote-1.7.14/azote/main.py      2020-09-12 02:05:21.000000000 +0200
@@ -252,7 +252,7 @@
         # Values to assigned to corresponding display when apply button pressed
         self.display_name = name
         self.wallpaper_path = None
-        self.mode = 'fill' if common.sway else 'scale'
+        self.mode = 'fill' if common.sway or common.env['wayland'] else 'scale'
         self.color = None
 
         pixbuf = GdkPixbuf.Pixbuf.new_from_file('images/empty.png')
@@ -275,7 +275,7 @@
         # Combo box to choose a mode to use for the image
         mode_selector = Gtk.ListStore(str)
 
-        if common.sway:
+        if common.sway or common.env['wayland']:
             for mode in common.modes_swaybg:
                 mode_selector.append([mode])
         else:
@@ -298,7 +298,7 @@
         self.mode_combo.set_tooltip_text(common.lang['display_mode'])
         options_box.add(self.mode_combo)
 
-        if common.sway:
+        if common.sway or common.env['wayland']:
             # Color button
             self.color_button = Gtk.ColorButton()
             color = Gdk.RGBA()
@@ -324,7 +324,7 @@
 
     def clear_color_selection(self):
         # If not on sway / swaybg, we have no color_button in UI
-        if common.sway:
+        if common.sway or common.env['wayland']:
             # clear color selection: image will be used
             color = Gdk.RGBA()
             color.red = 0.0
@@ -354,7 +354,7 @@
 
         # If our backend is feh, not swaybg, we can not set mode for each 
wallpaper separately.
         # Let's copy the same selection to all displays.
-        if not common.sway and common.display_boxes_list:
+        if not common.sway and common.env['wayland'] and 
common.display_boxes_list:
             selection = combo.get_active()
             for box in common.display_boxes_list:
                 box.mode_combo.set_active(selection)
@@ -442,7 +442,7 @@
     # Copy modified wallpapers (if any) from temporary to backgrounds folder
     copy_backgrounds()
 
-    if common.sway:
+    if common.sway or common.env['wayland']:
         # Prepare, save and execute the shell script for swaybg. It'll be 
placed in ~/.azotebg for further use.
         batch_content = ['#!/usr/bin/env bash', 'pkill swaybg']
         for box in common.display_boxes_list:
@@ -491,6 +491,8 @@
         command = 'feh --start-at "{}" --scale-down --no-fehbg -d --output-dir 
{}'.format(
             common.selected_wallpaper.source_path, 
common.selected_wallpaper.folder)
     # elif could specify options for other certain programs here
+    elif opener == 'swappy':
+        command = 'swappy -f {}'.format(common.selected_wallpaper.source_path)
     else:
         command = '{} "{}"'.format(opener, 
common.selected_wallpaper.source_path)
     subprocess.Popen(command, shell=True)
@@ -897,7 +899,7 @@
         img.set_from_file('images/icon_picker.svg')
         picker_button.set_image(img)
         picker_button.set_sensitive(common.picker)
-        if common.sway:
+        if common.sway or common.env['wayland']:
             tt = common.lang['screen_color_picker'] if common.picker else 
common.lang['grim_slurp_required']
         else:
             tt = common.lang['screen_color_picker'] if common.picker else 
common.lang['maim_slop_required']
@@ -950,7 +952,7 @@
     Menu for modes needs to differ for swaybg and feh.
     """
     menu = Gtk.Menu()
-    if common.sway:
+    if common.sway or common.env['wayland']:
         for mode in common.modes_swaybg:
             item = Gtk.MenuItem.new_with_label(mode)
             item.connect('activate', apply_to_all_swaybg, mode)
@@ -1001,7 +1003,7 @@
     :return: tuple (rrr, ggg, bbb)
     """
     color = (255, 255, 255)
-    if common.sway:
+    if common.sway or common.env['wayland']:
         try:
             color = hex_to_rgb(subprocess.check_output(
                 'grim -g "$(slurp -p)" -t ppm - | convert - -format 
\'%[pixel:p{0,0}]\' txt:- | awk \'NR==2 {print $3}\'',
@@ -1032,7 +1034,7 @@
     :return: tuple (r, g, b) or (255, 255, 255) if nothing selected
     """
     dominant = (255, 255, 255)
-    if common.sway:
+    if common.sway or common.env['wayland']:
         cmd = 'grim -g "$(slurp)" {}'.format(os.path.join(common.tmp_dir, 
'area.png'))
     else:
         cmd = 'maim -s {}'.format(os.path.join(common.tmp_dir, 'area.png'))
@@ -1578,7 +1580,7 @@
     """
     As the function above, but mode 'fill' will always be used
     """
-    if common.sway:
+    if common.sway or common.env['wayland']:
         apply_to_all_swaybg(button, 'fill')
     else:
         apply_to_all_feh(button, 'fill')
@@ -1650,11 +1652,11 @@
 
         if common.settings.track_files:
             self.ind.set_status(AppIndicator3.IndicatorStatus.ATTENTION)
-            if common.sway:
+            if common.sway or common.env['wayland']:
                 
self.ind.set_icon_full('/usr/share/azote/indicator_attention.png', 'Tracking 
on')
         else:
             self.ind.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
-            if common.sway:
+            if common.sway or common.env['wayland']:
                 
self.ind.set_icon_full('/usr/share/azote/indicator_active.png', 'Tracking off')
 
         self.ind.set_menu(self.menu())
@@ -1687,10 +1689,10 @@
     def switch_indication(self, item):
         if item.get_active():
             self.ind.set_status(AppIndicator3.IndicatorStatus.ATTENTION)
-            if common.sway:
+            if common.sway or common.env['wayland']:
                 
self.ind.set_icon_full('/usr/share/azote/indicator_attention.png', 'Tracking 
on')
         else:
-            if common.sway:
+            if common.sway or common.env['wayland']:
                 
self.ind.set_icon_full('/usr/share/azote/indicator_active.png', 'Tracking off')
             self.ind.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azote-1.7.12/azote/tools.py 
new/azote-1.7.14/azote/tools.py
--- old/azote-1.7.12/azote/tools.py     2020-06-23 02:04:54.000000000 +0200
+++ new/azote-1.7.14/azote/tools.py     2020-09-12 02:05:21.000000000 +0200
@@ -70,6 +70,10 @@
         else:
             common.env['wm'] = 'not sway'
 
+    # sway or not, we may be on Wayland anyway
+    if not common.sway:
+        common.env['wayland'] = os.getenv('WAYLAND_DISPLAY')
+
     fnull = open(os.devnull, 'w')
     common.env['xrandr'] = subprocess.call(["which", "xrandr"], stdout=fnull, 
stderr=subprocess.STDOUT) == 0
 
@@ -106,6 +110,40 @@
         except Exception as e:
             log("Failed checking displays: {}".format(e), common.ERROR)
 
+    elif common.env['wayland']:
+        lines = None
+        try:
+            lines = subprocess.check_output("wlr-randr", 
shell=True).decode("utf-8").strip().splitlines()
+        except Exception as e:
+            print("Wayland, but not sway. Optional wlr-randr package 
required.")
+            log("Failed checking displays: {}".format(e), common.ERROR)
+            exit(1)
+
+        name, w, h, x, y = None, None, None, None, None
+        displays = []
+        for line in lines:
+            if not line.startswith(" "):
+                name = line.split()[0]
+            elif "current" in line:
+                w_h = line.split()[0].split('x')
+                w = int(w_h[0])
+                h = int(w_h[1])
+            elif "Position" in line:
+                x_y = line.split()[1].split(',')
+                x = int(x_y[0])
+                y = int(x_y[1])
+                if name is not None and w is not None and h is not None and x 
is not None and y is not None:
+                    display = {'name': name,
+                               'x': x,
+                               'y': y,
+                               'width': w,
+                               'height': h}
+                    displays.append(display)
+                    log("Output found: {}".format(display), common.INFO)
+
+        displays = sorted(displays, key=lambda x: (x.get('x'), x.get('y')))
+        return displays
+
     # On i3 we could use i3-msg here, but xrandr should also return what we 
need. If not on Sway - let's use xrandr
     elif common.env['xrandr']:
         names = subprocess.check_output("xrandr | awk '/ connected/{print 
$1}'", shell=True).decode(
@@ -269,7 +307,7 @@
         log("Removed {}".format(path), common.INFO)
 
     # backgrounds folder
-    name = 'backgrounds-sway' if common.sway else 'backgrounds-feh'
+    name = 'backgrounds-sway' if common.sway or common.env['wayland'] else 
'backgrounds-feh'
     common.bcg_dir = os.path.join(common.data_home, name)
     if not os.path.isdir(common.bcg_dir):
         os.mkdir(common.bcg_dir)
@@ -361,7 +399,7 @@
     av = 'found' if magick else 'not found'
     log("imagemagick library {}".format(av), common.INFO)
 
-    if common.sway:
+    if common.sway or common.env['wayland']:
         try:
             grim = subprocess.run(['grim', '-h'], 
stdout=subprocess.DEVNULL).returncode == 0
         except FileNotFoundError:
@@ -686,6 +724,11 @@
             self.src_path = settings.src_path
         else:
             save_needed = True
+            
+        # In case the stored wallpapers directory no longer existed
+        if not os.path.isdir(self.src_path):
+            self.src_path = common.sample_dir
+            save_needed = True
 
         try:
             self.sorting = settings.sorting  # 'new' 'old' 'az' 'za'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azote-1.7.12/setup.py new/azote-1.7.14/setup.py
--- old/azote-1.7.12/setup.py   2020-06-23 02:04:54.000000000 +0200
+++ new/azote-1.7.14/setup.py   2020-09-12 02:05:21.000000000 +0200
@@ -8,7 +8,7 @@
 
 setup(
     name='azote',
-    version='1.7.12',
+    version='1.7.14',
     description='Wallpaper manager for Sway, i3 and some other WMs',
     packages=['azote'],
     include_package_data=True,


Reply via email to