The user provides a comma-separated list of valid mouse actions
that will be performed one after another when a notification is
clicked. If any one of the provided actions is invalid, the value
reverts to its default state.
This adds the option `content_alignment`, which allows the user to set
the vertical alignment of the notification's content (i.e. icon and
text) to either top (`CONTENT_TOP`), center (`CONTENT_CENTER`, default),
or bottom (`CONTENT_BOT`). The default preserves current behaviour,
while the other options fulfill #486.
The width_set field is true if the width is set in the geometry setting,
in other words if a specific (or dynamic) width is set or we want the
notification to cover the whole screen.
In order to check if a specific width is chosen we need to also exclude
dynamic width, meaning the width field has to be non 0;
Fixes#614
A bug, introduced in #576. If alignment isn't set in the config, the
settings would print a warning about an invalid value. But actually it's
just the default string, which can't get parsed.
The fallback value should get handled by a false return value and not by
the option_get_string's default value.
Changes all string parsers to have a the almost same interface while
also having a proper return value, which indicates success of the
parsing process.
Just recently, I started using g_return_val_if_fail as a brief assertion
checker. It'll also exit the function with a specified return value.
But actually this introduces some weird behavior. It's configurable by
environment variables and it'll print out a log message, if the
expression didn't validate properly. But some of these assertions are
actually ment to be silent.
Using a simple macro makes it simple to structure the assertions and its
return values in a block at the start of a function or anywhere else.
The xctx color field is a full duplicate of the settings logic.
Only logic included in xctx color fields, are the frame colors, which
fall back to the global frame setting. So, this required to handle it
directly in settings.c
Parsing the arguments with g_shell_parse_argv is more safe than just
splitting it by spaces. Also this allows to pass values with spaces to
the browser command.
* Move mouse_left/middle/right_click to global section
* Match the enum value style
* Ignore unknow mouse event
* Split copy-paste code into a function
* Fix typo
Change the value of geometry in settings from an unparsed string to a
struct containing the properly parsed geometry info. Since we depend on
X11 for geometry parsing this (unfortunately) introduces an X11
dependency on the settings module, this can only be resolved if we
implement our own parsing.