Manipulate primary selections on the fly, typically used as Lightweight Dictionaries For support, please report issues in time via the Homepage link below rather than the review section below it
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
| Version | Status |
|---|---|
| 83 | Active |
| 82 | Active |
| 81 | Active |
| 80 | Active |
| 79 | Active |
| 78 | Active |
| 77 | Active |
| 76 | Active |
| 75 | Rejected |
| 74 | Active |
| 73 | Rejected |
| 72 | Rejected |
| 71 | Active |
| 70 | Inactive |
| 69 | Inactive |
| 68 | Active |
| 67 | Active |
| 66 | Rejected |
| 65 | Active |
| 64 | Inactive |
| 63 | Inactive |
| 62 | Inactive |
| 61 | Inactive |
| 60 | Inactive |
| 59 | Inactive |
| 58 | Active |
| 57 | Inactive |
| 56 | Inactive |
| 55 | Rejected |
| 54 | Inactive |
| 53 | Inactive |
| 52 | Inactive |
| 51 | Inactive |
| 50 | Rejected |
| 49 | Inactive |
| 48 | Rejected |
| 47 | Active |
| 46 | Inactive |
| 45 | Rejected |
| 44 | Rejected |
| 43 | Rejected |
| 42 | Rejected |
| 41 | Inactive |
| 40 | Rejected |
| 39 | Inactive |
| 38 | Inactive |
| 37 | Rejected |
| 36 | Inactive |
| 35 | Rejected |
| 34 | Rejected |
| 33 | Rejected |
| 32 | Rejected |
| 31 | Inactive |
| 30 | Rejected |
| 29 | Rejected |
| 28 | Active |
| 27 | Active |
| 26 | Rejected |
| 25 | Inactive |
| 24 | Rejected |
| 23 | Inactive |
| 22 | Inactive |
| 21 | Rejected |
| 20 | Rejected |
| 19 | Rejected |
| 18 | Rejected |
| 17 | Rejected |
| 16 | Inactive |
| 15 | Rejected |
| 14 | Inactive |
| 13 | Inactive |
| 12 | Inactive |
| 11 | Inactive |
| 10 | Inactive |
| 9 | Inactive |
| 8 | Inactive |
| 7 | Inactive |
| 6 | Inactive |
| 5 | Inactive |
| 4 | Inactive |
| 3 | Inactive |
| 2 | Inactive |
| 1 | Rejected |
I would strongly recommend you use `Gio.Subprocess` instead of `GLib.spawn_async_with_pipes()`, as it is much safer in language bindings like GJS.
Thanks! Andy, I change the GLib.spwan to Gio.Subprocess and it works, but I am not sure it's right way or not, here is the new version of _lookUp(): _lookUp(text) { try { let rcmd = this._dcommand.split('LDWORD').join(GLib.shell_quote(text)); let proc = new Gio.Subprocess({ argv: ['/bin/bash', '-c', rcmd], flags: (Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_PIPE), }); proc.init(null); let that = this, lines = [], line, read = (() => { return function read_all(stream, exit) { stream.read_line_async(GLib.PRIORITY_LOW, null, (source, res) => { if((line = source.read_line_finish(res)) !== null && line[0] !== null) { lines.push(ByteArray.toString(line[0])); read_all(source, exit); } else { // some code here } else { if(!exit) return; read_all(new Gio.DataInputStream({base_stream: proc.get_stderr_pipe()}), false); } } }); } })(); read(new Gio.DataInputStream({base_stream: proc.get_stdout_pipe()}), true); } catch (e) { Main.notifyError(APPNAME, e.message); } } Any comments?
That looks pretty good. I think it would be easier to use `Gio.Subprocess.communicate_utf8_async()`. It will return a utf8 string and read all the output before returning from the thread: ``` // proc setup proc.communicate_utf8_async(null, null, (proc, res) => { try { let [_, stdout, stderr] = proc.communicate_utf8_finish(proc, res); // the program exited with an error if (proc.get_exit_code() !== 0) { log(stderr); return; } // the program exited without error log(stdout); } catch (e) { // the program failed to execute at all Main.notifyError(APPNAME, e.message); } }); ```
Thanks, it looks much more intuitional and neater now.