There is no need to have a separate VERSION file in release tarballs,
having the version in config.mk directly allows for a proper fallback in
case the git repository and the version file doesn't exists. The most
important example of this is the tarballs that github creates on every
release.
Since the behaviour of dunst in the last release was to display icons
as-is, we should try to preserve backwards compatibility as much as
possible. This commit may be reverted in the next major release.
If the per-monitor dpi feature has been enabled it shouldn't be overridden
just because an Xft.dpi value is set, it's possibly for other programs
that don't have such a feature.
Since after the release a lot of downstream users will not be building
from source, it makes a lot more sense to have an option to fall back to
the Xinerama extension for those that are still on systems that do not
support RandR.
While it's not the best solution, it should cover most use cases where a
custom format on the progress value is required. If any further
customization is needed, the only current alternative is to use rules
to override the format.
Closes#273
Displaying too heavy notifications can DoS dunst. For example bad
programs, which pipe raw image data into the notification.
Limiting the maximum character length to 5000 circumvents this.
5000 should be ridiculously high to prevent DoS while still not
truncating all correct notifications.
Bounce was functionally removed in
b2883b213342c912a76329bb8f6c179ea3451ae5 during the transition from Xft
to Cairo without any mention. There is no use to keeping it in the example dunstrc
and storing the value in the code,
This commit will probably be reversed if and when bounce is
re-implemented.
Rearrange the settings in the example dunstrc and the manpage into broad
categories according to the part of the program they affect: Display,
text, icons, history and misc.
There is no reason for the frame settings to have their own section
since it's not an area that will be expanded upon. Move them to the
global section to be consistent.
A middle click on an notification with a single or default action will
invoke it. If there are multiple actions and no default, the context
menu is opened. If there are no actions, proceed similarly with URLs.
The frame and experimental sections are currently used for some settings
related to frame colour and experimental features respectively and as
such should not be parsed as rules.
Practically rewrite the entire manpage to focus more on the
configuration rather than the command line flags. Additionally, expand
more on how many of the settings work and on some of the less documented
functions (e.g. rules).
Make every setting be overridable from the command line using
-setting_name. Previously, some settings had shortened command line
flags (e.g. -fn instead of -font) which made the command line arguments
confusing.
Hardcoding a DISPLAY variable is a bad idea because it means that dunst
will only run on X11, and only for that specific configuration.
FWIW, this actually applies to any desktop app run via systemd:
1. `DISPLAY` should be set by `systemctl --user set-environment` elsewhere.
2. `DISPLAY=:0` is not universally valid.
3. This breaks dunst if attempting to run wayland, and requires manually
starting it (eg: not via systemd), or editing the file.
Expose events, according to the X11 documentation, signify when the
contents of a window region have been lost but until now we have been
ignoring this event for unknown reasons.
Handle this event by redrawing the window entirely. While this is not a
perfect solution, the optimal one would be to only redraw the
region that was lost, it's simpler to implement currently and better
than losing the contents of the window entirely.
Since currently the multimonitor extension support is a compile-time
argument, there is not much we can do to recover from not being able to
initialize RandR other than print an error and exit.
Make the class in the XrmGetResource call be the same as the resource
name we are trying to retrieve, "Xft.dpi". Nowhere in the documentation
it is mentioned that the class name can be NULL so it is better to be
cautious and set it to a value that is unlikely to affect anything.
Since we only use sudo for installing packages, start using the apt
travis addon for the installation in order to allow container-based
builds to be used for testing dunst which should theoretically have a
faster boot time.
Change the behaviour of travis to only notify if the build status
changes. The previous behaviour which was notifying for every build
regardless of status added a lot of unnecessary noise to the IRC
channel.
Replace the dependency list in the README to mention libxrandr instead
of libxinerama since that's the default value of the MULTIMON variable
in config.mk
Use a single MULTIMON variable which can be set to either xrandr,
xinerama or none and replace the previous system which used 2 variables
for each extension which were then added to CFLAGS and instead append
xrandr or xinerama respectively to pkg_config_packs so their
availability can be checked with pkg-config.
The main advantage of this is that the extension can now be set from
the command like like so 'MULTIMON=xinerama make'
Calculating the screen dpi on a per-monitor basis can cause
inconsistencies if multiple monitors with slightly different dpis are
used and in some cases it might not be the expected behaviour.
As such, the per-monitor dpi calculation was changed from a default
fallback to an opt in experimental feature and the default value of 96
will be used for the dpi if Xft.dpi is not set.
In the future, depending on how we decide to continue, we can either
move this setting in the global configuration section and fall back to
the X11 display dpi as the default or simply always use the per-monitor
dpi calculation. But to preserve backwards compatibility, this decision
can wait until the next major release.
Previously, we were getting screen info every time we tried to move the
window. To improve the situation, information about the available
screens is initialised once when dunst starts and further behaviour
depends on the compile-time options used.
If Xrandr is enabled, screen information is updated when an
XRRScreenChangeNotify event is received, meaning only when the screen
layout changes.
If Xinerama is enabled, screen information is only updated on startup.
This behaviour might be changed later.
If none are enabled, then dunst assumes only one screen and ignores all
multi-monitor options.
Since we are adding Xrandr support to allow for automatic dpi detection,
split screen handling code into a new file as part of the effort to
simplify x.c
x.c has grown into an unmaintainable blob. Moving it in its own
subdirectory is the first step to splitting it into submodules each of
which will have a well defined job so that a lot of the code can be
abstracted to improve readability and make it much easier to maintain.
This process will be done one small part at a time only when we need to
change significantly change a part of the file, there is no need to
break what already works.
If Xft.dpi value is not available, auto-detect value based on monitor using randr provided sizes.
Disable Xinerama and enable randr by default.
Also update dpi everytime the monitor changes.
When checking for the markup value in rules, an empty string was
specified as the default value so it can easily be checked if the actual
config value was empty or not. While that string got strdup'ed in the
ini_get_string call, it was only freed if the length > 0, effectively
leaking a tiny amount of memory.
Change that behaviour to use a NULL check instead to avoid leaking
memory.
Remove xext and xft as a dependency since they are not currently used
and probably haven't been used a while.
Also remove freetype2 from the pkg-config list, while it is required by
pangocairo it should be included from the pkg-config --cflags call.
The 'Github Flavored Markdown' specification says that headers must be
followed by a space character, update the changelog to respect that
requirement.