Display mails sequentially

<3456 to @railsbros-dirk for helping out!
This commit is contained in:
Sebastian Schulze 2015-11-25 21:08:44 +01:00
parent 7f212d98ec
commit 7fb8029422
1 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,8 @@ m = JSON.parse(unread)
# Display a random subject from unread messages
if m.count > 0
puts "#{m.count} [#{m.shuffle.first['subject']}]"
index = Time.now.strftime("%S").to_i / (60 / m.count)
puts "#{index + 1} / #{m.count} [#{m[index]['subject']}]"
exit(33)
end