DInput

Aus Ethersex_Wiki
Wechseln zu: Navigation, Suche

DInput

What is dinput

dinput (dynamic input) is an fork of dmenu, that is willing to provide an input line for an terminal oriented desktop. It comes with an line editing and an history feature. It's very useful e.g. in scripts or as an very minimalistic shell.

How to use

dinput reads from stdin, until EOF. Every line is appended to the history buffer. You can browse the history with the cursor keys (up/down). When you type enter the actual line is printed to stdout. For further information read the manpage.

Keybindings

You can specify your own keybindings for dinput with appending a semicolon (';') seperated list of key-action pairs. An example of the Syntax:

-e "Tab=insert(hallo);^a=pipe(sed 's/a/b/g');~b=jump(-1)"

Here we define three keybindings. On Tab the string hallo is inserted. On Ctrl+a the actual line is piped through sed and on Mod1+b the cursor will jump after the last character. Following commands are possible:

  • exit(string): exit dinput immediately, and print string, if given
  • insert(string): insert the string at the actual position
  • exec(command): execute the command, the & is appended automatically
  • popen(command): execute the command, and insert its output at the actual position
  • pipe(command): pipe the actual line through the program and replace the actual line with its output
  • jump(position): jump to given positon, -1 or more than the actual length of the line means jumping to last character

News

  • 12/23/2007 - dinput 0.2.1 with improved keybindings and pipe()/jump() support
  • 12/06/2007 - dinput 0.2 with keybindings

Download

Download it here