rofi 1.7.5
Configuration
Collaboration diagram for Configuration:

Topics

 XResources Configuration
 
 Commandline Configuration
 

Data Structures

struct  Settings
 

Enumerations

enum  WindowLocation {
  WL_CENTER = 0 , WL_NORTH = 1 , WL_EAST = 2 , WL_SOUTH = 4 ,
  WL_WEST = 8 , WL_NORTH_WEST = WL_NORTH | WL_WEST , WL_NORTH_EAST = WL_NORTH | WL_EAST , WL_SOUTH_EAST = WL_SOUTH | WL_EAST ,
  WL_SOUTH_WEST = WL_SOUTH | WL_WEST
}
 
enum  MatchingMethod {
  MM_NORMAL = 0 , MM_REGEX = 1 , MM_GLOB = 2 , MM_FUZZY = 3 ,
  MM_PREFIX = 4
}
 
enum  XrmOptionType {
  xrm_String = 0 , xrm_Number = 1 , xrm_SNumber = 2 , xrm_Boolean = 3 ,
  xrm_Char = 4
}
 

Functions

void config_parser_add_option (XrmOptionType type, const char *key, void **value, const char *comment)
 
void print_options (void)
 
void print_help_msg (const char *option, const char *type, const char *text, const char *def, int isatty)
 
char ** config_parser_return_display_help (unsigned int *length)
 
gboolean config_parse_set_property (const Property *p, char **error)
 Set config option.
 
void config_parse_dump_config_rasi_format (FILE *out, gboolean changes)
 Dump configuration in rasi format.
 

Detailed Description

This provides rofi configuration system, supports:

Enumeration Type Documentation

◆ MatchingMethod

Enumeration indicating the matching method to use.

Enumerator
MM_NORMAL 
MM_REGEX 
MM_GLOB 
MM_FUZZY 
MM_PREFIX 

Definition at line 38 of file settings.h.

◆ WindowLocation

Enumeration indicating location or gravity of window.

WL_NORTH_WEST      WL_NORTH      WL_NORTH_EAST 
WL_EAST            WL_CENTER     WL_EAST 
WL_SOUTH_WEST      WL_SOUTH      WL_SOUTH_EAST
Enumerator
WL_CENTER 

Center

WL_NORTH 

Top middle

WL_EAST 

Middle right

WL_SOUTH 

Bottom middle

WL_WEST 

Middle left

WL_NORTH_WEST 

Left top corner.

WL_NORTH_EAST 

Top right

WL_SOUTH_EAST 

Bottom right

WL_SOUTH_WEST 

Bottom left

Definition at line 235 of file rofi-types.h.

◆ XrmOptionType

Type of the config options.

Enumerator
xrm_String 

Config option is string

xrm_Number 

Config option is an unsigned number

xrm_SNumber 

Config option is a signed number

xrm_Boolean 

Config option is a boolean (true/false) value

xrm_Char 

Config option is a character

Definition at line 72 of file xrmoptions.h.

Function Documentation

◆ config_parse_dump_config_rasi_format()

void config_parse_dump_config_rasi_format ( FILE * out,
gboolean changes )

Dump configuration in rasi format.

Parameters
outThe destination.
changesOnly print the changed options.

Definition at line 820 of file xrmoptions.c.

References config, CONFIG_DEFAULT, CONFIG_NO_DISPLAY, config_parse_dump_config_option(), extra_options, num_extra_options, ThemeWidget::num_widgets, rofi_configuration, rofi_theme_print_index(), XrmOption::str, Settings::theme, XrmOption::value, ThemeWidget::widgets, and xrmOptions.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ config_parse_set_property()

gboolean config_parse_set_property ( const Property * p,
char ** error )

Set config option.

Sets both the static as dynamic config option.

Parameters
pProperty to set
errorError msg when not found.
Returns
true when failed to set property.

Definition at line 711 of file xrmoptions.c.

References __config_parser_set_property(), extra_options, extra_parsed_options, Property::name, XrmOption::name, num_extra_options, P_STRING, rofi_theme_property_copy(), rofi_theme_property_free(), _PropertyValue::s, Property::type, Property::value, and xrmOptions.

Here is the call graph for this function:

◆ config_parser_add_option()

void config_parser_add_option ( XrmOptionType type,
const char * key,
void ** value,
const char * comment )
Parameters
typeThe type of the value
keyThe key referring to this configuration option
valueThe value to update based [out][in]
commentDescription of this configuration option

Add option (at runtime) to the dynamic option parser.

Definition at line 455 of file xrmoptions.c.

References __config_parser_set_property(), XrmOption::comment, CONFIG_DEFAULT, extra_options, extra_parsed_options, XrmOption::mem, XrmOption::name, num_extra_options, XrmOption::pointer, XrmOption::source, XrmOption::type, XrmOption::value, and xrm_String.

Referenced by main(), mode_set_config(), and setup_abe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ config_parser_return_display_help()

char ** config_parser_return_display_help ( unsigned int * length)
Parameters
lengththe length of the returned array

Creates an array with a strings describing each keybinding.

Returns
an array of string with length elements

Get length of name

Generate entries

Definition at line 1032 of file xrmoptions.c.

References config_parser_return_display_help_entry(), extra_options, num_extra_options, XrmOption::str, XrmOption::value, and xrmOptions.

Referenced by get_apps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_help_msg()

void print_help_msg ( const char * option,
const char * type,
const char * text,
const char * def,
int isatty )
Parameters
optionThe name of the option
typeString describing the type
textDescription of the option
defCurrent value of the option
isattyIf printed to a terminal

Function that does the markup for printing an configuration option to stdout.

Definition at line 975 of file xrmoptions.c.

References color_bold, color_italic, and color_reset.

Referenced by print_dmenu_options(), and print_main_application_options().

Here is the caller graph for this function:

◆ print_options()

void print_options ( void )

Print the current configuration to stdout. Uses bold/italic when printing to terminal.

Definition at line 958 of file xrmoptions.c.

References extra_options, num_extra_options, print_option(), XrmOption::str, XrmOption::value, and xrmOptions.

Referenced by help().

Here is the call graph for this function:
Here is the caller graph for this function: