1438 Commits

Author SHA1 Message Date
Benedikt Heine
1fa1532d7f Pack type rule_t into struct rule 2018-09-16 02:58:27 +02:00
Benedikt Heine
de0f0bf3d9 Pack type RawImage into raw_image struct 2018-09-16 02:58:26 +02:00
Benedikt Heine
8010f83286 Pack Actions type into struct actions 2018-09-16 02:58:23 +02:00
Benedikt Heine
a4ebf4f4e6 Pack option_parser.c types into structs 2018-09-16 02:58:21 +02:00
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
Nikos Tsipinakis
fab2543f06
Merge pull request #541 from bebehei/concatenated-queues
Concatenated queues
2018-09-14 16:47:22 +03:00
Benedikt Heine
e1ee87b5d3 When traversing both queues, traverse in one loop
On actions, where waiting and displayed has to get traversed, traverse
them both in a single loop. Code duplication isn't necessary anymore.
2018-09-14 15:37:22 +02:00
Benedikt Heine
34e97b3e94 Optimize freshly introduced queues_update code 2018-09-14 15:37:12 +02:00
Nikos Tsipinakis
f76af36743
Merge pull request #547 from knopwob/random_stuff
Random fixes
2018-09-14 15:55:44 +03:00
Sascha kruse
bf286f73cd remove unnecessary initialization of variable
The inizialization value is never used and is overriden
directly after.
2018-09-14 14:37:27 +02:00
Sascha kruse
199aaf1181 fix comments in log.h 2018-09-14 13:36:05 +02:00
Sascha kruse
183f29b59d remove dead comment 2018-09-14 13:30:27 +02:00
Sascha kruse
562cb93767 remove unneeded declaration extract_urls 2018-09-14 13:29:13 +02:00
Nikos Tsipinakis
81fae350c9 Fix draw being called twice when mapping the window 2018-09-13 18:20:06 +03:00
Benedikt Heine
76fecedfd8
Merge pull request #544 from knopwob/master
draw the window before showing it
2018-09-13 16:55:33 +02:00
Sascha kruse
e09e29968a draw the window before showing it
Before this commit when using Dunst with multiple displays and
follow mode mouse/keyboard on a new notification (when no other
notifications are shown) a black window flickers up at the screen where
the last notification was shown.

By calling draw() before x_window_show the new window position will be
calculated and the window will be moved there before the window is shown
and thus remove the flickering.
2018-09-13 16:03:26 +02:00
Benedikt Heine
4c26ab442a Use the first waiting notification to generate xmore
Using the last notification from displayed creates confusion about
nonexisting notifications.
2018-09-13 12:08:41 +02:00
Benedikt Heine
f14b0b2b4a Show xmore layout only when needed
For the case, that there is a single notification waiting in queue, the
xmore layout is an annoying setting.
2018-09-13 12:08:41 +02:00
Benedikt Heine
ec26403a06 Let important notifications seep into full display queue
When the display queue had is full and a new notification would come
in, new notification wouldn't get shown until a currently displayed
notification would timeout.

Even if the notification would have been shown on top of the displayed
queue. So e.g. if the displayed queue would have been filled with
"normal" urgency notifications, an incoming "urgent" notification would
have been delayed.

To let those more important notifications through, the tail of displayed
and head of waiting are swapped on every update if necessary.
2018-09-13 11:14:33 +02:00
Benedikt Heine
c692d222d7 Save the notification's scriptrun in script_run field 2018-09-13 11:14:33 +02:00
Nikos Tsipinakis
e5dd80b9db
Merge pull request #542 from bebehei/hotfix1
Wakeup also for infinite notifs when set show_age_threshold
2018-09-08 19:51:42 +03:00
Benedikt Heine
faec6bdbca Wakeup also for infinite notifs when set show_age_threshold
For notifications without any timeout, ttl can't be positive.
So when, show_age_threshold is active, dunst won't wake up, if there
are only notifications displayed without any timeout.
2018-09-06 11:13:46 +02:00
Nikos Tsipinakis
896c008def
Merge pull request #537 from bebehei/icon-nullcheck
Avoid NULL values in fnmatch's parameters
2018-08-17 14:03:23 +03:00
Benedikt Heine
076b6936ec Avoid NULL values in fnmatch's parameters
While the rule's field will get checked for a NULL value, the
notification's field won't get, as it's assumed to be non-NULL.

This is problematic, as there can be some corner cases, where the
notification's field is actually NULL.

Fixes #536
2018-08-16 10:25:19 +02:00
Nikos Tsipinakis
a749847040
Merge pull request #535 from Saeissl/master
Add a toggle command
2018-08-11 18:43:09 +03:00
David Sauerwein
bb60ea7a48 Add a toggle command 2018-08-11 11:08:03 +02:00
Nikos Tsipinakis
0e1b5a176a
Merge pull request #525 from lulivi/master
Added dunst xresources theme wrapper
2018-07-15 12:03:15 +03:00
Nikos Tsipinakis
c0eef2da2f
Merge pull request #530 from zijung/feature-mouse_event
Add options to specify mouse event
2018-07-15 11:59:10 +03:00
lulivi
cbfe8c0d61 Add xresources config wrapper
Created a wrapper script to customize theme variables (colors,
fonts, etc) according with your X resources file (~/.Xresources).

As dunst is not a X exclusive notification daemon, this script
could be a workarround to solve this.

Related with: #357
2018-07-15 00:14:04 +00:00
Zijung Chueh
88175b259a Put the default value in the defaults 2018-07-13 21:31:51 +08: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
Nikos Tsipinakis
6d0e20e40b
Merge pull request #528 from bebehei/various
Various Improvements
2018-07-11 13:09:08 +03:00
Benedikt Heine
368182f4d7 Log XEvents by their written names
All XEvents only got logged with their IDs. It makes more sense to write
out the XEvent's name. Also, writing that we received an XEvent and then
logging again, that we ignored it, makes no sense.
2018-07-10 13:35:51 +02:00
Benedikt Heine
3c69e1f263 Remove doubly variables while converting dbus message 2018-07-10 13:35:51 +02:00
Benedikt Heine
646d037b15 Make NULL a valid input for notification_free 2018-07-10 13:23:12 +02:00
Benedikt Heine
54ce81ccca Convert notification.[ch] into docstrings 2018-07-10 13:23:12 +02:00
Benedikt Heine
f4fb95c827 Do not make explicit NULL checks on elements
Most of the NULL checks are actually doubly false logic. Turning the
logic around and removing the NULL check makes the program easier to
read.
2018-07-10 13:23:12 +02:00
Benedikt Heine
7187290536 Turn read only fields into const 2018-07-10 13:23:05 +02:00
Nikos Tsipinakis
f1dd772937
Merge pull request #527 from bebehei/better-msgs-icon
Better warnings for failed icons
2018-07-08 10:18:49 +03:00
Benedikt Heine
b5fbfd0e65 Print progress in notification_print 2018-07-07 11:55:06 +02:00
Benedikt Heine
a229363dbd Simplify colored_layout codepaths 2018-07-07 11:54:41 +02:00
Benedikt Heine
f410f57211 Use g_clear_pointer on fields, which may get reused 2018-07-07 11:53:32 +02:00
Benedikt Heine
e091dd4d15 Notification comparison done right 2018-07-07 11:51:14 +02:00
Benedikt Heine
e4b0aae05a Replace free(val); val=NULL; with g_clear_pointer 2018-07-07 11:51:03 +02:00
Benedikt Heine
8399ef2d7c Better warnings for failed icons
As the get_pixbuf_from_file should retrieve a file's content, it
shouldn't fail silently, if the file isn't there.

For codepaths, which don't use the `icon_path` to search for a given
icon, it gives a clearer error message.
2018-07-06 14:20:01 +02:00
Nikos Tsipinakis
ae370e7289 dunstify: Fix escape chars not being parsed in the body
notify-send uses g_strcompress on the body of the notification to
replace escape chars (e.g. newline). Since dunstify is supposed to be a
drop-in replacement we should match that here as well.
2018-07-05 12:55:24 +03:00
Nikos Tsipinakis
74bbc96db2
Merge pull request #521 from bebehei/paths-for-icons
Implement paths for icons
2018-06-24 11:19:06 +03:00
Benedikt Heine
a2b383ec0b Add Tests for tilde expansion in icons 2018-06-23 23:49:25 +02:00