Package: awesome-extra
Version: 2012061101
Severity: normal
Tags: patch

Dear Maintainer,

the obvious battery widget does not work with awesome 3.5.1, the awesome
version, that is currently in experimental. A patch, which updates the battery
widget and the modules needed for it to work with awesome 3.5.1, is attached
but will possibly break compatibilty to awesome 3.4.15. So if you pick up the
patch, please only upload a new version to experimental or wait until awesome
3.5.1 is in unstable. Thanks.


With best regards,
Julian Wollrath

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10.0-rc6-wl+ (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages awesome-extra depends on:
ii  curl  7.30.0-2

Versions of packages awesome-extra recommends:
ii  awesome  3.4.15-1+b1

awesome-extra suggests no packages.

-- no debconf information
diff -upNr /usr/share/awesome/lib/obvious/battery/init.lua obvious/battery/init.lua
--- /usr/share/awesome/lib/obvious/battery/init.lua	2011-10-31 09:32:43.000000000 +0100
+++ obvious/battery/init.lua	2013-06-17 03:05:31.000000000 +0200
@@ -13,7 +13,7 @@ local os = {
     execute = os.execute
 }
 local capi = {
-    widget = widget,
+    widget = require("wibox.widget"),
     mouse = mouse
 }
 
@@ -26,11 +26,8 @@ local lib = {
 
 module("obvious.battery")
 
-widget = capi.widget({
-    type = "textbox",
-    name = "tb_battery",
-    align = "right"
-})
+widget = capi.widget.textbox()
+
 status = {
     ["charged"] = "↯",
     ["full"] = "↯",
@@ -132,12 +129,12 @@ local function update()
 
     local bat = get_data()
     if not bat then
-        widget.text = "no data"
+        widget:set_markup("no data")
         return
     end
     local color = "#900000"
     if not bat.charge then
-        widget.text = lib.markup.fg.color("#009000", status.charged) .. " A/C"
+        widget:set_markup(lib.markup.fg.color("#009000", status.charged) .. " A/C")
         return
     elseif bat.charge > 35 and bat.charge < 60 then
         color = "#909000"
@@ -157,7 +154,7 @@ local function update()
         battery_status = battery_status .. " " .. awful.util.escape(bat.time)
     end
 
-    widget.text = battery_status
+    widget:set_markup(battery_status)
 end
 
 local function detail ()
diff -upNr /usr/share/awesome/lib/obvious/lib/hooks/init.lua obvious/lib/hooks/init.lua
--- /usr/share/awesome/lib/obvious/lib/hooks/init.lua	2011-10-31 09:32:43.000000000 +0100
+++ obvious/lib/hooks/init.lua	2013-06-17 02:29:57.000000000 +0200
@@ -28,7 +28,7 @@ function timer.register(reg_time, slow_t
         description=descr or "Undescribed timer",
         timer=capi.timer({ timeout = 600 })
     }
-    registry[fn].timer:add_signal("timeout", fn)
+    registry[fn].timer:connect_signal("timeout", fn)
     -- set_speed() will :stop() again and start with the real timeout
     registry[fn].timer:start()
     timer.set_speed(registry[fn].speed, fn)

Reply via email to