]>
git.madduck.net Git - etc/awesome.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
c6fadc6 )
12 files changed:
function abase.update()
async.request(cmd, function(f)
function abase.update()
async.request(cmd, function(f)
+ output = f:read("*all ")
f:close()
widget = abase.widget
settings()
f:close()
widget = abase.widget
settings()
function alsa.update()
local f = assert(io.popen(string.format("%s get %s", alsa.cmd, alsa.channel)))
function alsa.update()
local f = assert(io.popen(string.format("%s get %s", alsa.cmd, alsa.channel)))
- local mixer = f:read("*a")
+ local mixer = f:read("*all ")
f:close()
volume_now = {}
f:close()
volume_now = {}
function alsabar.update()
-- Get mixer control contents
local f = assert(io.popen(string.format("%s get %s", alsabar.cmd, alsabar.channel)))
function alsabar.update()
-- Get mixer control contents
local f = assert(io.popen(string.format("%s get %s", alsabar.cmd, alsabar.channel)))
- local mixer = f:read("*a")
+ local mixer = f:read("*all ")
f:close()
-- Capture mixer control state: [5%] ... ... [on]
f:close()
-- Capture mixer control state: [5%] ... ... [on]
function base.update()
local f = assert(io.popen(cmd))
function base.update()
local f = assert(io.popen(cmd))
+ output = f:read("*all ")
f:close()
widget = base.widget
settings()
f:close()
widget = base.widget
settings()
.. calendar.font_size .. "'><b>"
.. f:read() .. "</b>\n\n"
.. f:read() .. "\n"
.. calendar.font_size .. "'><b>"
.. f:read() .. "</b>\n\n"
.. f:read() .. "\n"
- .. f:read("*a"):gsub("\n*$", "")
+ .. f:read("*all "):gsub("\n*$", "")
.. "</span></tt>"
f:close()
.. "</span></tt>"
f:close()
fs:hide()
local f = io.popen(helpers.scripts_dir .. "dfs")
fs:hide()
local f = io.popen(helpers.scripts_dir .. "dfs")
- ws = f:read("*a"):gsub("\n*$", "")
+ ws = f:read("*all "):gsub("\n*$", "")
f:close()
notification = naughty.notify({
f:close()
notification = naughty.notify({
if not is_plain
then
local f = io.popen(password)
if not is_plain
then
local f = io.popen(password)
- password = f:read("*a"):gsub("\n", "")
+ password = f:read("*all "):gsub("\n", "")
head_command, server, port, mail, password, request)
async.request(curl, function(f)
head_command, server, port, mail, password, request)
async.request(curl, function(f)
f:close()
_, mailcount = string.gsub(ws, "%d+", "")
f:close()
_, mailcount = string.gsub(ws, "%d+", "")
local np = io.popen("find " .. line ..
"/new -mindepth 1 -type f " ..
"-not -name '.*' -printf a")
local np = io.popen("find " .. line ..
"/new -mindepth 1 -type f " ..
"-not -name '.*' -printf a")
- local mailstring = np:read("*a")
+ local mailstring = np:read("*all ")
-- Strip off leading mailpath.
local box = string.match(line, mailpath .. "/*([^/]+)")
-- Strip off leading mailpath.
local box = string.match(line, mailpath .. "/*([^/]+)")
function net.get_device()
f = io.popen("ip link show | cut -d' ' -f2,9")
function net.get_device()
f = io.popen("ip link show | cut -d' ' -f2,9")
f:close()
ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN")
if ws ~= nil then
f:close()
ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN")
if ws ~= nil then
function update()
local f = io.open("/proc/loadavg")
function update()
local f = io.open("/proc/loadavg")
- local ret = f:read("*a")
+ local ret = f:read("*all ")
f:close()
load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)")
f:close()
load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)")
local f = io.open(tempfile)
if f ~= nil
then
local f = io.open(tempfile)
if f ~= nil
then
- coretemp_now = tonumber(f:read("*a")) / 1000
+ coretemp_now = tonumber(f:read("*all ")) / 1000
f:close()
else
coretemp_now = "N/A"
f:close()
else
coretemp_now = "N/A"
function weather.forecast_update()
local cmd = string.format(forecast_call, city_id, units, lang, cnt)
async.request(cmd, function(f)
function weather.forecast_update()
local cmd = string.format(forecast_call, city_id, units, lang, cnt)
async.request(cmd, function(f)
f:close()
weather_now, pos, err = json.decode(j, 1, nil)
f:close()
weather_now, pos, err = json.decode(j, 1, nil)
weather.notification_text = ''
for i = 1, weather_now["cnt"] do
local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"])))
weather.notification_text = ''
for i = 1, weather_now["cnt"] do
local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"])))
- day = string.gsub(f:read("*a"), "\n", "")
+ day = string.gsub(f:read("*all "), "\n", "")
f:close()
tmin = math.floor(weather_now["list"][i]["temp"]["min"])
f:close()
tmin = math.floor(weather_now["list"][i]["temp"]["min"])
function weather.update()
local cmd = string.format(current_call, city_id, units, lang)
async.request(cmd, function(f)
function weather.update()
local cmd = string.format(current_call, city_id, units, lang)
async.request(cmd, function(f)
f:close()
weather_now, pos, err = json.decode(j, 1, nil)
f:close()
weather_now, pos, err = json.decode(j, 1, nil)