850 Commits

Author SHA1 Message Date
Nikos Tsipinakis
b069b2dba6 Dunst v1.2.0 v1.2.0 2017-07-12 11:22:04 +03:00
Nikos Tsipinakis
53d0b30e9a Update changelog with recent changes
Reword a few sections of the changelog & bring it up to date with recent
changes to prepare for a release.
2017-07-12 11:16:45 +03:00
Nikos Tsipinakis
1b6f9dbb29 Put the version in config.mk instead of a separate file
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.
2017-07-12 11:15:22 +03:00
Nikos Tsipinakis
599db75401 Add deprecation warning for the frame section 2017-07-11 11:08:36 +03:00
Nikos Tsipinakis
79fec8a557 Change the default value of max_icon_size to 0
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.
2017-07-11 11:08:28 +03:00
Nikos Tsipinakis
842a35db06 Make per_monitor_dpi take precedence over Xft.dpi
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.
2017-07-11 10:12:56 +03:00
Nikos Tsipinakis
c547f6eec9 Add force_xinerama option
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.
2017-07-10 14:38:20 +03:00
Nikos Tsipinakis
44ac026d97 Add format string for raw progress value
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
2017-07-09 20:20:49 +03:00
Nikos Tsipinakis
d206f2445f Merge pull request #332 from bebehei/fieldlength-max
limit length of single fields in notification
2017-07-09 19:46:31 +03:00
Benedikt Heine
717c747a8c truncate overlong messages (fixes #248)
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.
2017-07-09 16:34:47 +02:00
Nikos Tsipinakis
abc5436e0e Move systemd service file to the root directory
Since the systemd service is installed by default and officially
supported there is no reason for it to be in the contrib directory.
2017-07-08 12:33:04 +03:00
Nikos Tsipinakis
b2a6dbd0a4 Rename image files in documentation 2017-07-08 12:26:09 +03:00
Nikos Tsipinakis
a08fba49d0 Remove bounce setting
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.
2017-07-03 15:36:08 +03:00
Nikos Tsipinakis
264b546155 Rearrange the settings into groups
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.
2017-07-01 11:57:02 +03:00
Nikos Tsipinakis
5e2c781cba Move frame settings to the global section
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.
2017-07-01 11:56:15 +03:00
Nikos Tsipinakis
2927140d8b Merge pull request #330 from miseran/click_action
Allow middle click on notification to invoke action
2017-06-30 08:00:41 +03:00
Reto Schnyder
d9977cbb41 Handle clicks on release instead of press
This prevents the release event from going to the window behind if the
click closes the notification.
2017-06-29 20:04:14 +02:00
Reto Schnyder
c8e6f317ab Move url prefix removal to open_browser
This way, it also applies to middle clicks.
Incidentally, it seems this fixed a crash when opening <a href> urls.
2017-06-29 19:59:50 +02:00
Reto Schnyder
e04bfe0a58 Allow middle click on notification to invoke action
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.
2017-06-29 19:38:54 +02:00
Nikos Tsipinakis
aec3533a0b Add frame and experimental to the section list excluded from rules
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.
2017-06-27 10:59:05 +03:00
Nikos Tsipinakis
31144c2d93 Rework documentation
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).
2017-06-27 10:58:07 +03:00
Nikos Tsipinakis
2df3c2291d Add identically named command line flags for all settings
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.
2017-06-27 10:46:12 +03:00
Nikos Tsipinakis
ce28250109 Merge pull request #315 from Tadly/master
added body-hyperlinks to capabilities as it is supported
2017-06-15 06:44:52 +03:00
Nikos Tsipinakis
1d0bfb2278 Merge pull request #324 from hobarrera/dont-hardcode-DISPLAY
Tweak systemd.service
2017-05-20 12:14:01 +03:00
Hugo Osvaldo Barrera
94da3eecc5 Install the systemd user service file by default 2017-05-19 13:32:30 -03:00
Hugo Osvaldo Barrera
7c967879e2 Make dunst.service part of graphical-session
Make dunst part of graphical-session.target, so that it exits
immediately when the session exits.
2017-05-19 13:32:10 -03:00
Hugo Osvaldo Barrera
52b08e4f19 Don't hardcode a DISPLAY variable
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.
2017-05-10 12:50:11 -03:00
Nikos Tsipinakis
8b74a756c2 Redraw the window after an expose event
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.
2017-05-04 17:54:06 +03:00
Nikos Tsipinakis
56dfc25baf Add warning if RandR initialization fails
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.
2017-05-04 17:53:01 +03:00
Nikos Tsipinakis
ce623af5ae Remove unused verbosity variable 2017-05-04 17:49:31 +03:00
tadly
2587173048 added body-hyperlinks to capabilities as it is supported 2017-04-05 16:44:04 +02:00
Nikos Tsipinakis
03c82c22e3 Fix uninitialized class name in dpi handling
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.
2017-04-02 19:41:36 +03:00
Nikos Tsipinakis
17e1dbf246 Use container-based builds with travis
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.
2017-04-02 19:41:36 +03:00
Nikos Tsipinakis
06c4cf6d4d Make travis compile and test using all multimon extensions
Even without tests covering the x11 part of dunst, compiling with
different multi-monitor libraries should catch some of the most common
mistakes.
2017-04-02 19:41:36 +03:00
Nikos Tsipinakis
c445d1477c Make travis only notify if the build changes status
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.
2017-04-02 19:41:36 +03:00
Nikos Tsipinakis
c9d9046b3e Remove .clang_complete
As far as I can tell it is not being used for anything and has become
out of date so there is no real point in keeping it around.
2017-04-02 19:41:36 +03:00
Nikos Tsipinakis
394ac9b5fe Update readme to reflect the new dependencies
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
2017-04-02 19:41:36 +03:00
Nikos Tsipinakis
3357743210 Make selecting which multi-monitor selection to use simpler
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'
2017-04-02 19:37:59 +03:00
Nikos Tsipinakis
43b4d4bb41 Add per_monitor_dpi experimental setting
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.
2017-04-02 18:27:12 +03:00
Nikos Tsipinakis
52600cdfb0 Refactor monitor handling to keep track of all screens
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.
2017-04-02 18:27:12 +03:00
Nikos Tsipinakis
0a6b105f4a Move screen related code into a new file
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
2017-04-02 18:27:12 +03:00
Nikos Tsipinakis
ebea092ddd Move x.{c,h} to a different subdirectory
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.
2017-04-02 18:27:12 +03:00
Eizen
4dd628ccf4 Add auto-detect dpi method
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.
2017-04-02 18:27:12 +03:00
Eizen
cc3a08c1db Add DPI detection method
Use Xft.dpi if available
2017-04-02 18:27:12 +03:00
Nikos Tsipinakis
a6046586a3 Fix minor memory leak
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.
2017-04-01 22:50:40 +03:00
Nikos Tsipinakis
3c38741e71 Remove unused dependencies
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.
2017-04-01 18:52:15 +03:00
Nikos Tsipinakis
259030abe8 Merge pull request #312 from hobarrera/document-actions
Document actions and how to interact with them
2017-04-01 16:56:54 +03:00
Hugo Osvaldo Barrera
f66942549f Document actions and how to interact with them 2017-03-31 11:27:13 -03:00
Nikos Tsipinakis
f6438a1b14 Update changelog to comply with the github markdown spec
The 'Github Flavored Markdown' specification says that headers must be
followed by a space character, update the changelog to respect that
requirement.
2017-03-18 15:57:21 +02:00
Nikos Tsipinakis
96ebb4625a Merge pull request #309 from LukeShu/tidy-markup
Tidy and fix markup handling.
2017-03-15 18:46:50 +02:00