Skip to content

Instantly share code, notes, and snippets.

@farhaven
Created December 12, 2010 14:48
Show Gist options
  • Save farhaven/738087 to your computer and use it in GitHub Desktop.
Save farhaven/738087 to your computer and use it in GitHub Desktop.
function run_target(promptbox)
return awful.prompt.run({ prompt = promptbox.prompt },
promptbox.widget,
function (...)
local result = awful.util.spawn(...)
if type(result) == "string" then
promptbox.widget:set_text(result)
elseif type(result) == "number" then
client_destination[result] = { mouse.screen, awful.tag.selected() }
end
end,
awful.completion.shell,
awful.util.getdir("cache") .. "/history")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment