refactor: enforce noctalia.getConfig across community plugins
This commit is contained in:
+4
-4
@@ -13,10 +13,10 @@ function update()
|
||||
local secondsSinceMidnight: number = (os.time() + BIEL_OFFSET_SECONDS) % 86400 -- 86400 = seconds in one day
|
||||
local totalCentibeats: number = math.floor(secondsSinceMidnight / SECONDS_PER_CENTIBEAT)
|
||||
-- define display of subbeat toggle
|
||||
local useCentibeats: boolean = barWidget.getConfig("show_centibeats")
|
||||
local useCentibeats: boolean = noctalia.getConfig("show_centibeats")
|
||||
-- define display of @beats toggle
|
||||
local showSuffix: boolean = barWidget.getConfig("beat_display")
|
||||
local timeFormatToggle: boolean = barWidget.getConfig("time_format_toggle")
|
||||
local showSuffix: boolean = noctalia.getConfig("beat_display")
|
||||
local timeFormatToggle: boolean = noctalia.getConfig("time_format_toggle")
|
||||
local checkValue: number = useCentibeats and totalCentibeats or math.floor(totalCentibeats / 100)
|
||||
-- layout updates when values tick
|
||||
if checkValue ~= lastValue then
|
||||
@@ -42,4 +42,4 @@ function update()
|
||||
-- defines targeting of next whole beat change (+100ms padding)
|
||||
noctalia.setUpdateInterval(math.floor((secondsToNextBeat * 1000) + 100))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user