Skip to content

Commit

Permalink
put configs into correct location
Browse files Browse the repository at this point in the history
  • Loading branch information
LBCrion committed Aug 21, 2021
1 parent 99c166a commit 50baf96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dep = [gtk3, glib, ucl, glsh ]
executable ('sfwbar', sources: src, c_args: ['-DGLIB_DISABLE_DEPRECATION_WARNINGS','-DGDK_DISABLE_DEPRECATED','-DGTK_DISABLE_DEPRECATED'], dependencies: dep, install: true)

install_man('doc/sfwbar.1')
install_subdir(['config'], install_dir: get_option('datadir') / 'sfwbar' )
install_subdir('config', install_dir: get_option('datadir') / 'sfwbar', strip_directory : true )
install_subdir('icons/weather', install_dir: get_option('datadir') / 'sfwbar/icons' )
install_subdir('icons/misc', install_dir: get_option('datadir') / 'sfwbar/icons' )

Expand Down
8 changes: 7 additions & 1 deletion src/sfwbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,19 @@ GtkWidget *load_config ( struct context *context )
fname = g_strdup(confname);
else
fname = get_xdg_config_file("sfwbar.config");
if(fname==NULL)
{
fprintf(stderr,"Error: can't open config file\n");
exit(1);
}

uparse = ucl_parser_new(0);
ucl_parser_add_file(uparse,fname);
obj = ucl_parser_get_object(uparse);
g_free(fname);
json = ucl_parser_get_error(uparse);
if(json!=NULL)
printf("%s\n",json);
fprintf(stderr,"%s\n",json);

css_init(obj);

Expand Down

0 comments on commit 50baf96

Please sign in to comment.