Skip to content

havardh/workflow

Repository files navigation

Workflow

Join the community on Spectrum

An experiment in declarative windows management with an optional React frontend and an experimental Angular frontend.

What does it do?

Workflow turns declarative windows layouts defined in javascript files ...

export const flow = render(
  <Workspace name={'workflow-react-example'}>
    <SplitH percent={1}>
      <TextEditor percent={0.5} file={__filename} />
      <Browser
        percent={0.5}
        url={'https://github.com/havardh/workflow/tree/master/packages/workflow-cmd'}
      />
    </SplitH>
  </Workspace>,
);

... into open applications populated with arguments in the specified layout on the screen.

Usage

Workflow is a command line tool written for node.

Installing it globally with npm will set up the workflow command. On the first run, a home directory will be set up. The default location is at ~/.workflow. This is overridable with the ``WORKFLOW_HOME` environment variable.

npm install --global workflow

Running the command will by default resolve flow files relative to ~/.workflow/flows or by an absolute path.

workflow Example.js # resolves to ~/.workflow/flows/Example.js
workflow /path/to/file.js # resolves the file directly

Cross platform

Workflow is written in a modular way to allow for extension. There are currently experimental support for osx, windows, and linux using i3 or wmctrl.

Devlopment

The cli.js can be executed in development mode. By default it will use the standard workflow-home directory, which is overridable by WORKFLOW_DEV_HOME. Development mode is activated by setting the environment variable WORKFLOW_DEV_MODE to true. Note, you can set up an additional for dev with the create-workflow-home package.

yarn            # setup all dependencies
yarn bootstrap  # bootstrap lerna
yarn build      # run rollup to build all packages

node ./packages/create-workflow-home/cli.js <workflow-home-dev>
WORKFLOW_DEV_MODE=true WORKFLOW_DEV_HOME=<workflow-home-dev> node ./packages/workflow/cli.js Example.js

Contributions

All contributions to workflow are welcome. Checkout the Contributions guide to get started.

Code of conduct

By making a contribution to this project you agree to abide by the Code of Conduct.