Re: run a shell command interactively

On Fri, 31 Mar 2006 09:20:12 +0800
"William Xu" <william xwl gmail com> wrote:

> Hi people,
> Is there a sawfish command, which will pop up a small shell command
> line, in which i can type some command there and execute. I thought
> there used to be some key to invoke this, but i can't call it back.

I have a slightly different approach to this problem. I have a small wish script that gets the current selection:
---- cut here ----

wm withdraw .

if [catch {set select [selection get -selection CLIPBOARD]}] {
    if [catch {set select [selection get -selection PRIMARY -type STRING]}] {
        set select ""

puts $select

exit 0
---- cut here ----

I have this script saved as "getsel" in my path, and then I use the following menu item:

    (,(_"Navigate") (system "openURL \"$(getsel)\" &"))

where openURL is a script that invokes a command to open the URL given on the command line.

You could replace getsel with an appropriate zenity command line (if you have gnome) to get the effect you want. something like:

    (,(_"Navigate") (system "openURL \"$(zenity --entry --text URL:)\" &"))


|                Larry Daffner               |   email: vizzie airmail net    |
|   |     #include <disclaimer.h>    |
    Reality is the part that refuses to go away when I stop believing in it.
                               -- Phillip K. Dick

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]