module LTerm_resources:sig..end
type t
val empty : tval get : string -> t -> stringget key resources returns the key associated to the last
pattern that matches key in resources, or the empty string
if no pattern matches key.val add : string -> string -> t -> tadd pattern value returns the new set of resources with the
binding pattern -> value at the end.val merge : t -> t -> tmerge res1 res2 merges the two given sets of resources.exception Error of string
val get_bool : string -> t -> bool optionget_bool name resources reads the boolean encoded in
resources.val get_color : string -> t -> LTerm_style.color optionget_color name resources reads the color encoded in
resources.val get_style : string -> t -> LTerm_style.tget_style prefix resources reads the style encoded in
resources.val get_connection : string -> t -> LTerm_draw.connectionget_connection name resourcesexception Parse_error of string * int * string
Parse_error(source, line, msg) is raised when a parsing error
is encountered in the input.val parse : string -> tparse str parses a string for a list of properties. str must
follow the format of X resources files. i.e. comments start with a
!, empty lines are ignored, and configuration lines looks-like:
key: value
val load : string -> t Lwt.tLTerm_resources.parse but parses the contents of a file.val home : stringtype xdg_location =
| |
Cache |
|||
| |
Config |
|||
| |
Data |
(* |
The type for user-specific 'cached', 'configuration' and 'data' files.
| *) |
val xdgbd_file : loc:xdg_location ->
?allow_legacy_location:bool -> string -> stringxdgbd_file ~loc fn returns the full file-name for a file fn in the
XDG Base Directory corresponding to the variant given by loc.
E.g. xdgbd_file ~loc:LTerm_resources.Cache app_history would return
something like "/home/user/.cache/app_history"
Follows the XDG Base Directory specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
The optional parameter allow_legacy_location, default false, first
searches if there is already a file with the desired name in the user's
home directory. If it finds such a file, it returns that filename,
else it resorts to regular behavior.