summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.lua1
-rw-r--r--osd.lua2
-rw-r--r--rx.lua21
3 files changed, 17 insertions, 7 deletions
diff --git a/config.lua b/config.lua
index 3de93ca..e4a9c82 100644
--- a/config.lua
+++ b/config.lua
@@ -20,6 +20,7 @@ config.bg_hover_alpha = '66'
config.colour = {
title = '999999',
option = 'ffffff',
+ option_dim = '999999',
info = '666666',
group = 'ffdd99',
group_empty = '776644',
diff --git a/osd.lua b/osd.lua
index 2a05018..9ec9dce 100644
--- a/osd.lua
+++ b/osd.lua
@@ -226,7 +226,7 @@ end
function mt:option_text(opt, info)
local str = opt.name
- local col = colour.option
+ local col = opt.ended and colour.option_dim or colour.option
if info.selected then
col = info.empty and colour.selected_empty or colour.selected
elseif info.empty then
diff --git a/rx.lua b/rx.lua
index 007ca13..c509559 100644
--- a/rx.lua
+++ b/rx.lua
@@ -240,19 +240,28 @@ end
local programme_mt = {
__index = function(t, k)
- if k == 'active' then
+ if k == 'active' or k == 'ended' then
local time = osd.redraw_time
if t._exp and time < t._exp then
- return t._active
+ if k == 'active' then
+ return t._active
+ end
+ return t._ended
end
local v = t.programme
- local ret = time >= v.start and time < v.stop
+ local ended = time >= v.stop
+ local active = not ended and time >= v.start
local exp = time < v.start and v.start or
- ret and v.stop or nil
- rawset(t, exp and '_active' or 'active', ret)
+ active and v.stop or nil
+ rawset(t, exp and '_active' or 'active', active)
+ rawset(t, exp and '_ended' or 'ended', ended)
rawset(t, '_exp', exp)
- return ret
+
+ if k == 'active' then
+ return active
+ end
+ return ended
end
end,
}