mirror of https://github.com/lcpz/lain.git
widget.imap: ensure to get unseen messages; #400
This commit is contained in:
parent
4dbf7b9f5b
commit
53ebca2867
|
@ -9,8 +9,7 @@ local helpers = require("lain.helpers")
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local string = { format = string.format,
|
local string = string
|
||||||
gsub = string.gsub }
|
|
||||||
local type = type
|
local type = type
|
||||||
local tonumber = tonumber
|
local tonumber = tonumber
|
||||||
|
|
||||||
|
@ -59,7 +58,7 @@ local function factory(args)
|
||||||
head_command, server, port, mail, password, request)
|
head_command, server, port, mail, password, request)
|
||||||
|
|
||||||
helpers.async(curl, function(f)
|
helpers.async(curl, function(f)
|
||||||
_, mailcount = string.gsub(f, "%d+", "")
|
mailcount = tonumber(f:match("UNSEEN (%d+)"))
|
||||||
widget = imap.widget
|
widget = imap.widget
|
||||||
settings()
|
settings()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue