Nikos Tsipinakis
2c6cb8ebf3
Implement smarter markup escaping
...
Automatically detect and escape invalid and unsupported & entities.
Fixes #546
2018-11-06 20:49:47 +02:00
Nikos Tsipinakis
f12f1094ed
Merge pull request #550 from bebehei/misc
...
Misc patches
2018-10-10 17:59:30 +03:00
Benedikt Heine
8ba4983ce0
Merge pull request #549 from bebehei/threaded-dmenu
...
Threaded dmenu
Create a refcounting mechanism for notifications and "lock" them while displayed in dmenu.
Fixes #456
2018-10-10 16:49:28 +02:00
Benedikt Heine
f0e4870d99
Reorder CC arguments similarily
...
Output first, then all required objects and then the FLAGS
2018-10-10 12:58:04 +02:00
Benedikt Heine
750e05f03b
Remove trailing spaces
2018-10-10 11:53:03 +02:00
Benedikt Heine
c0e2a2a7e3
Move all strcmp operations to STR*EQ macros
2018-10-09 10:08:17 +02:00
Benedikt Heine
bb02897bc8
Introduce STR_EQ and STRN_EQ macros
2018-10-09 10:08:17 +02:00
Benedikt Heine
52c47524f2
Test notification referencing
2018-10-08 18:27:11 +02:00
Benedikt Heine
fe7d82380e
Use GLib to spawn browser and dmenu
2018-10-08 18:27:11 +02:00
Benedikt Heine
778a6857d8
Move clean_value function to utils.c
...
This is a typical string manipulation function an has no necessity to
stay in option_parser.
2018-10-08 18:27:11 +02:00
Benedikt Heine
6cc7ca361a
Allow half quoted values
...
Previously config lines like
[rule]
script = mail -s "New notif"
were only possible to get written with additional full quotes,
which makes no sense in command line expressions.
2018-10-08 18:27:11 +02:00
Benedikt Heine
357c4309e6
Pass URLs to browser as a single argument
...
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.
2018-10-08 18:27:11 +02:00
Benedikt Heine
851953f5ef
Start dmenu in a separate thread
2018-10-08 18:27:11 +02:00
Benedikt Heine
516161e765
Typo
2018-10-08 17:38:00 +02:00
Benedikt Heine
1f4cd4bd15
Use STR_(EMPTY|FULL) for string emptyness checks
2018-10-08 17:38:00 +02:00
Benedikt Heine
da846d8442
Do not count longer than necessary
...
And also use g_strndup. This makes allocation easier and also ensures a
null-byte at the end of the string.
2018-10-08 17:38:00 +02:00
Benedikt Heine
c80e3e9a42
Harness dispatch_menu_result against stupid input
2018-10-06 13:44:01 +02:00
Benedikt Heine
38c788c367
Split plain dmenu call into separate function
2018-10-06 13:44:01 +02:00
Benedikt Heine
958aa2bc96
Lock notifications while executing dmenu
...
When executing dmenu, the current notifications get "locked", by setting
their timeout temporarily to 0 and referencing them. So the notification
won't get closed (exept forcefully) and won't get freed while dmenu is
opened.
This is currently pointless, but as the dmenu call will become threaded,
it's necessary later.
2018-10-06 13:44:01 +02:00
Benedikt Heine
974bcb776e
Remember if the notification is living on a valid connection
...
The notification spec says, that a notification gets invalidated when
closed. So the client won't listen anymore to ActionInvoked signals and
won't listen to NotificationClosed signals.
Remembering the actual status of the notification helps the standard and
makes the behavior clearer.
2018-10-06 13:44:01 +02:00
Benedikt Heine
837b4fe125
Implement refcounting for notifications
2018-10-06 13:43:49 +02:00
Benedikt Heine
2ef74c0d64
Respect follow mode from defaults struct
2018-10-05 02:10:41 +02:00
Benedikt Heine
403e4cc176
Remove libxdg-basedir dependency
...
GLib's g_get_user_config_dir function does exactly the same thing and
we don't need libxdg-basedir for something else.
2018-10-05 02:10:41 +02:00
Benedikt Heine
0306446efb
Scale PixBuf easier
2018-10-05 02:10:41 +02:00
Benedikt Heine
3b3ed0328e
Free layouts inline
2018-10-01 15:05:42 +02:00
Benedikt Heine
0231fabbd3
Make parse_follow_mode a real parser function
2018-10-01 14:58:36 +02:00
Benedikt Heine
4b5cc2c9bc
Remove superfluous fflush call
...
The blame reveals commit 820cfe73, which introduced printing of
notifications similar to notification_print(). The fflush call is still
left over since porting the printfs into their dedicated method.
As notification_print() is called after this fflush() call, it's not
necessary anymore.
2018-10-01 14:58:36 +02:00
Benedikt Heine
c5c4b2cafb
Use native notification functions in test
...
Since we'll allocate also some recursive elements with
notification_create, we have to free the notification properly.
2018-10-01 13:11:21 +02:00
Nikos Tsipinakis
740ebdd5a3
Merge pull request #545 from tsipinakis/bugfix/x11-opt
...
Draw event optimizations
2018-09-24 20:25:17 +03:00
Nikos Tsipinakis
09ef1b2b32
Merge pull request #531 from bebehei/typenames
...
Refactor typenames
2018-09-24 15:55:28 +03:00
Nikos Tsipinakis
7ac054b3cc
Simplify window showing and hiding
...
As suggested by @bebehei make x_win_{show,hide} callable at any time and
avoid double checking the queue length.
2018-09-20 10:49:40 +03:00
Nikos Tsipinakis
69100790a1
Do not wake up on focus events
...
Focus events do not mark any change in state of the notifications so
calling wake_up as a response is a wake of CPU cycles. Instead treat
them like PropertyNotify and only redraw if we need to change monitors.
2018-09-20 10:40:05 +03:00
Benedikt Heine
476ddc81ff
Remove last "color color"
2018-09-16 02:58:40 +02:00
Benedikt Heine
41af2e0a0e
Rename variable name color to actual foreground
2018-09-16 02:58:38 +02:00
Benedikt Heine
c712f57ace
Reformat ellipsize enum
2018-09-16 02:58:37 +02:00
Benedikt Heine
c5d552856f
Reformat icon_position enum
2018-09-16 02:58:35 +02:00
Benedikt Heine
2a5fe938f6
Reformat alignment enum
2018-09-16 02:58:33 +02:00
Benedikt Heine
bbbddad3a7
Use structs for notifications
2018-09-16 02:58:31 +02:00
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