Update some scripts
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
-- name = "Amdroid Next Alarm"
|
||||
-- description = "AIO wrapper for the Amdroid next alarm app widget"
|
||||
-- description = "AIO wrapper for the Amdroid Next alarm app widget"
|
||||
-- type = "widget"
|
||||
-- author = "Theodor Galanis"
|
||||
-- version = "1.0.2"
|
||||
-- author = "Theodor Galanis (t.me/TheodorGalanis)"
|
||||
-- version = "1.10"
|
||||
-- foldable = "false"
|
||||
-- uses_app = "com.amdroidalarmclock.amdroid"
|
||||
|
||||
local prefs = require "prefs"
|
||||
|
||||
local next_alarm = ""
|
||||
local accent="#FFFFFF"
|
||||
local accent="#888888"
|
||||
|
||||
function on_resume()
|
||||
if not widgets:bound(prefs.wid) then
|
||||
setup_app_widget()
|
||||
end
|
||||
accent = aio:colors().accent
|
||||
primary = aio:colors().primary_text
|
||||
widgets:request_updates(prefs.wid)
|
||||
end
|
||||
|
||||
@@ -28,8 +29,10 @@ function on_app_widget_updated(bridge)
|
||||
if next_alarm ~= nil
|
||||
then
|
||||
my_gui=gui{
|
||||
{"text", " %%fa:alarm-clock%% <span style=\"color:#FFFFFF\">"..next_alarm.."</span>", {gravity="center_h", color=accent}}
|
||||
}
|
||||
{"icon", "fa:alarm-clock", {gravity="center_h|center_v",color = accent}},
|
||||
{"spacer", 2},
|
||||
{"text", next_alarm, {gravity="anchor_prev"}}
|
||||
}
|
||||
else
|
||||
my_gui=gui{
|
||||
{"text", "Empty", {gravity="center_h" }}
|
||||
@@ -42,6 +45,10 @@ function on_click(idx)
|
||||
w_bridge:click(next_alarm)
|
||||
end
|
||||
|
||||
function on_settings()
|
||||
ui:show_dialog("Amdroid app Next Alarm widget", "This script wrapper uses Amdroid app's Next alarm widget to display the next scheduled alarm. No settings are required.")
|
||||
end
|
||||
|
||||
function setup_app_widget()
|
||||
local id = widgets:setup("com.amdroidalarmclock.amdroid/com.amdroidalarmclock.amdroid.widgets.NextAlarmWidgetProvider")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user