Change position of mail widget
This commit is contained in:
parent
e392d4842d
commit
439425b698
9
rc.lua
9
rc.lua
|
@ -33,17 +33,18 @@ for s = 1, screen.count() do
|
||||||
local ltop = widgets.layout(s,"left","top")
|
local ltop = widgets.layout(s,"left","top")
|
||||||
local rtop = widgets.layout(s,"right","top")
|
local rtop = widgets.layout(s,"right","top")
|
||||||
local lbottom = widgets.layout(s,"left","bottom")
|
local lbottom = widgets.layout(s,"left","bottom")
|
||||||
|
local rbottom = widgets.layout(s,"right","bottom")
|
||||||
|
|
||||||
-- {{{
|
-- {{{
|
||||||
widgets.add.mail("mail_me", s, ltop, { os.getenv("HOME") .. "/.maildir/me" })
|
|
||||||
widgets.add.spacer(ltop)
|
|
||||||
widgets.add.mail("mail_uber", s, ltop, { os.getenv("HOME") .. "/.maildir/uber" })
|
|
||||||
widgets.add.spacer(ltop)
|
|
||||||
widgets.add.clock("clock", s, ltop)
|
widgets.add.clock("clock", s, ltop)
|
||||||
|
|
||||||
widgets.add.layout(s, lbottom)
|
widgets.add.layout(s, lbottom)
|
||||||
widgets.add.taglist("tags", s, lbottom)
|
widgets.add.taglist("tags", s, lbottom)
|
||||||
|
|
||||||
|
widgets.add.mail("mail_me", s, rbottom, { os.getenv("HOME") .. "/.maildir/me" }, "bottom_right")
|
||||||
|
widgets.add.spacer(rbottom)
|
||||||
|
widgets.add.mail("mail_uber", s, rbottom, { os.getenv("HOME") .. "/.maildir/uber" }, "bottom_right")
|
||||||
|
|
||||||
widgets.add.cpu("cpu", s, rtop)
|
widgets.add.cpu("cpu", s, rtop)
|
||||||
widgets.add.spacer(rtop)
|
widgets.add.spacer(rtop)
|
||||||
widgets.add.battery("bat", s, rtop, "BAT0")
|
widgets.add.battery("bat", s, rtop, "BAT0")
|
||||||
|
|
|
@ -125,7 +125,7 @@ widgets.layout = get_layout
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- mail widget
|
-- mail widget
|
||||||
local function mailwidget(name, screen, parent_layout, mailboxes) --{{{
|
local function mailwidget(name, screen, parent_layout, mailboxes, notify_pos) --{{{
|
||||||
local widget = wibox.widget.textbox()
|
local widget = wibox.widget.textbox()
|
||||||
local bg = wibox.widget.background()
|
local bg = wibox.widget.background()
|
||||||
bg:set_widget(widget)
|
bg:set_widget(widget)
|
||||||
|
@ -134,7 +134,7 @@ local function mailwidget(name, screen, parent_layout, mailboxes) --{{{
|
||||||
naughty.notify({
|
naughty.notify({
|
||||||
title = "New mail arrived",
|
title = "New mail arrived",
|
||||||
text = "Unread "..args[2].." / New "..args[1],
|
text = "Unread "..args[2].." / New "..args[1],
|
||||||
position = "top_left"
|
position = notify_pos or "top_left"
|
||||||
|
|
||||||
})
|
})
|
||||||
bg:set_bg(theme.bg_urgent)
|
bg:set_bg(theme.bg_urgent)
|
||||||
|
|
Loading…
Reference in a new issue