mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-03 16:05:20 -05:00
Add theme option to config system.
This commit is contained in:
parent
3b850f4472
commit
95667e60d9
4 changed files with 7 additions and 3 deletions
|
@ -128,4 +128,5 @@ Settings config = {
|
|||
.window_format = "{w} {c} {t}",
|
||||
.click_to_exit = TRUE,
|
||||
.show_match = TRUE,
|
||||
.theme = NULL,
|
||||
};
|
||||
|
|
|
@ -149,6 +149,8 @@ typedef struct
|
|||
/** Click outside the window to exit */
|
||||
int click_to_exit;
|
||||
gboolean show_match;
|
||||
|
||||
char *theme;
|
||||
} Settings;
|
||||
/** Global Settings structure. */
|
||||
extern Settings config;
|
||||
|
|
|
@ -898,9 +898,8 @@ int main ( int argc, char *argv[] )
|
|||
// Parse command line for settings, independent of other -no-config.
|
||||
config_parse_cmd_options_dynamic ( );
|
||||
|
||||
char *theme = NULL;
|
||||
if ( find_arg_str ( "-theme", &theme ) > 0 ){
|
||||
rofi_theme_parse_file ( theme );
|
||||
if ( config.theme ) {
|
||||
rofi_theme_parse_file ( config.theme );
|
||||
rofi_theme_print ( rofi_theme );
|
||||
}
|
||||
|
||||
|
|
|
@ -194,6 +194,8 @@ static XrmOption xrmOptions[] = {
|
|||
"Click outside the window to exit", CONFIG_DEFAULT },
|
||||
{ xrm_Boolean, "show-match", { .snum = &config.show_match }, NULL,
|
||||
"Indicate how it match by underlining it.", CONFIG_DEFAULT },
|
||||
{ xrm_String, "theme", { .str = &config.theme }, NULL,
|
||||
"New style theme file" },
|
||||
};
|
||||
|
||||
/** Dynamic array of extra options */
|
||||
|
|
Loading…
Add table
Reference in a new issue