![]() |
![]()
| ![]() |
![]()
NAME
SYNOPSIS
DESCRIPTION
There are two modes of operation, interactive and batch.
Interactive mode is enabled by running Otherwise, batch mode is enabled:
INTERACTIVE MODEThis mode is similar to running an interactive lua(1) shell. Tab completion for notion's Lua API is available, as well as line-editing. Code that has been entered is evaluated by notion as soon as it is a complete Lua statement. The result is displayed after which the next statement can be entered. ENVIRONMENT
SECURITY
$ xprop -root _NOTION_MOD_NOTIONFLUX_SOCKET _NOTION_MOD_NOTIONFLUX_SOCKET(STRING) = "/tmp/fileuj6onu" EXAMPLESThe command $ notionflux -e "return notioncore.current():name()" "emacs: notionflux.1" will display the title of the currently focused window, while $ notionflux -e "print(notioncore.current():name())" "emacs: notionflux.1" nil will collect the messages and print them before returning. In
order to write to notion's standard output (usually
~/.xsession-errors), like print used to in previous
versions of $ notionflux -e 'io.stdout:write("hello .xsession-errors!\n")' nil Using input redirection: $ echo "return notioncore.current()" | notionflux WClientWin: 0x9bb6b8 Using interactive mode: $ notionflux lua> notioncore.current():rootwin_of() WRootWin: 0x8c9688 lua> do ...> local x = 42 -- Lua defaults to global scope, don't litter ...> return x ...> end 42 lua> ^D In any response from mod_notionflux, strings are quoted in a way
that can be directly pasted back into a Lua interpreter to yield the same
string, while other types are turned into their string representation using
SEE ALSOConfiguring and extending Notion with Lua /usr/local/share/doc/notion/ HISTORYAn ionflux command appeared in ion3 around 2004. It was adapted to notion by the notion development team when notion was forked from ion3 in 2010. AUTHORS
BUGSCurrently, the script must be 4095 bytes or shorter. If you need more, consider passing a filename, which is passed to notion for evaluation and therefore circumvents this limit.
|