summaryrefslogtreecommitdiff
path: root/rc.lua
diff options
context:
space:
mode:
authorache <ache@ache.one>2020-04-19 10:13:15 +0200
committerache <ache@ache.one>2020-04-19 10:13:15 +0200
commit20fb5304ed5da71a73cfdd41d553270ec0af451f (patch)
tree8858e7c4c2ea828ec1015eb8e9df41731d3d30ce /rc.lua
parentSakura term (diff)
Update status bar
Diffstat (limited to 'rc.lua')
-rw-r--r--rc.lua57
1 files changed, 29 insertions, 28 deletions
diff --git a/rc.lua b/rc.lua
index b6db451..6930da4 100644
--- a/rc.lua
+++ b/rc.lua
@@ -149,40 +149,43 @@ cpuwidget = lain.widgets.cpu({
settings = function()
int_cpu_usage = tonumber(cpu_now.usage)
widget:set_markup(markup("#cb66cb", "") .. cpu_now.usage .. "%")
- end
-})
+ end, timeout=10})
-- MPD
-- mpdwidget = lain.widgets.mpd()
+gputemp = wibox.widget.textbox()
+vicious.register(gputemp, vicious.widgets.thermal, {"sys"}, 5)
+
mpdwidget = wibox.widget.textbox()
-- Register widget
--- vicious.register(mpdwidget, vicious.widgets.mpd,
--- function (mpdwidget, args)
--- if args["{state}"] == "Stop" then
--- return ""
--- else
--- if not (args["{Artist}"] == 'N/A') then
--- if not (args["{Title}"] == 'N/A') then
--- return markup.bold(args["{Artist}"]..' - '.. args["{Title}"]) .. " / "
--- else
--- return markup.bold(args["{Artist}"] ) .. " / "
--- end
--- else
--- if not (args["{Title}"] == 'N/A') then
--- return markup.bold(args["{Title}"]) .. " / "
--- end
--- return ''
--- end
--- end
--- end, 10)
+vicious.register(mpdwidget, vicious.widgets.mpd,
+ function (mpdwidget, args)
+ if args["{state}"] == "Stop" then
+ return ""
+ else
+ if not (args["{Artist}"] == 'N/A') then
+ if not (args["{Title}"] == 'N/A') then
+ return markup.bold(args["{Artist}"]..' - '.. args["{Title}"]) .. " / "
+ else
+ return markup.bold(args["{Artist}"] ) .. " / "
+ end
+ else
+ if not (args["{Title}"] == 'N/A') then
+ return markup.bold(args["{Title}"]) .. " / "
+ end
+ return ''
+ end
+ end
+ end, 5
+)
-- MEM
memwidget = lain.widgets.mem({
settings = function()
int_mem_now_used = tonumber(mem_now.used)
widget:set_markup(markup.fg.color("#dda", mem_now.used .. "M"))
- end
+ end, timeout=5
})
@@ -207,9 +210,7 @@ volumewidget = lain.widgets.alsa({
vlevel = vlevel .. "%"
end
widget:set_markup(markup.fg.color("#ccaacc", vlevel))
- end
-})
-
+ end , timeout=3})
-- Separators
first = wibox.widget.textbox(markup.font("Terminus 4", " "))
@@ -228,7 +229,7 @@ local lastInt = ''
local lastEssid = ''
function act()
- vicious.force({ mpdwidget, })
+ -- vicious.force(mpdwidget)
--{{ Batterie notification
awful.spawn.easy_async("bash -c \"acpi | cut -d' ' -f3 \"",
function(stdout, stderr, reason, exit_code)
@@ -355,14 +356,14 @@ function act()
elseif res == "" then
myemailwidget:set_text ( "☠" )
else
- myemailwidget:set_text ( "📧" )
+ myemailwidget:set_text ( "📧" .. res)
naughty.notify({ preset = naughty.config.presets.normal,
title = "T'as un email",
text = string.gsub(res, "\n", "") .. " new mails !" })
end
end)
- end
+ end
act()