|
Dunst
Lightweight notification daemon
|
#include "settings.h"#include <dirent.h>#include <errno.h>#include <fnmatch.h>#include <glib.h>#include <stdio.h>#include <string.h>#include "dunst.h"#include "log.h"#include "option_parser.h"#include "utils.h"
Include dependency graph for settings.c:Go to the source code of this file.
Macros | |
| #define | SYSCONFDIR "/usr/local/etc/xdg" |
| Since this gets defined by $DEFAULT_CPPFLAGS at compile time doxygen seems to miss the correct value. | |
Functions | |
| static int | is_drop_in (const struct dirent *dent) |
| Filter for scandir(). | |
| static GPtrArray * | get_xdg_conf_basedirs (void) |
| Get all relevant config base directories. | |
| static void | config_files_add_drop_ins (GPtrArray *config_files, const char *path) |
| static GPtrArray * | get_conf_files (void) |
| Find all config files. | |
| FILE * | fopen_conf (char *const path) |
| void | check_and_correct_settings (struct settings *s) |
| static void | process_conf_file (const gpointer conf_fname, gpointer n_success) |
| void | load_settings (char **const paths) |
| void | settings_free (struct settings *s) |
Variables | |
| struct settings | settings |
| bool | print_notifications = false |
Definition in file settings.c.
| #define SYSCONFDIR "/usr/local/etc/xdg" |
Since this gets defined by $DEFAULT_CPPFLAGS at compile time doxygen seems to miss the correct value.
Definition at line 28 of file settings.c.
| void check_and_correct_settings | ( | struct settings * | s | ) |
Definition at line 147 of file settings.c.
|
static |
Definition at line 77 of file settings.c.
| FILE * fopen_conf | ( | char *const | path | ) |
Definition at line 133 of file settings.c.
|
static |
Find all config files.
Searches the default config locations most important config file and it's drop-ins and puts their locations in a GPtrArray, most important last.
The returned GPtrArray and it's elements are owned by the caller.
Definition at line 113 of file settings.c.
|
static |
Get all relevant config base directories.
Returns an array of all XDG config base directories, most important first.
The result must not be freed! The array is cached in a static variable, so it is OK to call this again instead of caching its return value.
Definition at line 60 of file settings.c.
|
static |
Filter for scandir().
| dent | [in] directory entry |
| 1 | if file name matches *.conf |
| 0 | otherwise |
Definition at line 43 of file settings.c.
| void load_settings | ( | char **const | paths | ) |
Definition at line 265 of file settings.c.
|
static |
Definition at line 241 of file settings.c.
| void settings_free | ( | struct settings * | s | ) |
Definition at line 293 of file settings.c.
| bool print_notifications = false |
Definition at line 32 of file settings.c.
| struct settings settings |
Definition at line 31 of file settings.c.