Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
291 lines (137 sloc) 4.32 KB
.TH hackide 1 "June 12, 2011" "version 0.1beta!" "USER COMMANDS"
hackide \- creates a persistent work environment in a terminal.
.B hackide
.B hackide
.B hackide test-layout
.B hackide
<context-template> <parameters...>
.B hackide files
.B hackide templates
When invoked with a single filename as argument,
.B hackide
builds or restores a tmux session from a work-context description file (see section
). In a session, a number of tasks are laid out in a single window by successively splitting panes. Each task runs one command repetitively, so the command will respawn if it quits. The tasks can define a number of resource files to store its state and achieve persistence.
.B hack-ide
can handle multiple windows, each with their own layout.
One can query the resource files related to a work-context by putting
.B files
before the description filename.
.B hackide
also defines task templates to simplify writing the work-context description files. Invoke with the single argument
.B templates
to view the existing templates, as well as the template directory.
.SS work-context description
This file contains five different types of lines :
context <context-name>
This line defines the context name, which will become the tmux session name.
task <name> => <template> [working-directory] [command-parameters]
This line declares a task.
.B <name>
may be followed (without SPACES !) by a comma-delimited list of rc file definitions in the form
"rc:<key>:<filename>". This will create an empty resource file by the name filename and this file can be mentioned in the command parameters by writing "%key%".
embed <filename> <alias> <parameters...>
Embed another context inside this one. The contents of filename are expanded with a dictionary containing the alias name in
.I prefix
and positional arguments from
.B parameters
.I 1, 2, 3...
(this is unbounded, if you provide 999 words on the parameter line, %999% will be defined) and the result is read like a .hackide file. You can then use the alias directly in the layout definition.
layout <layout-definition>
A layout consists of either horizontal or vertical splits of the terminal window. The syntax for a split is
.B ( <first> <split-direction> <size-of-second-pane-in-%> <second> )
.I first
.I second
are either a task name or a split.
.I split-direction
.B |
for an horizontal split
.B --
for a vertical split.
For instance, "(foo |50 (bar --50 baz))" creates a window with task
.I foo
in the left half and task
.I bar
on top of task
.I baz
in the right half.
window <window-name> <layout-definition>
Creates a secondary window named
.I window-name
And containing the specified layout. The initial window will be focused at startup.
.B Example:
context test
task editor => vim
task sandbox,rc:pyhist:sandbox.pyhistory => cmd ./py PYHISTORY=%pyhist% python -i
task shell => interactive_shell .
layout ((sandbox --90 shell) |90 editor)
.SS task template
Task templates contain three types of directives :
RC <key> <template_filename> (EMPTY|CONTENT)
Declares a resource file. When a task is created using this template, the
.I template_filename
is expanded using the dictionary of the task, that is :
If the last word is CONTENT, the file will be initialized from the template expansion of all the following lines until the line "END <key> CONTENT", where <key> is still the same.
CMD ...
Sets the command template. Whatever is on the right of the space after "CMD" will be expanded using the task dictionary.
Starts the documentation bloc. This directive should appear only once. The documentation is displayed when
.B hack-ide templates
is invoked. Documentation ends with a line that contains "END DOC".
Call context templates from the commandline.
Sometimes when killing an interpreter the pane will die too. Need some ^D catching somewhere.
Damien "bl0b" Leroux (damien.leroux (at)