Introduction
Introduction Statistics Contact Development Disclaimer Help
index.md - sites - public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log
Files
Refs
---
index.md (2098B)
---
1 Non-blocking stdin
2 ==================
3
4 Description
5 -----------
6 A patch to have dmenu read stdin in a non blocking way, making it wait
7 for input both from stdin and from X. This way, you can continue feeding
8 dmenu while you type. This patch can be used along with the incremental
9 patch, so that you can use stdout to feed stdin.
10
11 Example:
12 # Make a fifo and read from it for dmenu's input
13 mkfifo foo
14 while true; do cat foo; done | dmenu -w "$(xdotool getactivewind…
15
16 # Append some items
17 printf %b "foo\nbar\nbaz\n" > foo
18 # Append some more items
19 printf %b "food\nbarn" > foo
20
21 ## nonblockingstdincontrol variant
22 The nonblockingstdincontrol variant of this patch allows you to use
23 control characters to dynamically clear the options list and set curr
24 & sel. So in addition to being able to append entries with the normal
25 version of the nonblockingstdin patch, this variant effectively makes
26 dmenu's option list continouslly reloadable and the selected item /
27 positioning controllable at runtime.
28
29 Supported Control Characters:
30
31 - \f - Clear the current items prior to following line
32 - \a - Set the following line to be equal to sel
33 - \b - Set the following line to be equal to curr
34
35 Example:
36 # Make a fifo and read from it for dmenu's input
37 mkfifo foo
38 while true; do cat foo; done | dmenu -w "$(xdotool getactivewind…
39
40 # And then separately, load a first set of options:
41 printf %b "\ffoo\nbar\nbill" > foo
42 # Load a different set of options using the \f escape:
43 printf %b "\fbark\nbarn\nboo" > foo
44 # Using \f, \a, and \b - load a different set of options & pres…
45 printf %b "\f\bbark\n\abarn\nboo" > foo
46
47 Download
48 --------
49 * [dmenu-nonblockingstdincontrol-4.9.diff](dmenu-nonblockingstdincontrol…
50 * [dmenu-nonblockingstdin-4.9.diff](dmenu-nonblockingstdin-4.9.diff)
51 * [dmenu-nonblockingstdin-20160702-3c91eed.diff](dmenu-nonblockingstdin-…
52
53 Author
54 ------
55 * Christophe-Marie Duquesne <[email protected]>
56 * koniu at riseup.net (update for 20160615 git master)
57 * Miles Alan - [email protected] (nonblockingstdincontrol)
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.