mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
prompt: Only show error messages
Ever since awesome.spawn() also returns the pid of the started process, the prompt accidentally displayed the pid of processes that it started. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
353872a45f
commit
ac2ff7f7a7
1 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,7 @@ local completion = require("awful.completion")
|
|||
local util = require("awful.util")
|
||||
local prompt = require("awful.prompt")
|
||||
local layout = require("awful.widget.layout")
|
||||
local type = type
|
||||
|
||||
module("awful.widget.prompt")
|
||||
|
||||
|
@ -19,7 +20,12 @@ module("awful.widget.prompt")
|
|||
local function run(promptbox)
|
||||
return prompt.run({ prompt = promptbox.prompt },
|
||||
promptbox.widget,
|
||||
function (...) promptbox.widget.text = util.spawn(...) end,
|
||||
function (...)
|
||||
local result = util.spawn(...)
|
||||
if type(result) == "string" then
|
||||
promptbox.widget.text = result
|
||||
end
|
||||
end,
|
||||
completion.shell,
|
||||
util.getdir("cache") .. "/history")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue