Robert, there are lots of ways to skin this cat, but here is a simple
example that lets you ssh to a host by using Modkey + s, then typing the
hostname in the prompt. Put it in your globalkeys table and restart
awesome. I have something similar that looks through my list of clients to
see if I already have a session open and switches to it. Maybe you can
adapt this to your purposes?

    awful.key({ modkey }, "s",
        function () awful.prompt.run({ prompt = "Focus: "},
            mypromptbox[mouse.screen].widget,
            function(input)
                awful.util.spawn_with_shell(terminal .. " -e ssh " .. input)
            end, nil)
        end),

--

    Will Tomlinson

"Perfection is attained not when there is nothing more to add, but when
there is nothing more to remove." --Antoine de Saint-Exupéry


On Thu, Apr 24, 2014 at 9:29 AM, Robert Sharp <[email protected]>wrote:

>  Hi
>
> I am new to Awesome - giving it a go to see if it can improve my working
> desktop. I can see it is going to take some effort but it looks like it
> might be rewarding.
>
> I am looking to start a bunch of windows that ssh into each of my PCs for
> system admin. I wrote a simple lua function using
> awful.util.spawn_with_shell and then thought I could just call the function
> from a menu entry. Nothing happened. I then read further into awful.menu
> and found that it expected a string, presumably to execute itself. So is
> there no way to execute a bit of lua from a menu? If not, is there any
> other way to execute lua script on demand?
>
> Thanks,
> Robert
>

Reply via email to