The way that Rogallo works can be configured using a configuration file.
This section will describe what can be configured and how.
The location of the configuration file will depend on how your operating
system and its settings; but by default it is looked for in
$XDG_CONFIG_HOME,
in a rogallo subdirectory. Mostly this will translate to the file being
called ~/.config/rogallo/configuration.json.
Rogallo allows for a degree of configuration of its keyboard bindings;
providing a method for setting up replacement bindings for the commands that
appear in the command palette.
Bindable commands
The following commands can have their keyboard bindings set:
AddLocationToBookmarks - Add the current location to the bookmarks
Default:ctrl+b
Backward - Move backward through history
Default:ctrl+left_square_bracket
ChangeCommandLineLocation - Swap the position of the command line between top and bottom
Default:ctrl+up, ctrl+down
ChangeTheme - Change the application's theme
Default:f9
ClearCache - Clear the cache for all content
Default:shift+f5
CopyDocumentToClipboard - Copy the current document to the clipboard.
Default:alt+shift+c
CopyLocationToClipboard - Copy the current location to the clipboard.
Default:ctrl+shift+c
Forward - Move forward through history
Default:ctrl+right_square_bracket
GoHome - Go to the home page
Default:ctrl+h
Help - Show help for and information about the application
Default:f1, ?
JumpToCommandLine - Jump to the command line
Default:/, ctrl+1
JumpToDocument - Jump to the document viewer
Default:ctrl+slash, ctrl+g, ctrl+2
JumpToSidebar - Jump to the sidebar
Default:ctrl+3
Quit - Quit the application
Default:f10, ctrl+q
Reload - Reload the current document
Default:ctrl+r, f5
SearchBookmarks - Search the bookmarks for a location
Default:f7
SearchHistory - Search the history for a location
Default:f6
SetHome - Set the home page to a specific location
Default:alt+h
SetHomeToCurrentLocation - Set the home page to the current location
Default:ctrl+shift+h
ToggleBookmarks - Toggle the display of the bookmarks viewer
Default:f3
ToggleHistory - Toggle the display of the history viewer
Default:f2
ToggleView - Toggle between rendered and source view of the document
Default:f4
Changing a binding
If you wish to change the binding for a command, edit the configuration file
and add the binding to the bindings value. For example, if you wanted to
change the binding used to toggle the display of a page between a rendered
view or a source view, changing it from f4 to
ctrl+t, you would set bindings to this:
"bindings":{"ToggleView":"ctrl+t"}
The designations used for keys is based on the internal system used by
Textual; as such its caveats about what
works where
apply.
The main modifier keys to know are shift, ctrl, alt, meta, super
and hyper; letter keys are their own letters; shifted letter keys are
their upper-case versions; function keys are simply f1,
f2, etc; symbol keys (the likes of #, @, *, etc...)
generally use a name (number_sign, at, asterisk, etc...).
Tip
If you want to test and discover all of the key names and combinations
that will work, you may want to install
textual-dev and use the
textual keys command.
Rogallo has a number of themes available. You can select a theme using the
Change Theme (ChangeTheme command, bound to
F9 by default) command. The available themes include:
bash: dhv: command not found
Tip
You can also set the theme via the command line. This can
be useful if you want to ensure that DHV runs up with a specific theme.
Note that this also configures the theme for future runs of DHV.