23 Commits

Author SHA1 Message Date
Benedikt Heine
a661b2bb85 Pack settings related types into structs 2018-09-16 02:58:19 +02:00
Benedikt Heine
c944949e36 Pack types from x.c into structs 2018-09-16 02:58:13 +02:00
Zijung Chueh
7a22fa0e5f Fix code style
* 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
2018-07-13 14:45:38 +08:00
Zijung Chueh
fbcc26b5e1 Add options to specify mouse event 2018-07-13 01:40:20 +08:00
dj95
a3034d5f62 Implement support for round corners 2018-05-28 13:36:45 +03:00
Benedikt Heine
b6283724b9 Prefix the separator enum 2018-05-14 09:31:53 +03:00
Nikos Tsipinakis
a7fd3cb0ec Move geometry handling to settings
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.
2018-05-14 09:11:25 +03:00
Benedikt Heine
956b5c6401 Use gint64 as microseconds for internal timeunit
time(NULL) is vulnerable against timeshifts by NTP, timezones,...

g_get_monotonic_time() is not, but counts its in microseconds with the
gint64 datatype. To prevent any conversion bugs, all internal
timeformats are now using a gint64 and only get converted during import
or export (DBus notification arrives, configuration reading, age
threshold display).
2017-10-07 17:46:21 +02:00
Benedikt Heine
d6c1fbb556 Remove unused struct fields 2017-10-06 18:33:56 +02:00
fhost
f4b595240a Add option to control how to ellipsize truncated lines 2017-09-19 20:03:16 +02:00
George Angelopoulos
4d03acc454 replace 'folder' with 'path' in icon functionality
"folder" is more of a windows term. In unix we have paths and
directories.
2017-07-29 15:16:08 +02: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
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
ce623af5ae Remove unused verbosity variable 2017-05-04 17:49:31 +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
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
John Chen
7037afb2bc Fix include. Add empty lines between include layers. 2017-02-14 00:39:04 +08:00
Nikos Tsipinakis
de20697a69 Rename hide_duplicates_count -> hide_duplicate_count 2017-02-12 21:17:38 +02:00
Nikos Tsipinakis
4d55ccb0ee Check against MARKUP_NULL when checking if markup is set
Setting markup_mode to -1 might not work since in some implementations
enum might not be signed. For convenience, add a new enum value
`MARKUP_NULL` to serve the same purpose.
2017-02-05 13:00:59 +02:00
Nikos Tsipinakis
4e1b97f3cc Merge allow_markup and plain_text into markup
Merge the allow_markup and plain_text settings into a single setting.

These 2 settings had a similar function, allow_markup controlled whether
markup was parsed or stripped and plain_text whether the notification
was escaped and displayed as is.

To cover all the possible combinations of the settings mentioned above
`markup` can take the following values:

full:  The equivalent of allow_markup yes, plain_text no.
       Passes the text straight to pango with minimal parsing. All valid
       pango tags will be parsed.

strip: The equivalent of allow_markup no, plain_text no.
       Strips the markup using string_strip_delimited. The parsing is
       simplistic and if there are any unescaped '<' and/or '>'
       characters it might get tripped and strip out actual text.

       According to the GNOME notification specification, if a server
       doesn't support markup(and we don't advertise that we do if it is
       turned off) it should be stripped clientside, so this setting
       should rarely be used. It is mainly left in for compatibility
       with broken clients that don't follow the specification.

no:   The equivalent of allow_markup [yes/no](any value), plain_text
      yes.
      Makes the notification content be rendered as plain text
      regardless if it contains markup. Any Markup will be shown as
      regular text.

Markup inside 'format' will still be parsed regardless of what markup is
set to.

Closes #279
2017-02-04 22:10:51 +02:00
Nikos Tsipinakis
63bb4ad857 Move setting enums to settings.h
Not sure why these were in dunst.h in the first place since they are
mostly used by the settings struct.
2017-01-29 15:32:36 +02:00
Nikos Tsipinakis
964688699e Use include guards consistently
* Don't mix pragma guards and include guards, prefer classic include
  guards since apparently pragma guards are not a standard yet.
* Use the DUNST_FILE_H naming convention for all include guards.
2017-01-29 15:32:36 +02:00
Nikos Tsipinakis
2df2e7d06c Move dunst source files to src/ 2016-11-19 11:54:03 +02:00