package bogue

  1. Overview
  2. Docs

Theming variables

A number of variables can be modified from a configuration file (or environement variables). They are called Theme variables.

  • Each theme has its own directory under $HOME/.config/bogue/themes, in which there is a bogue.conf file where the Theme variables are defined.
  • The user config file $HOME/.config/bogue.conf overrides the theme files.
  • A bogue.conf file in the same directory as the executable overrides the other config files.
  • The syntax of the config file is VARIABLE = value, one entry per line. Notice the spaces surroundind =. Comment lines starting by # are ignored. For instance:

    # my bogue.conf
    THEME = dark
    BACKGROUND = color:azure

Here is the list of Theme variables:

  • BACKGROUND: the default background for all windows. It can be a color (eg. color:darkturquoise or color:#00CED1), or an image file (eg. file:myimage.png). In the latter case, the file is searched in the current theme's directory, unless the file string starts with /, in which case it should be an absolute path (eg. file:/home/alice/myimage.png).
  • BG_COLOR: A background color (eg. darkturquoise, or #00CED1) that is used by default by some widgets/layouts. It should be clearly visible over the BACKGROUND.
  • BUTTON_COLOR_ON: the color of active buttons.
  • BUTTON_COLOR_OFF: the color of inactive buttons.
  • CHECK_ON: the image used for the 'checked' icon. It can be a file (eg. myimage.png) or a font-awesome icon (eg. fa:check-square-o).
  • CHECK_OFF: the image used for the 'unchecked' icon. See CHECK_ON.
  • CURSOR_COLOR
  • DIR: The directory containing the themes subdirectories. Default: auto detected at startup, usually $HOME/.config/bogue/themes
  • FA_DIR: The fontawesome directory inside DIR/common/.
  • FAINT_COLOR: A non-obstrusive color for disabled options or text of little importance.
  • LABEL_COLOR: The color for text or icon labels.
  • LABEL_FONT: path of a TTF font for text labels. Eg: Ubuntu-R.ttf.
  • LABEL_FONT_SIZE: integer, eg 14.
  • LOG_TO_FILE: if "false", all log messages will appear on the console. If "true", the messages are instead sent to a log file, typically in the "/tmp" directory.
  • MENU_HL_COLOR: the color for highlighting selected menu entries.
  • MENU_BG_COLOR
  • MONO_FONT: monospace font.
  • ROOM_MARGIN
  • SCALE: global scale (any non-negative float). For instance if SCALE = 2., all dimensions given to Bogue functions will be multiplied by 2 before rendering to obtain the hardware size in pixels. If set to 0. or not specified, it is autodetected to match your screen DPI (using xdpyinfo, if present).
  • SEL_BG_COLOR: background color for selected items in lists.
  • SEL_FG_COLOR: text color for selected items in lists.
  • SMALL_FONT_SIZE: integer. Used for instance for tooltips popups.
  • TEXT_COLOR: color of standard text displays.
  • TEXT_FONT
  • TEXT_FONT_SIZE

All variables with "COLOR" in their name can be specified either with RGB hexadecimal like #00CED1, or with a standard html name like darkturquoise, see this color table.

All variables can be overriden by setting the corresponding environment variables b, prepending "BOGUE_". For instance:

export BOGUE_SCALE=2.5
Dependency graph

Accessing Theme variables

Theme variables are essentially for Bogue's internal use, but sometimes it can be useful to access their values. See above for their description.

val room_margin : int
val scale_int : int -> int

Conversion: Bogue dimension -> hardware pixel dimension. The latter is obtained by multiplying by SCALE.

OCaml

Innovation. Community. Security.