Hello community, here is the log from the commit of package mako for openSUSE:Factory checked in at 2020-01-13 22:22:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mako (Old) and /work/SRC/openSUSE:Factory/.mako.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mako" Mon Jan 13 22:22:09 2020 rev:4 rq:763930 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/mako/mako.changes 2019-07-22 12:21:39.639644369 +0200 +++ /work/SRC/openSUSE:Factory/.mako.new.6675/mako.changes 2020-01-13 22:22:13.354537660 +0100 @@ -1,0 +2,9 @@ +Mon Jan 13 12:10:22 UTC 2020 - Michael Vetter <mvet...@suse.com> + +- Update to 1.4.1: + * `makoctl menu` to choose a notification action + * A CLI flag to use a custom config file path + * Improved touch support (multiple touches) + * Bug fixes + +------------------------------------------------------------------- Old: ---- v1.4.tar.gz New: ---- v1.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mako.spec ++++++ --- /var/tmp/diff_new_pack.V7uhMm/_old 2020-01-13 22:22:14.442538165 +0100 +++ /var/tmp/diff_new_pack.V7uhMm/_new 2020-01-13 22:22:14.446538167 +0100 @@ -1,7 +1,7 @@ # # spec file for package mako # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: mako -Version: 1.4 +Version: 1.4.1 Release: 0 Summary: A Wayland notification daemon License: MIT ++++++ v1.4.tar.gz -> v1.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/README.md new/mako-1.4.1/README.md --- old/mako-1.4/README.md 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/README.md 2020-01-12 03:44:08.000000000 +0100 @@ -6,6 +6,8 @@ <img src="https://sr.ht/meoc.png" alt="mako screenshot"> </p> +mako implements the [GNOME Desktop Notifications Specification][gnome-draft]. + Feel free to join the IRC channel: ##emersion on irc.freenode.net. ## Running @@ -27,6 +29,8 @@ * systemd or elogind (for the sd-bus library) * gdk-pixbuf (optional, for icons support) * dbus (runtime dependency, user-session support is required) +* scdoc (optional, for man pages) +* jq (optional, runtime dependency) Then run: @@ -43,3 +47,5 @@ ## License MIT + +[gnome-draft]: https://developer.gnome.org/notification-spec/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/config.c new/mako-1.4.1/config.c --- old/mako-1.4/config.c 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/config.c 2020-01-12 03:44:08.000000000 +0100 @@ -544,10 +544,15 @@ return NULL; } -int load_config_file(struct mako_config *config) { - char *path = get_config_path(); - if (!path) { - return 0; +int load_config_file(struct mako_config *config, char *config_arg) { + char *path = NULL; + if (config_arg == NULL) { + path = get_config_path(); + if (!path) { + return 0; + } + } else { + path = config_arg; } FILE *f = fopen(path, "r"); @@ -642,6 +647,7 @@ int parse_config_arguments(struct mako_config *config, int argc, char **argv) { static const struct option long_options[] = { {"help", no_argument, 0, 'h'}, + {"config", required_argument, 0, 'c'}, {"font", required_argument, 0, 0}, {"background-color", required_argument, 0, 0}, {"text-color", required_argument, 0, 0}, @@ -674,13 +680,34 @@ wl_container_of(config->criteria.next, root_criteria, link); optind = 1; + char *config_arg = NULL; while (1) { int option_index = -1; - int c = getopt_long(argc, argv, "h", long_options, &option_index); + int c = getopt_long(argc, argv, "hc:", long_options, &option_index); if (c < 0) { break; } else if (c == 'h') { return 1; + } else if (c == 'c') { + config_arg = strdup(optarg); + } else if (c != 0) { + return -1; + } + } + + int config_status = load_config_file(config, config_arg); + if (config_status < 0) { + return -1; + } + + optind = 1; + while (1) { + int option_index = -1; + int c = getopt_long(argc, argv, "hc:", long_options, &option_index); + if (c < 0) { + break; + } else if (c == 'h' || c == 'c') { + continue; } else if (c != 0) { return -1; } @@ -702,13 +729,12 @@ struct mako_config new_config = {0}; init_default_config(&new_config); - int config_status = load_config_file(&new_config); int args_status = parse_config_arguments(&new_config, argc, argv); if (args_status > 0) { finish_config(&new_config); return args_status; - } else if (config_status < 0 || args_status < 0) { + } else if (args_status < 0) { fprintf(stderr, "Failed to parse config\n"); finish_config(&new_config); return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/contrib/apparmor/fr.emersion.Mako new/mako-1.4.1/contrib/apparmor/fr.emersion.Mako --- old/mako-1.4/contrib/apparmor/fr.emersion.Mako 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/contrib/apparmor/fr.emersion.Mako 2020-01-12 03:44:08.000000000 +0100 @@ -3,6 +3,7 @@ profile fr.emersion.Mako /usr/bin/mako { #include <abstractions/base> #include <abstractions/fonts> + #include <abstractions/freedesktop.org> #include <abstractions/wayland> #include <abstractions/dbus-strict> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/contrib/completions/zsh/_makoctl new/mako-1.4.1/contrib/completions/zsh/_makoctl --- old/mako-1.4/contrib/completions/zsh/_makoctl 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/contrib/completions/zsh/_makoctl 2020-01-12 03:44:08.000000000 +0100 @@ -3,28 +3,29 @@ local -a makoctl_cmds makoctl_cmds=( - 'dismiss:Dismisses notification (first by default)' - 'invoke:Invokes an action on the first notification. If action is not specified, invokes the default action' - 'reload:Reloads the configuration file' - 'help:Show help message and quit' + 'dismiss:Dismisses notification (first by default)' + 'invoke:Invokes an action on the first notification. If action is not specified, invokes the default action' + 'list:Retrieve a list of current notifications' + 'reload:Reloads the configuration file' + 'help:Show help message and quit' ) if (( CURRENT == 2 )); then - _describe 'makoctl command' makoctl_cmds + _describe 'makoctl command' makoctl_cmds else - shift words - (( CURRENT-- )) - opt="${words[1]}" + shift words + (( CURRENT-- )) + opt="${words[1]}" - if (( CURRENT == 2 )); then - case "${opt}" in - dismiss) - _arguments -s \ - '(-a --all)'{-a,--all}'[Dimiss all notification]' - ;; - invoke) - _message -e action 'action' - ;; - esac - fi + if (( CURRENT == 2 )); then + case "${opt}" in + dismiss) + _arguments -s \ + '(-a --all)'{-a,--all}'[Dimiss all notification]' + ;; + invoke) + _message -e action 'action' + ;; + esac + fi fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/dbus/xdg.c new/mako-1.4.1/dbus/xdg.c --- old/mako-1.4/dbus/xdg.c 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/dbus/xdg.c 2020-01-12 03:44:08.000000000 +0100 @@ -186,13 +186,23 @@ return ret; } notif->urgency = urgency; - } else { + } else if (strcmp(contents, "y") == 0) { uint8_t urgency = 0; ret = sd_bus_message_read(msg, "v", "y", &urgency); if (ret < 0) { return ret; } notif->urgency = urgency; + } else if (strcmp(contents, "i") == 0) { + int32_t urgency = 0; + ret = sd_bus_message_read(msg, "v", "i", &urgency); + if (ret < 0) { + return ret; + } + notif->urgency = urgency; + } else { + fprintf(stderr, "Unsupported variant type for \"urgency\": \"%s\"\n", contents); + return -1; } } else if (strcmp(hint, "category") == 0) { const char *category = NULL; @@ -217,7 +227,22 @@ return ret; } notif->progress = progress; - } else if (strcmp(hint, "image-data") == 0 || strcmp(hint, "icon_data") == 0) { + } else if (strcmp(hint, "image-path") == 0 || + strcmp(hint, "image_path") == 0) { // Deprecated. + const char *image_path = NULL; + ret = sd_bus_message_read(msg, "v", "s", &image_path); + if (ret < 0) { + return ret; + } + // image-path is higher priority than app_icon, so just overwrite + // it. We're guaranteed to be doing this after reading the "real" + // app_icon. It's also lower priority than image-data, and that + // will win over app_icon if provided. + free(notif->app_icon); + notif->app_icon = strdup(image_path); + } else if (strcmp(hint, "image-data") == 0 || + strcmp(hint, "image_data") == 0 || // Deprecated. + strcmp(hint, "icon_data") == 0) { // Even more deprecated. ret = sd_bus_message_enter_container(msg, 'v', "(iiibiiay)"); if (ret < 0) { return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/include/config.h new/mako-1.4.1/include/config.h --- old/mako-1.4/include/config.h 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/include/config.h 2020-01-12 03:44:08.000000000 +0100 @@ -98,7 +98,7 @@ struct mako_style *target, struct mako_config *config); int parse_config_arguments(struct mako_config *config, int argc, char **argv); -int load_config_file(struct mako_config *config); +int load_config_file(struct mako_config *config, char *config_arg); int reload_config(struct mako_config *config, int argc, char **argv); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/include/wayland.h new/mako-1.4.1/include/wayland.h --- old/mako-1.4/include/wayland.h 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/include/wayland.h 2020-01-12 03:44:08.000000000 +0100 @@ -4,6 +4,8 @@ #include <stdbool.h> #include <wayland-client-protocol.h> +#define MAX_TOUCHPOINTS 10 + struct mako_state; struct mako_output { @@ -30,7 +32,9 @@ struct { struct wl_touch *wl_touch; - int32_t x, y; + struct { + int32_t x, y; + } pts[MAX_TOUCHPOINTS]; } touch; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/main.c new/mako-1.4.1/main.c --- old/mako-1.4/main.c 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/main.c 2020-01-12 03:44:08.000000000 +0100 @@ -15,6 +15,7 @@ "Usage: mako [options...]\n" "\n" " -h, --help Show help message and quit.\n" + " -c, --config <path> Path to config file.\n" " --font <font> Font family and size.\n" " --background-color <color> Background color.\n" " --text-color <color> Text color.\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/mako.1.scd new/mako-1.4.1/mako.1.scd --- old/mako-1.4/mako.1.scd 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/mako.1.scd 2020-01-12 03:44:08.000000000 +0100 @@ -11,7 +11,7 @@ # DESCRIPTION mako is a graphical notification daemon for Wayland compositors which support -the layer-shell protocol. Notifications received over dbus are displayed until +the layer-shell protocol. Notifications received over D-Bus are displayed until dismissed with a click or via *makoctl*(1). # OPTIONS @@ -19,309 +19,12 @@ *-h, --help* Show help message and quit. -# GLOBAL CONFIGURATION OPTIONS +*-c, --config* + Custom path to the config file. -*--max-visible* _n_ - Set maximum number of visible notifications to _n_. Older notifications will - be hidden. If -1, all notifications are visible. - - Default: 5 - -*--sort* _+/-time_ | _+/-priority_ - Sorts incoming notifications by time and/or priority in ascending(+) - or descending(-) order. - - Default: -time - -*--output* _name_ - Show notifications on the specified output. If empty, notifications will - appear on the focused output. - - Requires the compositor to support the Wayland protocol - xdg-output-unstable-v1 version 2. - - Default: "" - -*--layer* _layer_ - Arrange mako at the specified layer, relative to normal windows. Supported - values are _background_, _bottom_, _top_, and _overlay_. Using _overlay_ - will cause notifications to be displayed above fullscreen windows, though - this may also occur at _top_ depending on your compositor. - - Default: top - -*--anchor* _position_ - Show notifications at the specified position on the output. Supported values - are _top-right_, _top-center_, _top-left_, _bottom-right_, _bottom-center_, - _bottom-left_, and _center_. - - Default: top-right - -# STYLE OPTIONS - -*--font* _font_ - Set font to _font_, in Pango format. - - Default: monospace 10 - -*--background-color* _color_ - Set background color to _color_. See *COLORS* for more information. - - Default: #285577FF - -*--text-color* _color_ - Set text color to _color_. See *COLORS* for more information. - - Default: #FFFFFFFF - -*--width* _px_ - Set width of notification popups. - - Default: 300 - -*--height* _px_ - Set maximium height of notification popups. Notifications whose text takes - up less space are shrunk to fit. - - Default: 100 - -*--margin* _directional_ - Set margin of each edge to the size specified by _directional_. See - *DIRECTIONAL VALUES* for more information. - - Default: 10 - -*--padding* _directional_ - Set padding on each side to the size specified by _directional_. See - *DIRECTIONAL VALUES* for more information. - - Default: 5 - -*--border-size* _px_ - Set popup border size to _px_ pixels. - - Default: 1 - -*--border-color* _color_ - Set popup border color to _color_. See *COLORS* for more information. - - Default: #4C7899FF - -*--border-radius* _px_ - Set popup corner radius to _px_ pixels. - - Default: 0 - -*--progress-color* [over|source] _color_ - Set popup progress indicator color to _color_. See *COLOR* for more - information. To draw the progress indicator on top of the background - color, use the *over* attribute. To replace the background color, use - the *source* attribute (this can be useful when the notification is - semi-transparent). - - Default: over #5588AAFF - -*--icons* 0|1 - Show icons in notifications. - - Default: 1 - -*--max-icon-size* _px_ - Set maximum icon size to _px_ pixels. - - Default: 64 - -*--icon-path* _path_\[:_path_...\] - Paths to search for icons when a notification specifies a name instead - of a full path. Colon-delimited. This approximates the search algorithm - used by the XDG Icon Theme Specification, but does not support any of - the theme metadata. Therefore, if you want to search parent themes, - you'll need to add them to the path manually. - - /usr/share/icons/hicolor and /usr/share/pixmaps are always searched. - - Default: "" - -*--markup* 0|1 - If 1, enable Pango markup. If 0, disable Pango markup. If enabled, Pango - markup will be interpreted in your format specifier and in the body of - notifications. - - Default: 1 - -*--actions* 0|1 - Applications may request an action to be associated with activating a - notification. Disabling this will cause mako to ignore these requests. - - Default: 1 - -*--format* _format_ - Set notification format string to _format_. See *FORMAT SPECIFIERS* for - more information. To change this for grouped notifications, set it within - a _grouped_ criteria. - - Default: <b>%s</b>\\n%b - Default when grouped: (%g) <b>%s</b>\\n%b - -*--default-timeout* _timeout_ - Set the default timeout to _timeout_ in milliseconds. To disable the - timeout, set it to zero. - - Default: 0 - -*--ignore-timeout* 0|1 - If set, mako will ignore the expire timeout sent by notifications and use - the one provided by _default-timeout_ instead. - - Default: 0 - -*--group-by* _field[,field,...]_ - A comma-separated list of criteria fields that will be compared to other - visible notifications to determine if this one should form a group with - them. All listed criteria must be exactly equal for two notifications to - group. - - Default: none - -# CRITERIA-ONLY STYLE OPTIONS - -Some style options are not useful in the global context and therefore have no -associated command-line option. - -*invisible* 0|1 - Whether this notification should be invisible even if it is above the - _max-visible_ cutoff. This is used primarily for hiding members of groups. - If you want to make more than the first group member visible, turn this - option off within a _group-index_ criteria. - - Default: 0 - -# CONFIG FILE - -The config file is located at *~/.config/mako/config* or at -*$XDG\_CONFIG\_HOME/mako/config*. Each line of the form: - - key=value - -Is equivalent to passing *--key=value* to mako from the command line. Note that -any quotes used within your shell are unnecessary and also invalid in the -config file. - -Empty lines and lines that begin with # are ignored. - -# CRITERIA - -In addition to the set of options at the top of the file, the config file may -contain zero or more sections, each containing any combination of the -*STYLE OPTIONS*. The sections, called criteria, are defined with an INI-like -square bracket syntax. The brackets may contain any number of fields, like so: - - \[field=value field2=value2 ...\] - -When a notification is received, it will be compared to the fields defined in -each criteria. If all of the fields match, the style options within will be -applied to the notification. Fields not included in the criteria are not -considered during the match. A notification may match any number of criteria. -This matching occurs in the order the criteria are defined in the config file, -meaning that if multiple criteria match a notification, the last occurrence of -any given style option will "win". - -The following fields are available in criteria: - -- _app-name_ (string) -- _app-icon_ (string) -- _summary_ (string) - - An exact match on the summary of the notification. -- _urgency_ (one of "low", "normal", "high") -- _category_ (string) -- _desktop-entry_ (string) -- _actionable_ (boolean) -- _expiring_ (boolean) -- _grouped_ (boolean) - - Whether the notification is grouped with any others (its group-index is - not -1). -- _group-index_ (int) - - The notification's index within its group, or -1 if it is not grouped. -- _hidden_ (boolean) - - _hidden_ is special, it defines the style for the placeholder shown when - the number of notifications or groups exceeds _max-visible_. - -If a field's value contains special characters, they may be escaped with a -backslash, or quoted: - - \[app-name="Google Chrome"\] - - \[app-name=Google\\ Chrome\] - -Quotes within quotes may also be escaped, and a literal backslash may be -specified as \\\\. No spaces are allowed around the equal sign. Escaping equal -signs within values is unnecessary. - -Additionally, boolean values may be specified using any of true/false, 0/1, or -as bare words: - - \[actionable=true\] \[actionable=1\] \[actionable\] - - \[actionable=false\] \[actionable=0\] \[!actionable\] - -There are three criteria always present at the front of the list: -- An empty criteria which matches all notifications and contains the defaults - for all style options, overwritten with any configured in the global section. -- \[grouped\], which sets the default *format* for grouped notifications and - sets them *invisible*. -- \[group-index=0\], which makes the first member of each group visible again. - -These options can be overridden by simply defining the criteria yourself and -overriding them. - -# COLORS - -Colors can be specified as _#RRGGBB_ or _#RRGGBBAA_. - -# DIRECTIONAL VALUES - -Some options set values that affect all four edges of a notification. These -options can be specified in several different ways, depending on how much -control over each edge is desired: - -- A single value will apply to all four edges. -- Two values will set vertical and horizontal edges separately. -- Three will set top, horizontal, and bottom edges separately. -- Four will give each edge a separate value. - -When specifying multiple values, they should be comma-separated. For example, -this would set the top margin to 10, left and right to 20, and bottom to five: - -``` ---margin 10,20,5 -``` - -# FORMAT SPECIFIERS - -Format specification works similarly to *printf*(3), but with a different set of -specifiers. - -*%%* Literal "%" - -*\\\\* Literal "\\" - -*\\n* New Line - -## For notifications - -*%a* Application name - -*%s* Notification summary - -*%b* Notification body - -*%g* Number of notifications in the current group - -## For the hidden notifications placeholder - -*%h* Number of hidden notifications - -*%t* Total number of notifications +Additionally, global configuration options can be specified. Passing +*--key=value* is equivalent to a *key=value* line in the configuration file. +See *mako*(5) for a list of options. # AUTHORS @@ -331,4 +34,4 @@ # SEE ALSO -*makoctl*(1) +*mako*(5) *makoctl*(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/mako.5.scd new/mako-1.4.1/mako.5.scd --- old/mako-1.4/mako.5.scd 1970-01-01 01:00:00.000000000 +0100 +++ new/mako-1.4.1/mako.5.scd 2020-01-12 03:44:08.000000000 +0100 @@ -0,0 +1,316 @@ +mako(5) + +# NAME + +mako - configuration file + +# DESCRIPTION + +The config file is located at *~/.config/mako/config* or at +*$XDG\_CONFIG\_HOME/mako/config*. Option lines can be specified to configure +mako like so: + + key=value + +Empty lines and lines that begin with # are ignored. + +# GLOBAL CONFIGURATION OPTIONS + +*max-visible* = _n_ + Set maximum number of visible notifications to _n_. Older notifications will + be hidden. If -1, all notifications are visible. + + Default: 5 + +*sort* = _+/-time_ | _+/-priority_ + Sorts incoming notifications by time and/or priority in ascending(+) + or descending(-) order. + + Default: -time + +*output* = _name_ + Show notifications on the specified output. If empty, notifications will + appear on the focused output. + + Requires the compositor to support the Wayland protocol + xdg-output-unstable-v1 version 2. + + Default: "" + +*layer* = _layer_ + Arrange mako at the specified layer, relative to normal windows. Supported + values are _background_, _bottom_, _top_, and _overlay_. Using _overlay_ + will cause notifications to be displayed above fullscreen windows, though + this may also occur at _top_ depending on your compositor. + + Default: top + +*anchor* = _position_ + Show notifications at the specified position on the output. Supported values + are _top-right_, _top-center_, _top-left_, _bottom-right_, _bottom-center_, + _bottom-left_, and _center_. + + Default: top-right + +# STYLE OPTIONS + +*font* = _font_ + Set font to _font_, in Pango format. + + Default: monospace 10 + +*background-color* = _color_ + Set background color to _color_. See *COLORS* for more information. + + Default: #285577FF + +*text-color* = _color_ + Set text color to _color_. See *COLORS* for more information. + + Default: #FFFFFFFF + +*width* = _px_ + Set width of notification popups. + + Default: 300 + +*height* = _px_ + Set maximum height of notification popups. Notifications whose text takes + up less space are shrunk to fit. + + Default: 100 + +*margin* = _directional_ + Set margin of each edge to the size specified by _directional_. See + *DIRECTIONAL VALUES* for more information. + + Default: 10 + +*padding* = _directional_ + Set padding on each side to the size specified by _directional_. See + *DIRECTIONAL VALUES* for more information. + + Default: 5 + +*border-size* = _px_ + Set popup border size to _px_ pixels. + + Default: 1 + +*border-color* = _color_ + Set popup border color to _color_. See *COLORS* for more information. + + Default: #4C7899FF + +*border-radius* = _px_ + Set popup corner radius to _px_ pixels. + + Default: 0 + +*progress-color* = [over|source] _color_ + Set popup progress indicator color to _color_. See *COLOR* for more + information. To draw the progress indicator on top of the background + color, use the *over* attribute. To replace the background color, use + the *source* attribute (this can be useful when the notification is + semi-transparent). + + Default: over #5588AAFF + +*icons* = 0|1 + Show icons in notifications. + + Default: 1 + +*max-icon-size* = _px_ + Set maximum icon size to _px_ pixels. + + Default: 64 + +*icon-path* = _path_\[:_path_...\] + Paths to search for icons when a notification specifies a name instead + of a full path. Colon-delimited. This approximates the search algorithm + used by the XDG Icon Theme Specification, but does not support any of + the theme metadata. Therefore, if you want to search parent themes, + you'll need to add them to the path manually. + + /usr/share/icons/hicolor and /usr/share/pixmaps are always searched. + + Default: "" + +*markup* = 0|1 + If 1, enable Pango markup. If 0, disable Pango markup. If enabled, Pango + markup will be interpreted in your format specifier and in the body of + notifications. + + Default: 1 + +*actions* = 0|1 + Applications may request an action to be associated with activating a + notification. Disabling this will cause mako to ignore these requests. + + Default: 1 + +*format* = _format_ + Set notification format string to _format_. See *FORMAT SPECIFIERS* for + more information. To change this for grouped notifications, set it within + a _grouped_ criteria. + + Default: <b>%s</b>\\n%b + Default when grouped: (%g) <b>%s</b>\\n%b + +*default-timeout* = _timeout_ + Set the default timeout to _timeout_ in milliseconds. To disable the + timeout, set it to zero. + + Default: 0 + +*ignore-timeout* = 0|1 + If set, mako will ignore the expire timeout sent by notifications and use + the one provided by _default-timeout_ instead. + + Default: 0 + +*group-by* = _field[,field,...]_ + A comma-separated list of criteria fields that will be compared to other + visible notifications to determine if this one should form a group with + them. All listed criteria must be exactly equal for two notifications to + group. + + Default: none + +# CRITERIA + +In addition to the set of options at the top of the file, the config file may +contain zero or more sections, each containing any combination of the +*STYLE OPTIONS*. The sections, called criteria, are defined with an INI-like +square bracket syntax. The brackets may contain any number of fields, like so: + + \[field=value field2=value2 ...\] + +When a notification is received, it will be compared to the fields defined in +each criteria. If all of the fields match, the style options within will be +applied to the notification. Fields not included in the criteria are not +considered during the match. A notification may match any number of criteria. +This matching occurs in the order the criteria are defined in the config file, +meaning that if multiple criteria match a notification, the last occurrence of +any given style option will "win". + +The following fields are available in criteria: + +- _app-name_ (string) +- _app-icon_ (string) +- _summary_ (string) + - An exact match on the summary of the notification. +- _urgency_ (one of "low", "normal", "high") +- _category_ (string) +- _desktop-entry_ (string) +- _actionable_ (boolean) +- _expiring_ (boolean) +- _grouped_ (boolean) + - Whether the notification is grouped with any others (its group-index is + not -1). +- _group-index_ (int) + - The notification's index within its group, or -1 if it is not grouped. +- _hidden_ (boolean) + - _hidden_ is special, it defines the style for the placeholder shown when + the number of notifications or groups exceeds _max-visible_. + +If a field's value contains special characters, they may be escaped with a +backslash, or quoted: + + \[app-name="Google Chrome"\] + + \[app-name=Google\\ Chrome\] + +Quotes within quotes may also be escaped, and a literal backslash may be +specified as \\\\. No spaces are allowed around the equal sign. Escaping equal +signs within values is unnecessary. + +Additionally, boolean values may be specified using any of true/false, 0/1, or +as bare words: + + \[actionable=true\] \[actionable=1\] \[actionable\] + + \[actionable=false\] \[actionable=0\] \[!actionable\] + +There are three criteria always present at the front of the list: +- An empty criteria which matches all notifications and contains the defaults + for all style options, overwritten with any configured in the global section. +- \[grouped\], which sets the default *format* for grouped notifications and + sets them *invisible*. +- \[group-index=0\], which makes the first member of each group visible again. + +These options can be overridden by simply defining the criteria yourself and +overriding them. + +# CRITERIA-ONLY STYLE OPTIONS + +Some style options are not useful in the global context and therefore have no +associated command-line option. + +*invisible* = 0|1 + Whether this notification should be invisible even if it is above the + _max-visible_ cutoff. This is used primarily for hiding members of groups. + If you want to make more than the first group member visible, turn this + option off within a _group-index_ criteria. + + Default: 0 + +# COLORS + +Colors can be specified as _#RRGGBB_ or _#RRGGBBAA_. + +# DIRECTIONAL VALUES + +Some options set values that affect all four edges of a notification. These +options can be specified in several different ways, depending on how much +control over each edge is desired: + +- A single value will apply to all four edges. +- Two values will set vertical and horizontal edges separately. +- Three will set top, horizontal, and bottom edges separately. +- Four will give each edge a separate value. + +When specifying multiple values, they should be comma-separated. For example, +this would set the top margin to 10, left and right to 20, and bottom to five: + +``` +margin = 10,20,5 +``` + +# FORMAT SPECIFIERS + +Format specification works similarly to *printf*(3), but with a different set of +specifiers. + +*%%* Literal "%" + +*\\\\* Literal "\\" + +*\\n* New Line + +## For notifications + +*%a* Application name + +*%s* Notification summary + +*%b* Notification body + +*%g* Number of notifications in the current group + +## For the hidden notifications placeholder + +*%h* Number of hidden notifications + +*%t* Total number of notifications + +# AUTHORS + +Maintained by Simon Ser <cont...@emersion.fr>, who is assisted by other +open-source contributors. For more information about mako development, see +https://github.com/emersion/mako. + +# SEE ALSO + +*mako*(1) *makoctl*(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/makoctl new/mako-1.4.1/makoctl --- old/mako-1.4/makoctl 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/makoctl 2020-01-12 03:44:08.000000000 +0100 @@ -8,6 +8,8 @@ echo " invoke [-n id] [action] Invoke an action on the notification" echo " with the given id, or the last" echo " notification if none is given" + echo " menu [prog] [arg ...] Use [prog] [args ...] to select one" + echo " notification action to be invoked" echo " list List notifications" echo " reload Reload the configuration file" echo " help Show this help" @@ -41,7 +43,7 @@ ;; "invoke") id=0 - if [ $# -gt 1 ] && [ $2 == "-n" ]; then + if [ $# -gt 1 ] && [ "$2" = "-n" ]; then id="$3" shift 2 fi @@ -53,6 +55,26 @@ call InvokeAction "us" "$id" "$action" ;; +"menu") + shift 1 + if ! type -p jq > /dev/null; then + echo >&2 "$0: jq is required to use 'menu'" + exit 1 + fi + if array="$(call ListNotifications | jq -re '.data[0][0].actions.data | if length > 0 then . else false end')"; then + sel="$(jq -rn "$array|values[]" | "$@")" + sel="$(jq -rn --arg sel "$sel" "$array|to_entries[]|select(.value == \$sel).key")" + if [ -z "$sel" ]; then + echo >&2 "$0: No action selected" + exit 1 + else + call InvokeAction "us" 0 "$sel" + fi + else + echo >&2 "$0: No actions found" + exit 1 + fi + ;; "list") call ListNotifications ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/makoctl.1.scd new/mako-1.4.1/makoctl.1.scd --- old/mako-1.4/makoctl.1.scd 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/makoctl.1.scd 2020-01-12 03:44:08.000000000 +0100 @@ -26,6 +26,21 @@ Invokes an action on the first notification. If _action_ is not specified, invokes the default action. +*menu* [program] [argument ...] + Use a program to select an action on the first notification. The list of + actions are joined on newlines and passed to _program_. The program should + write the selected action to stdout. If an action is given, this action + will be invoked. + + If no action is found, or no action is selected, _makoctl_ will return non-zero. + + Examples: + + ``` + makoctl menu dmenu -p 'Select Action: ' + makoctl menu wofi -d -p 'Choose Action: ' + ``` + *list* Retrieve a list of current notifications. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/meson.build new/mako-1.4.1/meson.build --- old/mako-1.4/meson.build 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/meson.build 2020-01-12 03:44:08.000000000 +0100 @@ -1,7 +1,7 @@ project( 'mako', 'c', - version: '1.3.0', + version: '1.4.1', license: 'MIT', meson_version: '>=0.47.0', default_options: [ @@ -107,7 +107,7 @@ if scdoc.found() sh = find_program('sh') - man_pages = ['mako.1.scd', 'makoctl.1.scd'] + man_pages = ['mako.1.scd', 'mako.5.scd', 'makoctl.1.scd'] mandir = get_option('mandir') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.4/wayland.c new/mako-1.4.1/wayland.c --- old/mako-1.4/wayland.c 2019-07-19 12:57:01.000000000 +0200 +++ new/mako-1.4.1/wayland.c 2020-01-12 03:44:08.000000000 +0100 @@ -100,16 +100,22 @@ uint32_t time, int32_t id, wl_fixed_t surface_x, wl_fixed_t surface_y) { struct mako_seat *seat = data; - seat->touch.x = wl_fixed_to_int(surface_x); - seat->touch.y = wl_fixed_to_int(surface_y); + if (id >= MAX_TOUCHPOINTS) { + return; + } + seat->touch.pts[id].x = wl_fixed_to_int(surface_x); + seat->touch.pts[id].y = wl_fixed_to_int(surface_y); } static void touch_handle_down(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, struct wl_surface *sfc, int32_t id, wl_fixed_t surface_x, wl_fixed_t surface_y) { struct mako_seat *seat = data; - seat->touch.x = wl_fixed_to_int(surface_x); - seat->touch.y = wl_fixed_to_int(surface_y); + if (id >= MAX_TOUCHPOINTS) { + return; + } + seat->touch.pts[id].x = wl_fixed_to_int(surface_x); + seat->touch.pts[id].y = wl_fixed_to_int(surface_y); } static void touch_handle_up(void *data, struct wl_touch *wl_touch, @@ -118,8 +124,11 @@ struct mako_state *state = seat->state; struct mako_notification *notif; + if (id >= MAX_TOUCHPOINTS) { + return; + } wl_list_for_each(notif, &state->notifications, link) { - if (hotspot_at(¬if->hotspot, seat->touch.x, seat->touch.y)) { + if (hotspot_at(¬if->hotspot, seat->touch.pts[id].x, seat->touch.pts[id].y)) { notification_handle_touch(notif); break; }