Escape passwords

This commit is contained in:
Thomas Forgione 2022-01-06 10:40:34 +01:00
parent 95f460d78d
commit 26793c6bdd
1 changed files with 3 additions and 3 deletions

View File

@ -20,14 +20,14 @@ local password1 = ''
local password2 = '' local password2 = ''
local password3 = '' local password3 = ''
awful.spawn.easy_async_with_shell('pass web/mail.ovh.com; pass web/webmail.gandi.net; pass web/inp-toulouse.fr;', function(stdout) awful.spawn.easy_async_with_shell('pass web/mail.ovh.com; pass web/webmail.gandi.net; pass web/cas.inp-toulouse.fr;', function(stdout)
s = split(stdout, '\n') s = split(stdout, '\n')
password1 = s[1] password1 = s[1]
password2 = s[2] password2 = s[2]
password3 = s[3] password3 = s[3]
watch( watch(
"bash -c '" .. home .. "/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py " .. password1 .. " " .. password2 .. " " .. password3 .. "'", 60, "bash -c '" .. home .. "/.config/awesome/awesome-wm-widgets/email-widget/count_unread_emails.py \"" .. password1 .. "\" \"" .. password2 .. "\" \"" .. password3 .. "\"'", 60,
function(widget, stdout, stderr, exitreason, exitcode) function(widget, stdout, stderr, exitreason, exitcode)
local unread_emails_num = tonumber(stdout) or 0 local unread_emails_num = tonumber(stdout) or 0
@ -65,7 +65,7 @@ function split(str, delimiter)
end end
function show_emails(timeout) function show_emails(timeout)
awful.spawn.easy_async_with_shell(home .. "/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py " .. password1 .. " " .. password2 .. " " .. password3, awful.spawn.easy_async_with_shell(home .. "/.config/awesome/awesome-wm-widgets/email-widget/read_unread_emails.py \"" .. password1 .. "\" \"" .. password2 .. "\" \"" .. password3 .."\"",
function(stdout, stderr, reason, exit_code) function(stdout, stderr, reason, exit_code)
s = split(stderr, '\n') s = split(stderr, '\n')