On Mon, Nov 18, 2013 at 3:05 AM, Pete <[email protected]> wrote:

> Hi Guys,
>
> I have a script that checks for a session in tmux and either attaches to
> the session or creates the session.  I'd like to be able to run this from
> the prompt box.  I thought that if I check to see if I'm running an
> interactive shell, I could either run the script or start a urxvtc instance
> and run the script.  Is the prompt box set up to show that it is
> interactive?
>
> I added this thinking it would work but it hasn't and I'm wondering what
> concept I may be missing:
>
> case "$-" in
>   *i*) find.connect ;;
>     *) urxvtc find.connect ;;
> esac
>
> find.connect is a function that looks for the server/session and then
> connects or creates and connects.
>
> Has anyone done this?  What am I missing?
>
> Thanks,
> --
> Pete
>

I have a script that focuses a window based on the title. I have put the
following line in my globalkeys section. I'm not sure this is what you are
looking for, but maybe it would help at least point you in the right
direction.

awful.key({ modkey }, "`", function () awful.prompt.run({ prompt = "focus
session: "}, mypromptbox[mouse.screen].widget, function(input)
awful.util.spawn_with_shell("/usr/local/bin/focus.sh " .. input) end, nil)
end),

--

    Will Tomlinson

Reply via email to