Skip to content
111116 edited this page Jul 16, 2017 · 9 revisions

Command line options

green [options] <document1> [<document2> [...]]

Available options:

-fit= with one of none, width, height or page to select the program wide page fitting mode.

Since version 0.2

-width= with an integer greater equal zero (in pixels) to specify the startup window width.
-height= with an integer greater equal zero (in pixels) to specify the startup window height.
-fullscreen startup in fullscreen mode.
-no-fullscreen startup in window mode.
-config= with the filename of a valid configuration file to read the specified configuration.
-scheme= with an <id list> (see below) to select a different scheme.

Operation commands

Program Operation

Go to next open document
 <TAB> 

Go to n-th document
 <F<n>> 

Escape current input mode
 <ESC> 

Quit
q

Document Operation

Scrolling

Scroll left:

 <ARROW LEFT> 

Scroll right:
 <ARROW RIGHT> 

Scroll up:
 <ARROW UP> 

Scroll down:
 <ARROW DOWN> 

Go to previous page
 <PAGE UP> 

Go to next page
 <PAGE DOWN> 

Go to page n
 g<n><RETURN> 

Zooming

Zoom in:

 + 

Zoom out:

Fitting

Disable page fitting mode:

fn

Fit page width:
fw

Fit page height:
fh

Fit whole page:
fp

Search

Start search for string X:

 s<X><RETURN> 

Show next result:
n

Close document
c

Configuration file

Introduction

In version 0.2 configuration file support was added. If compiled as is the program does the following:
It looks whether any configuration file was specified on the command line

green -config=<configuration file>

If not it tries to find a user configuration file
$(HOME)/.green.conf

If there isn’t any it looks for a system configuration file
/usr/local/etc/green.conf

Example

# This is a sample configuration file
SCHEME normal
{
    Width = 800
    Height = 600
}

SCHEME presentation
{
    Fullscreen = Yes
}

DEFAULT_SCHEME normal

Format

In general this configuration file is case sensitive if not otherwise noted. The ‘#’ is a comment character which makes the program ignore all characters from this to the end of line. This is a line based format so the line end character is very important. You may add empty lines or lines with comments everywhere but be carful if reducing newlines and do not add newlines between things that are written on one line.

Definitions

<identifier> : a unique sequence of one or more characters (‘a’-‘z’ lower-case only, ‘0’-‘9’ and ‘_’)
<id list> : a comma seperated line of one or more identifiers

First Level

DEFAULT_SCHEME

DEFAULT_SCHEME <id list>

Selects the default scheme that is used if no -scheme command line option is used.

SCHEME

SCHEME <identifier>
{
<Second Level- SCHEME>
}

Defines a new scheme and its properties.

Second Level

SCHEME

!<identifier>

The ‘!’ is a include/execute-in-place character which allows inclusion of other schemes.

<property> = <value>

Multiple occurences of the same property are allowed but the last occurence is always used. This is also valid for included schemes.

property allowed values
Width a number greater or equal 0 (in pixels)
Height a number greater or equal 0 (in pixels)
Fullscreen yes or no
Fit none, width, height or page
Cursor.Visibility visible, invisible or a timeout greater 0 (in ms) after which a unused cursor goes invisible
Cursor.Border size=<percent>, speed=<frac>
Mouse turn mouseflag 0 or 1
Background.Color (see “Color values” below)
Highlight.Color (see “Color values” below)
Highlight.Alpha either an integer between 0 (transparent) and 255 (solid) or in percent 0% to 100%

Color values
You can use a customized color value using hexadecimal notation “0xRRGGBB” where R, G and B are replaced with the hexadecimal red, green and blue components or you can use a predefined HTML color name: black, gray, silver, white, maroon, red, green, lime, olive, yellow, navy, blue, purple, fuchsia, teal or aqua.