Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings: Be more compliant with XDG BD spec. #917

Merged
merged 2 commits into from
Oct 13, 2021

Commits on Oct 1, 2021

  1. Settings: Be more compliant with XDG BD spec.

    Settings: Overhaul handling of rc-files.
    
    Dunst now searches all possible locations of config files and applies
    all settings from least important to most important file (see dunst(1)
    for more details).
    
    README.md: Added information about changed behaviour
    
    dunst.{1,5}: Information about new settings behaviour and deduplication
    
    dunst.1 explains in more detail how settings get found and applied.
    SYSCONFDIR is now in sync with the compile time parameter.
    dunst.5 got reduced a bit because of deduplication, so as to have only
    one location for the respective relevant information and not have to
    edit two or have them go out of sync.
    
    utils.c: Minor fix, 'delimiter' in string_to_array() was never used.
    WhitePeter committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    e3650de View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2021

  1. New iteration of PR dunst-project#917

    settings_data.h: Drive-by fix
    
    The default background of urgency_critical was same as foreground. Now
    it is in sync with default dunstrc.
    
    config.mk: Drive-by fix
    
    According to the gcc man page '--std' does not exist but it seems to be
    tolerated. Make that '-std' then.
    
    log.h: Tweak some log messages
    
    If the preprocessor allows it, prefix messages of levels 'critical',
    'error', 'debug' with [<source path>:<function name>:<line number>].
    
    Also some unified messages for logging fopen success/failure.
    
    option_parser.c: Change handling of sections/entries.
    
    Renamed `new_section()` to `get_or_create_section()` to be more
    transparent about its inner workings. An already existing section
    should not be fatal, just add/append entries to the *existing* one.
    Also, directly calling `new_section()` seemed pointless, since
    `add_entry()` would implicitly create sections as needed, or add to
    existing ones anyway.
    
    Not insisting on dying when there is a duplicate section in a config
    file opens a lot of possibilities. Now one can simply concatenate config
    files in arbitrary order and feed them to dunst on stdin, i.e.
        `cat $XDG_CONFIG_HOME/dunst/dunstrc \
             $XDG_CONFIG_HOME/dunst/dunstrc.d/*.conf \
         | dunst -conf -
    
    Internally 'option_parser' now adds/appends *all* entries to their
    respective sections, reusing existing ones. Empty sections will never be
    created, at least not by `load_ini_file()`. The most important entry in
    a section is the last one, because that will be the last to be committed
    to settings. So there should never be a problem with duplicates: last
    occurrence of a key dictates the final value.
    
    settings.c: Fixed issues mentioned in PR dunst-project#917
    
    `settings_init()` and `set_defaults()` are called only once now. Tweaked
    settings_init().
    
    `open_config_files()` now takes care of opening all config files,
    including the one given as command line parameter.
    
    doc: Update documentation
    
    Added some additional information to address possible misunderstandings
    about SYSCONFFILE and the runtime parameter -conf.
    WhitePeter committed Oct 2, 2021
    Configuration menu
    Copy the full SHA
    edb1f0b View commit details
    Browse the repository at this point in the history