From c4826fd21340d34e3592b0c8ca24fc068e52c6ef Mon Sep 17 00:00:00 2001 From: streetturtle Date: Mon, 30 Jan 2017 21:38:50 -0500 Subject: new widgets added --- RatesWidget/rates.lua | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 RatesWidget/rates.lua (limited to 'RatesWidget/rates.lua') diff --git a/RatesWidget/rates.lua b/RatesWidget/rates.lua deleted file mode 100644 index 6fa2e47..0000000 --- a/RatesWidget/rates.lua +++ /dev/null @@ -1,39 +0,0 @@ -local wibox = require("wibox") -local awful = require("awful") - -rateWidget = wibox.widget.textbox() - --- DBus (Command are sent to Dbus, which prevents Awesome from freezŅƒ) -sleepTimerDbus = timer ({timeout = 1800}) -sleepTimerDbus:connect_signal ("timeout", - function () - awful.util.spawn_with_shell("dbus-send --session --dest=org.naquadah.awesome.awful /com/console/rate com.console.rate.rateWidget string:$(python ~/.config/awesome/rates/rates.py)" ) - end) -sleepTimerDbus:start() -sleepTimerDbus:emit_signal("timeout") - -dbus.request_name("session", "com.console.rate") -dbus.add_match("session", "interface='com.console.rate', member='rateWidget' " ) -dbus.connect_signal("com.console.rate", - function (...) - local data = {...} - local dbustext = data[2] - rateWidget:set_text(dbustext) - end) - --- The notification popup which shows rates for other currencies -function showRatesPopup() - naughty.notify({ - title = "Rates", - text = awful.util.pread("python ~/.config/awesome/rates/ratesPopup.py"), - icon = "/home/username/.config/awesome/rates/currency.png", - icon_size = 100, - timeout = 10, - width = 300, - padding = 100, - fg = "#ffffff", - bg = "#333333aa", - }) -end - -rateWidget:connect_signal("mouse::enter", function() showRatesPopup() end) \ No newline at end of file -- cgit v1.2.3