Re: [i3] i3-input command building

  • From: Michael Stapelberg <michael+i3@xxxxxxxxxxxxx>
  • To: i3-discuss <i3-discuss@xxxxxxxxxxxxx>
  • Date: Fri, 02 Sep 2011 15:38:13 +0200

Hi Henryk,

Sorry I did not reply earlier.

Excerpts from Henryk Hecht's message of 2011-08-28 03:50:28 +0200:

I discovered i3 a day or so ago, and have a number of questions that don't
seem to be covered in the documentation. I don't know if the readers of
the list would prefer one email per question or otherwise, so I'll just
start with the most immediate:
Yes, please post one email per question. If you want to, you could also come to
IRC and get a more rapid response (hopefully) :).

i3-input accepts a -p argument as a prefix to a command, but does not seem
to allow one to have a suffix to what is read; is this correct? The
motivation is to build a goto-by-class binding:
i3-input -p '[class=' -P 'Goto :' '] focus'
Yeah, the goto command was just 'goto' in previous versions (and I think of
re-introducing an alias), so that was never an issue there ;).

but it seems that it ignores anything in argv not in the getopt loop,
leaving no way to build a command where the "interesting" part does not
occur at the end. An equivalent example is found in section 5.7 of the
user guide ("VIM-like marks (mark/goto)"): there appears to be no way to
actually implement this functionality with i3-input, which is recommended
for the task. One could, of course, enter the whole command with
i3-input, or just append "] focus" oneself, but this seems unnecessarily
tedious: hardly a timesaver.
Yep.

Is it better to just ignore i3-input and write a shell script around
i3-msg and xdialog?
The best way of course would be to fix i3-input, probably accepting a format
string and replacing %c for command.

For the readers of this mailing list, there is a ticket which includes a patch:
http://bugs.i3wm.org/ticket/512

Best regards,
Michael

Other related posts:

  • » Re: [i3] i3-input command building - Michael Stapelberg