Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package awesome-vicious for openSUSE:Factory 
checked in at 2023-01-18 13:12:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/awesome-vicious (Old)
 and      /work/SRC/openSUSE:Factory/.awesome-vicious.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "awesome-vicious"

Wed Jan 18 13:12:45 2023 rev:10 rq:1059327 version:2.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/awesome-vicious/awesome-vicious.changes  
2022-10-12 18:27:14.786027314 +0200
+++ 
/work/SRC/openSUSE:Factory/.awesome-vicious.new.32243/awesome-vicious.changes   
    2023-01-18 13:13:20.393484334 +0100
@@ -1,0 +2,7 @@
+Mon Jan 16 19:28:39 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.6.0:
+  * Added AMD GPU widget type for Linux.
+  * Fixed typos in contrib widgets documentation.
+
+-------------------------------------------------------------------

Old:
----
  vicious-2.5.1.tar.gz

New:
----
  vicious-2.6.0.tar.gz

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

Other differences:
------------------
++++++ awesome-vicious.spec ++++++
--- /var/tmp/diff_new_pack.uP9uXD/_old  2023-01-18 13:13:20.925487196 +0100
+++ /var/tmp/diff_new_pack.uP9uXD/_new  2023-01-18 13:13:20.929487217 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package awesome-vicious
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %define packname   vicious
 
 Name:           awesome-vicious
-Version:        2.5.1
+Version:        2.6.0
 Release:        0
 Summary:        Vicious plugins for awesome
 License:        GPL-2.0-or-later

++++++ vicious-2.5.1.tar.gz -> vicious-2.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vicious-2.5.1/CHANGELOG.rst 
new/vicious-2.6.0/CHANGELOG.rst
--- old/vicious-2.5.1/CHANGELOG.rst     2022-05-04 03:43:26.000000000 +0200
+++ new/vicious-2.6.0/CHANGELOG.rst     2023-01-03 14:33:31.000000000 +0100
@@ -1,6 +1,13 @@
 Changelog
 =========
 
+Changes in 2.6.0
+----------------
+
+Added AMD GPU widget type for Linux.
+
+Fixed typos in contrib widgets documentation.
+
 Changes in 2.5.1
 ----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vicious-2.5.1/docs/source/conf.py 
new/vicious-2.6.0/docs/source/conf.py
--- old/vicious-2.5.1/docs/source/conf.py       2022-05-04 03:43:26.000000000 
+0200
+++ new/vicious-2.6.0/docs/source/conf.py       2023-01-03 14:33:31.000000000 
+0100
@@ -6,12 +6,11 @@
 
 # Project information
 project = 'Vicious'
-copyright = '2020, vicious-widgets'
+copyright = '2020-2023, vicious-widgets'
 author = 'vicious-widgets'
 
 # The full version, including alpha/beta/rc tags
-release = '2.4.2'
-
+release = '2.6.0'
 
 # Add any Sphinx extension module names here, as strings.
 # They can be extensions coming with Sphinx (named 'sphinx.ext.*')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vicious-2.5.1/docs/source/contrib.rst 
new/vicious-2.6.0/docs/source/contrib.rst
--- old/vicious-2.5.1/docs/source/contrib.rst   2022-05-04 03:43:26.000000000 
+0200
+++ new/vicious-2.6.0/docs/source/contrib.rst   2023-01-03 14:33:31.000000000 
+0100
@@ -2,7 +2,7 @@
 ====================
 
 Contrib libraries, or widget types, are extra snippets of code you can use.
-Some are for less common hardware, and other were contributed by Vicious users.
+Some are for less common hardware, and others were contributed by Vicious 
users.
 The contrib directory also holds widget types that were obsoleted or rewritten.
 Contrib widgets will not be imported by init unless you explicitly enable it,
 or load them in your ``rc.lua``.
@@ -158,9 +158,9 @@
   * ``$2``: Usage of GPU memory
   * ``$3``: Usage of video engine
   * ``$4``: Usage of PCIe bandwidth
-  * ``$5``: Uemperature of requested graphics device
-  * ``$6``: Urequency of GPU core
-  * ``$7``: Uemory transfer rate
+  * ``$5``: Temperature of requested graphics device
+  * ``$6``: Frequency of GPU core
+  * ``$7``: Memory transfer rate
 
 vicious.contrib.nvsmi
 ^^^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vicious-2.5.1/docs/source/widgets.rst 
new/vicious-2.6.0/docs/source/widgets.rst
--- old/vicious-2.5.1/docs/source/widgets.rst   2022-05-04 03:43:26.000000000 
+0200
+++ new/vicious-2.6.0/docs/source/widgets.rst   2023-01-03 14:33:31.000000000 
+0100
@@ -8,6 +8,16 @@
 passed to :lua:func:`vicious.register`, and return a table of values
 to be formatted by ``format``.
 
+vicious.widgets.amdgpu
+----------------------
+
+Provides GPU and VRAM usage statistics for AMD graphics cards.
+
+Supported platforms: GNU/Linux (require ``sysfs``)
+
+* ``warg`` (from now on will be called *argument*): card ID, e.g. ``"card0"``
+* Returns a table with string keys: ``${gpu_usage}``, ``${mem_usage}``
+
 vicious.widgets.bat
 -------------------
 
@@ -16,7 +26,7 @@
 Supported platforms: GNU/Linux (require ``sysfs``),
 FreeBSD (require ``acpiconf``) and OpenBSD (no extra requirements).
 
-* ``warg`` (from now on will be called *argument*):
+* Argument:
 
   * On GNU/Linux: battery ID, e.g. ``"BAT0"``
   * On FreeBSD (optional): battery ID, e.g. ``"batt"`` or ``"0"``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vicious-2.5.1/widgets/amdgpu_linux.lua 
new/vicious-2.6.0/widgets/amdgpu_linux.lua
--- old/vicious-2.5.1/widgets/amdgpu_linux.lua  1970-01-01 01:00:00.000000000 
+0100
+++ new/vicious-2.6.0/widgets/amdgpu_linux.lua  2023-01-03 14:33:31.000000000 
+0100
@@ -0,0 +1,69 @@
+-- AMD GPU widget type for Linux
+-- Copyright (C) 2022  Rémy Clouard <shikamaru shikamaru fr>
+--
+-- This file is part of Vicious.
+--
+-- Vicious is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as
+-- published by the Free Software Foundation, either version 2 of the
+-- License, or (at your option) any later version.
+--
+-- Vicious is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with Vicious.  If not, see <https://www.gnu.org/licenses/>.
+
+local io = { open = io.open }
+local string = { match = string.match }
+local tonumber = tonumber
+local type = type
+
+local helpers = require("vicious.helpers")
+
+local _mem = nil
+
+-- {{{ AMDGPU widget type
+return helpers.setcall(function (format, warg)
+    if not warg then return end
+
+    -- see https://www.kernel.org/doc/html/v5.9/gpu/amdgpu.html#busy-percent
+    local amdgpu = "/sys/class/drm/"..warg.."/device"
+    local _data = {}
+
+    local f = io.open(amdgpu .. "/gpu_busy_percent", "r")
+    if f then
+        _data["{gpu_usage}"] = f:read("*line")
+        f:close()
+    else
+        _data["{gpu_usage}"] = "N/A"
+    end
+
+    if _mem == nil then
+        f = io.open(amdgpu .. "/mem_info_vram_total", "r")
+        if f then
+            _mem = tonumber(string.match(f:read("*line"), "([%d]+)"))
+            f:close()
+        end
+    end
+
+    f = io.open(amdgpu .. "/mem_info_vram_used", "r")
+    if f then
+        local _used = tonumber(string.match(f:read("*line"), "([%d]+)"))
+        if type(_used) == 'number' and type(_mem) == 'number'
+           and _mem > 0 then
+            _data["{mem_usage}"] = _used/_mem*100
+        else
+            _data["{mem_usage}"] = "N/A"
+        end
+        f:close()
+    else
+        _data["{mem_usage}"] = "N/A"
+    end
+
+    return _data
+
+end)
+--}}}

Reply via email to