Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package fuzzel for openSUSE:Factory checked 
in at 2023-07-14 15:36:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fuzzel (Old)
 and      /work/SRC/openSUSE:Factory/.fuzzel.new.3193 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fuzzel"

Fri Jul 14 15:36:08 2023 rev:9 rq:1098649 version:1.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/fuzzel/fuzzel.changes    2023-04-18 
15:53:06.473494454 +0200
+++ /work/SRC/openSUSE:Factory/.fuzzel.new.3193/fuzzel.changes  2023-07-14 
15:36:17.066160600 +0200
@@ -1,0 +2,11 @@
+Fri Jul 14 09:35:34 UTC 2023 - llyyr <llyyr.pub...@gmail.com>
+
+- Update to 1.9.2:
+  * Added a new option --filter-desktop
+  * Added missing zsh+fish completions for --password
+  * Output scaling is now applied to the border radius
+  * Last line sometimes not being rendered
+  * key-bindings.cursor-right-word not being recognized as a valid action
+  * password-character being set in fuzzel.ini incorrectly enabling password 
mode
+
+-------------------------------------------------------------------

Old:
----
  fuzzel-1.9.1.tar.gz

New:
----
  fuzzel-1.9.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fuzzel.spec ++++++
--- /var/tmp/diff_new_pack.PHgaUf/_old  2023-07-14 15:36:17.750164578 +0200
+++ /var/tmp/diff_new_pack.PHgaUf/_new  2023-07-14 15:36:17.754164601 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           fuzzel
-Version:        1.9.1
+Version:        1.9.2
 Release:        0
 Summary:        A Wayland-native application launcher, similar to rofi's drun 
mode
 License:        MIT

++++++ fuzzel-1.9.1.tar.gz -> fuzzel-1.9.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/.woodpecker.yml new/fuzzel/.woodpecker.yml
--- old/fuzzel/.woodpecker.yml  2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/.woodpecker.yml  2023-07-14 08:49:46.000000000 +0200
@@ -33,7 +33,7 @@
     image: alpine:latest
     commands:
       - apk update
-      - apk add musl-dev linux-headers meson ninja gcc scdoc
+      - apk add musl-dev linux-headers meson ninja gcc clang scdoc
       - apk add libxkbcommon-dev cairo-dev yaml-dev librsvg-dev
       - apk add wayland-dev wayland-protocols wlroots-dev
       - apk add git
@@ -44,12 +44,18 @@
       - ninja -C bld/debug-x64 -k0
       - bld/debug-x64/fuzzel --version
 
-      # Release
+      # Release (gcc)
       - mkdir -p bld/release-x64
       - meson --buildtype=release . bld/release-x64
       - ninja -C bld/release-x64 -k0
       - bld/release-x64/fuzzel --version
 
+      # Release (clang)
+      - mkdir -p bld/release-x64-clang
+      - CC=clang meson --buildtype=release . bld/release-x64-clang
+      - ninja -C bld/release-x64-clang -k0
+      - bld/release-x64-clang/fuzzel --version
+
       # No cairo, no icons
       - mkdir -p bld/no-cairo-no-icons
       - meson --buildtype=release -Denable-cairo=disabled -Dpng-backend=none 
-Dsvg-backend=none . bld/no-cairo-no-icons
@@ -65,7 +71,7 @@
     image: i386/alpine:latest
     commands:
       - apk update
-      - apk add musl-dev linux-headers meson ninja gcc scdoc
+      - apk add musl-dev linux-headers meson ninja gcc clang scdoc
       - apk add libxkbcommon-dev cairo-dev yaml-dev librsvg-dev
       - apk add wayland-dev wayland-protocols wlroots-dev
       - apk add git
@@ -76,8 +82,14 @@
       - ninja -C bld/debug-x86 -k0
       - bld/debug-x86/fuzzel --version
 
-      # Release
+      # Release (gcc)
       - mkdir -p bld/release-x86
       - meson --buildtype=release . bld/release-x86
       - ninja -C bld/release-x86 -k0
       - bld/release-x86/fuzzel --version
+
+      # Release (clang)
+      - mkdir -p bld/release-x86-clang
+      - CC=clang meson --buildtype=release . bld/release-x86-clang
+      - ninja -C bld/release-x86-clang -k0
+      - bld/release-x86-clang/fuzzel --version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/CHANGELOG.md new/fuzzel/CHANGELOG.md
--- old/fuzzel/CHANGELOG.md     2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/CHANGELOG.md     2023-07-14 08:49:46.000000000 +0200
@@ -1,5 +1,6 @@
 # Changelog
 
+* [1.9.2](#1-9-2)
 * [1.9.1](#1-9-1)
 * [1.9.0](#1-9-0)
 * [1.8.2](#1-8-2)
@@ -21,6 +22,44 @@
 * [1.4.1](#1-4-1)
 
 
+## 1.9.2
+
+### Added
+
+* Added a new option `--filter-desktop` which toggles filtering of desktop
+  entries based on the OnlyShowIn and NotShowIn keys. Filtering is based on the
+  value of $XDG\_CURRENT\_DESKTOP according to desktop-entry spec. Filtering is
+  off by default. To disable filtering set in the config from the command line,
+  use --filter-desktop=no
+
+
+### Changed
+
+* Output scaling is now applied to the border radius ([#236][236]).
+
+[236]: https://codeberg.org/dnkl/fuzzel/issues/236
+
+
+### Fixed
+
+* Last line sometimes not being rendered ([#234][234]).
+* `key-bindings.cursor-right-word` not being recognized as a valid
+  action.
+* `password-character` being set in `fuzzel.ini` incorrectly enabling
+  password mode ([#241][241]).
+* Added missing zsh+fish completions for `--password`.
+
+[234]: https://codeberg.org/dnkl/fuzzel/issues/234
+[241]: https://codeberg.org/dnkl/fuzzel/issues/241
+
+
+### Contributors
+
+* complex2liu
+* Mark Stosberg
+* Ronan Pigott
+
+
 ## 1.9.1
 
 ### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/PKGBUILD new/fuzzel/PKGBUILD
--- old/fuzzel/PKGBUILD 2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/PKGBUILD 2023-07-14 08:49:46.000000000 +0200
@@ -3,7 +3,7 @@
 SVG_BACKEND=librsvg  # none|librsvg|nanosvg (librsvg force-enables cairo, 
nanosvg is bundled)
 
 pkgname=fuzzel
-pkgver=1.9.1
+pkgver=1.9.2
 pkgrel=1
 pkgdesc="Simplistic application launcher for wayland"
 arch=('x86_64' 'aarch64')
@@ -12,6 +12,7 @@
 makedepends=('meson' 'ninja' 'scdoc' 'wayland-protocols' 'tllist>=1.0.1')
 depends=('libxkbcommon' 'wayland' 'pixman' 'fcft>=3.0.0' 'fcft<4.0.0')
 source=()
+changelog=CHANGELOG.md
 
 if [[ ${PNG_BACKEND} == libpng ]]; then
     depends+=( 'libpng' )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/application.h new/fuzzel/application.h
--- old/fuzzel/application.h    2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/application.h    2023-07-14 08:49:46.000000000 +0200
@@ -48,6 +48,7 @@
 };
 
 typedef tll(char32_t *) char32_list_t;
+typedef tll(char *) char_list_t;
 
 struct application {
     char *id; /* Desktop File ID, as defined in the Desktop Entry specicication
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/char32.c new/fuzzel/char32.c
--- old/fuzzel/char32.c 2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/char32.c 2023-07-14 08:49:46.000000000 +0200
@@ -7,6 +7,11 @@
 #include <wctype.h>
 #include <wchar.h>
 
+#if defined __has_include
+ #if __has_include (<stdc-predef.h>)
+   #include <stdc-predef.h>
+ #endif
+#endif
 
 #define LOG_MODULE "char32"
 #define LOG_ENABLE_DBG 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/completions/fish/fuzzel.fish 
new/fuzzel/completions/fish/fuzzel.fish
--- old/fuzzel/completions/fish/fuzzel.fish     2023-03-30 15:52:59.000000000 
+0200
+++ new/fuzzel/completions/fish/fuzzel.fish     2023-07-14 08:49:46.000000000 
+0200
@@ -17,6 +17,7 @@
 complete -c fuzzel    -s I -l no-icons                                         
                                 -d "do not render any icons"
 complete -c fuzzel -x -s F -l fields             -a "filename name generic 
exec categories keywords comment"    -d "comma separated list of XDG Desktop 
entry fields to match"
 complete -c fuzzel -x -s p -l prompt                                           
                                 -d "string to use as input prompt (\"> \")"
+complete -c fuzzel         -l password           -a "" -d "render all input 
using either '*', or the specified character"
 
 # TODO: this currently doesn’t quote the completed argument
 complete -c fuzzel -x -s T -l terminal           -a 
"(__fish_complete_subcommand)"                              -d "terminal 
command, with arguments ($TERMINAL -e)"
@@ -37,6 +38,7 @@
 complete -c fuzzel -x -s C -l border-color                                     
                                 -d "border color (002b36ff)"
 complete -c fuzzel         -l show-actions                                     
                                 -d "include desktop actions (e.g. \"New 
Window\") in the list"
 complete -c fuzzel         -l no-fuzzy                                         
                                 -d "disable fuzzy matching"
+complete -c fuzzel         -l filter-desktop                                   
                                 -d "filter desktop entries based on 
XDG_CURRENT_DESKTOP"
 complete -c fuzzel -x      -l fuzzy-min-length                                 
                                 -d "search strings shorter than this will not 
be fuzzy matched"
 complete -c fuzzel -x      -l fuzzy-max-length-discrepancy                     
                                 -d "maximum allowed length difference between 
the search string and a fuzzy match (2)"
 complete -c fuzzel -x      -l fuzzy-max-distance                               
                                 -d "maximum allowed levenshtein distance 
between the search string and a fuzzy match (1)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/completions/zsh/_fuzzel 
new/fuzzel/completions/zsh/_fuzzel
--- old/fuzzel/completions/zsh/_fuzzel  2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/completions/zsh/_fuzzel  2023-07-14 08:49:46.000000000 +0200
@@ -12,6 +12,7 @@
     '(-I --no-icons)'{-I,--no-icons}'[do not render any icons]' \
     '(-F --fields)'{-F,--fields}'[comma separated list of XDG Desktop entry 
fields to match ]:fields:->fields' \
     '(-p --prompt)'{-p,--prompt}'[string to use as input prompt ("> ")]:()' \
+    '--password[render all input using either "*", or the specified 
character]:()' \
     '(-T --terminal)'{-T,--terminal}'[terminal command, with arguments 
($TERMINAL -e)]:terminal:_command_names -e' \
     '(-l --lines)'{-l,--lines}'[maximum number of matches to display (15)]:()' 
\
     '(-w --width)'{-w,--width}'[window width, in characters (30)]:()' \
@@ -29,6 +30,7 @@
     '(-C --border-color)'{-C,--border-color}'[border color 
(002b36ff)]:border-color:()' \
     '--show-actions[include desktop actions (e.g "New Window") in the list]' \
     '--no-fuzzy[disable fuzzy matching]' \
+    '--filter-desktop=-[filter desktop entries based on XDG_CURRENT_DESKTOP]: 
:(no)' \
     '--fuzzy-min-length[search strings shorter than this will not be fuzzy 
matched (3)]:()' \
     '--fuzzy-max-length-discrepancy[maximum allowed length difference between 
the search string and a fuzzy match (2)]:()' \
     '--fuzzy-max-distance[maximum allowed levenshtein distance between the 
search string and a fuzzy match (1)]:()' \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/config.c new/fuzzel/config.c
--- old/fuzzel/config.c 2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/config.c 2023-07-14 08:49:46.000000000 +0200
@@ -31,7 +31,7 @@
     [BIND_ACTION_CURSOR_LEFT] = "cursor-left",
     [BIND_ACTION_CURSOR_LEFT_WORD] = "cursor-left-word",
     [BIND_ACTION_CURSOR_RIGHT] = "cursor-right",
-    [BIND_ACTION_CURSOR_RIGHT_WORD] = "cursor-right_word",
+    [BIND_ACTION_CURSOR_RIGHT_WORD] = "cursor-right-word",
     [BIND_ACTION_DELETE_PREV] = "delete-prev",
     [BIND_ACTION_DELETE_PREV_WORD] = "delete-prev-word",
     [BIND_ACTION_DELETE_NEXT] = "delete-next",
@@ -755,11 +755,14 @@
             return false;
         }
 
-        conf->password = password_chars[0];
+        conf->password_mode.character = password_chars[0];
         free(password_chars);
         return true;
     }
 
+    else if (strcmp(key, "filter-desktop") == 0)
+        return value_to_bool(ctx, &conf->filter_desktop);
+
     else if (strcmp(key, "fuzzy") == 0)
         return value_to_bool(ctx, &conf->fuzzy.enabled);
 
@@ -1387,8 +1390,11 @@
     *conf = (struct config) {
         .output = NULL,
         .prompt = c32dup(U"> "),
-        .password = U'\0',
         .match_fields = MATCH_FILENAME | MATCH_NAME | MATCH_GENERIC,
+        .password_mode = {
+            .character = U'\0',
+            .enabled = false,
+        },
         .terminal = NULL,
         .launch_prefix = NULL,
         .font = strdup("monospace"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/config.h new/fuzzel/config.h
--- old/fuzzel/config.h 2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/config.h 2023-07-14 08:49:46.000000000 +0200
@@ -73,15 +73,21 @@
 struct config {
     char *output;
     char32_t *prompt;
-    char32_t password;
     enum match_fields match_fields;
 
+    struct {
+        char32_t character;
+        bool enabled;
+    } password_mode;
+
     char *terminal;
     char *launch_prefix;
 
     char *font;
     enum dpi_aware dpi_aware;
 
+    bool filter_desktop;
+
     bool icons_enabled;
     char *icon_theme;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/doc/fuzzel.1.scd new/fuzzel/doc/fuzzel.1.scd
--- old/fuzzel/doc/fuzzel.1.scd 2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/doc/fuzzel.1.scd 2023-07-14 08:49:46.000000000 +0200
@@ -158,8 +158,8 @@
        scaling). Default: _1_.
 
 *-r*,*--border-radius*=_INT_
-       The corner curvature. Larger means more rounded corners.
-       0 disables rounded corners. Default: _10_.
+       The corner curvature, subject to output scaling. Larger means more
+       rounded corners. 0 disables rounded corners. Default: _10_.
 
 *-C*,*--border-color*=_HEX_
        The color of the border. See *COLORS*. Default: _002b36ff_.
@@ -169,6 +169,11 @@
        alternative actions some desktop entries have. Examples include
        "New Window", "New Document", etc.
 
+*--filter-desktop*=[_no_]
+       Filter the visible desktop entries based on the value of
+       XDG_CURRENT_DESKTOP. If the optional parameter is "no",
+       explicitly disables filtering.
+
 *--no-fuzzy*
        Disables fuzzy matching. When disabled, only exact (case
        insensitive) substring matches are considered.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/doc/fuzzel.ini.5.scd 
new/fuzzel/doc/fuzzel.ini.5.scd
--- old/fuzzel/doc/fuzzel.ini.5.scd     2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/doc/fuzzel.ini.5.scd     2023-07-14 08:49:46.000000000 +0200
@@ -82,7 +82,8 @@
        Default: _auto_.
 
 *prompt*=
-       String to use as input prompt. Default: _> _.
+       String to use as input prompt. Note that trailing spaces are
+       trimmed, unless the string is quoted. Default: _"> "_.
 
 *icon-theme*
        Icon theme. Note that the name is case sensitive. Default:
@@ -116,6 +117,9 @@
        line, by explicitly specifying the character with
        *--password=X*. Default: _\*_.
 
+*filter-desktop*
+       Boolean. Filter desktop files based on the value of XDG_CURRENT_DESKTOP.
+
 *fuzzy*
        Boolean. Enables or disables fuzzy matching. Default: _yes_.
 
@@ -192,7 +196,7 @@
        behavior, for example.
        
        Default: _yes_
-l
+
 # SECTION: colors
 
 All color values are in RGBA.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/fuzzel.ini new/fuzzel/fuzzel.ini
--- old/fuzzel/fuzzel.ini       2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/fuzzel.ini       2023-07-14 08:49:46.000000000 +0200
@@ -6,6 +6,7 @@
 # icons-enabled=yes
 # fields=filename,name,generic
 # password-character=*
+# filter-desktop=no
 # fuzzy=yes
 # show-actions=no
 # terminal=$TERMINAL -e  # Note: you cannot actually use environment variables 
here
@@ -54,12 +55,12 @@
 # cursor-end=End Control+e
 # delete-prev=BackSpace
 # delete-prev-word=Mod1+BackSpace Control+BackSpace
-# delete-next=Delete
-# delete-next-word=Mod1+d Control+Delete
+# delete-next=Delete KP_Delete Control+d
+# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
 # delete-line=Control+k
 # prev=Up Control+p
 # prev-with-wrap=ISO_Left_Tab
-# prev-page=PageUp KP_PageUp
+# prev-page=Page_Up KP_Page_Up
 # next=Down Control+n
 # next-with-wrap=none
 # next-page=Page_Down KP_Page_Down
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/main.c new/fuzzel/main.c
--- old/fuzzel/main.c   2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/main.c   2023-07-14 08:49:46.000000000 +0200
@@ -419,13 +419,31 @@
     bool dmenu_enabled = conf->dmenu.enabled;
     bool icons_enabled = conf->icons_enabled;
     char dmenu_delim = conf->dmenu.delim;
+    bool filter_desktop = conf->filter_desktop;
+    char_list_t desktops = tll_init();
+    char *saveptr = NULL;
+
+    if (filter_desktop) {
+        char *xdg_current_desktop = getenv("XDG_CURRENT_DESKTOP");
+        if (xdg_current_desktop && strlen(xdg_current_desktop) != 0) {
+            xdg_current_desktop = strdup(xdg_current_desktop);
+            for (char *desktop = strtok_r(xdg_current_desktop, ":", &saveptr);
+                 desktop != NULL;
+                 desktop = strtok_r(NULL, ":", &saveptr))
+                {
+                    tll_push_back(desktops, strdup(desktop));
+                }
+            free(xdg_current_desktop);
+        }
+    }
 
     if (dmenu_enabled)
         dmenu_load_entries(apps, dmenu_delim, ctx->dmenu_abort_fd);
     else {
-        xdg_find_programs(terminal, actions_enabled, apps);
+        xdg_find_programs(terminal, actions_enabled, filter_desktop, 
&desktops, apps);
         read_cache(apps);
     }
+    tll_free_and_free(desktops, free);
 
     int r = send_event(ctx->event_fd, EVENT_APPS_LOADED);
     if (r != 0)
@@ -522,6 +540,7 @@
     #define OPT_NO_EXIT_ON_KB_LOSS           271
     #define OPT_TABS                         272
     #define OPT_DMENU_NULL                   273
+    #define OPT_FILTER_DESKTOP               274
 
     static const struct option longopts[] = {
         {"config",               required_argument, 0,  OPT_CONFIG},
@@ -550,6 +569,7 @@
         {"prompt",               required_argument, 0, 'p'},
         {"terminal",             required_argument, 0, 'T'},
         {"show-actions",         no_argument,       0, OPT_SHOW_ACTIONS},
+        {"filter-desktop",       optional_argument, 0, OPT_FILTER_DESKTOP},
         {"no-fuzzy",             no_argument,       0, OPT_NO_FUZZY},
         {"fuzzy-min-length",     required_argument, 0, OPT_FUZZY_MIN_LENGTH},
         {"fuzzy-max-length-discrepancy", required_argument, 0, 
OPT_FUZZY_MAX_LENGTH_DISCREPANCY},
@@ -602,6 +622,7 @@
         bool border_size_set:1;
         bool border_radius_set:1;
         bool actions_enabled_set:1;
+        bool filter_desktop_set:1;
         bool fuzzy_set:1;
         bool fuzzy_min_length_set:1;
         bool fuzzy_max_length_discrepancy_set:1;
@@ -736,7 +757,7 @@
         }
 
         case OPT_PASSWORD: {
-            char32_t password_char = U'*';
+            char32_t password_char = U'\0';
             if (optarg != NULL) {
                 char32_t *wide_optarg = ambstoc32(optarg);
                 if (c32len(wide_optarg) != 1) {
@@ -750,7 +771,8 @@
                 password_char = wide_optarg[0];
                 free(wide_optarg);
             }
-            cmdline_overrides.conf.password = password_char;
+            cmdline_overrides.conf.password_mode.enabled = true;
+            cmdline_overrides.conf.password_mode.character = password_char;
             break;
         }
 
@@ -969,6 +991,18 @@
             cmdline_overrides.conf.actions_enabled = true;
             break;
 
+        case OPT_FILTER_DESKTOP:
+            cmdline_overrides.filter_desktop_set = true;
+            if (optarg != NULL && strcasecmp(optarg, "no") == 0)
+                cmdline_overrides.conf.filter_desktop = false;
+            else if (optarg != NULL) {
+                fprintf(stderr, "%s: invalid filter-desktop option\n", optarg);
+                return EXIT_FAILURE;
+            }
+            else
+                cmdline_overrides.conf.filter_desktop = true;
+            break;
+
         case OPT_NO_FUZZY:
             cmdline_overrides.conf.fuzzy.enabled = false;
             cmdline_overrides.fuzzy_set = true;
@@ -1107,11 +1141,11 @@
             return EXIT_SUCCESS;
 
         case ':':
-            fprintf(stderr, "error: -%c: missing required argument\n", optopt);
+            fprintf(stderr, "error: %s: missing required argument\n", 
argv[optind-1]);
             return EXIT_FAILURE;
 
         case '?':
-            fprintf(stderr, "error: -%c: invalid option\n", optopt);
+            fprintf(stderr, "error: %s: invalid option\n", argv[optind-1]);
             return EXIT_FAILURE;
         }
     }
@@ -1137,8 +1171,15 @@
         free(conf.prompt);
         conf.prompt = cmdline_overrides.conf.prompt;
     }
-    if (cmdline_overrides.conf.password != U'\0')
-        conf.password = cmdline_overrides.conf.password;
+    if (cmdline_overrides.conf.password_mode.enabled) {
+        conf.password_mode.enabled = true;
+        conf.password_mode.character =
+            cmdline_overrides.conf.password_mode.character != U'\0'
+            ? cmdline_overrides.conf.password_mode.character
+            : conf.password_mode.character != U'\0'
+            ? conf.password_mode.character
+            : U'*';
+    }
     if (cmdline_overrides.conf.terminal != NULL) {
         free(conf.terminal);
         conf.terminal = strdup(cmdline_overrides.conf.terminal);
@@ -1198,6 +1239,8 @@
                  cmdline_overrides.conf.border.radius);
 #endif
     }
+    if (cmdline_overrides.filter_desktop_set)
+        conf.filter_desktop = cmdline_overrides.conf.filter_desktop;
     if (cmdline_overrides.actions_enabled_set)
         conf.actions_enabled = cmdline_overrides.conf.actions_enabled;
     if (cmdline_overrides.fuzzy_set)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/match.c new/fuzzel/match.c
--- old/fuzzel/match.c  2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/match.c  2023-07-14 08:49:46.000000000 +0200
@@ -1,6 +1,7 @@
 #include "match.h"
 
 #include <stdlib.h>
+#include <string.h>
 #include <wctype.h>
 #include <assert.h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/meson.build new/fuzzel/meson.build
--- old/fuzzel/meson.build      2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/meson.build      2023-07-14 08:49:46.000000000 +0200
@@ -1,5 +1,5 @@
 project('fuzzel', 'c',
-        version: '1.9.1',
+        version: '1.9.2',
         license: 'MIT',
         meson_version: '>=0.58.0',
         default_options: [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/render.c new/fuzzel/render.c
--- old/fuzzel/render.c 2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/render.c 2023-07-14 08:49:46.000000000 +0200
@@ -125,7 +125,7 @@
         const double h = max(buf->height - 2 * b, 0.);
 
         const double from_degree = M_PI / 180;
-        const double radius = render->conf->border.radius;
+        const double radius = render->conf->border.radius * render->scale;
 
         /* Path describing an arc:ed rectangle */
         cairo_new_path(buf->cairo);
@@ -157,7 +157,8 @@
 }
 
 static void
-render_glyph(pixman_image_t *pix, const struct fcft_glyph *glyph, int x, int 
y, const pixman_color_t *color)
+render_glyph(pixman_image_t *pix, const struct fcft_glyph *glyph, int x, int y,
+             const pixman_color_t *color)
 {
     if (pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8) {
         /* Glyph surface is a pre-rendered image (typically a color emoji...) 
*/
@@ -197,7 +198,8 @@
         ? render->subpixel : FCFT_SUBPIXEL_NONE;
 
     int x = render->border_size + render->x_margin;
-    int y = render->border_size + render->y_margin + font->ascent;
+    int y = render->border_size + render->y_margin +
+        (render->row_height + font->height) / 2 - font->descent;
 
     if (fcft_capabilities() & FCFT_CAPABILITY_TEXT_RUN_SHAPING) {
         struct fcft_text_run *run = fcft_rasterize_text_run_utf32(
@@ -231,8 +233,8 @@
     for (size_t i = 0; i < prompt_len + text_len; i++) {
         char32_t wc = i < prompt_len
             ? pprompt[i]
-            : (conf->password != 0
-               ? conf->password
+            : (conf->password_mode.enabled
+               ? conf->password_mode.character
                : ptext[i - prompt_len]);
 
         const struct fcft_glyph *glyph = fcft_rasterize_char_utf32(
@@ -621,12 +623,6 @@
     bool render_icons = mtx_trylock(render->icon_lock) == thrd_success;
 
     for (size_t i = 0; i < match_count; i++) {
-        if (y + font->descent > buf->height - y_margin - border_size) {
-            /* Window too small - happens if the compositor doesn't
-             * respect our requested size */
-            break;
-        }
-
         const struct match *match = matches_get(matches, i);
 
         if (i == selected) {
@@ -666,7 +662,7 @@
         double max_x = buf->width - border_size - x_margin;
 
 #if 0 /* Render the icon+text bounding box */
-        pixman_color_t sc = rgba2pixman(render->conf->match_color);
+        pixman_color_t sc = rgba2pixman(render->conf->colors.match);
         pixman_image_fill_rectangles(
             PIXMAN_OP_SRC, buf->pix, &sc, 1,
             &(pixman_rectangle16_t){
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/xdg.c new/fuzzel/xdg.c
--- old/fuzzel/xdg.c    2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/xdg.c    2023-07-14 08:49:46.000000000 +0200
@@ -30,9 +30,58 @@
     char *lang;
 };
 
+struct action {
+    char32_t *name;
+    char32_t *generic_name;
+    char *app_id;
+    char32_t *comment;
+    char32_list_t keywords;
+    char32_list_t categories;
+    char_list_t onlyshowin;
+    char_list_t notshowin;
+
+    int name_locale_score;
+    int generic_name_locale_score;
+    int comment_locale_score;
+    int keywords_locale_score;
+    int categories_locale_score;
+
+    char *icon;
+    char *exec;
+    char32_t *wexec;
+
+    char *path;
+    bool visible;
+    bool use_terminal;
+};
+
+static bool
+filter_desktop_entry(const struct action *act, const char_list_t *desktops)
+{
+    /* If a matching entry is found in OnlyShowIn then the desktop file is
+     * shown. If an entry is found in NotShowIn then the desktop file is not
+     * shown. */
+    tll_foreach(*desktops, current) {
+        tll_foreach(act->onlyshowin, desktop) {
+            if (strcmp(current->item, desktop->item) == 0)
+                return true;
+        }
+
+        tll_foreach(act->notshowin, desktop) {
+            if (strcmp(current->item, desktop->item) == 0)
+                return false;
+        }
+    }
+
+    /* By default, a desktop file should be shown, unless an OnlyShowIn key is
+     * present, in which case, the default is for the file not to be shown. */
+    return tll_length(act->onlyshowin) == 0;
+}
+
 static void
 parse_desktop_file(int fd, char *id, const char32_t *file_basename,
                    const char *terminal, bool include_actions,
+                   bool filter_desktops, char_list_t *desktops,
                    const struct locale_variants *lc_messages,
                    application_llist_t *applications)
 {
@@ -44,29 +93,6 @@
 
     tll(char *) action_names = tll_init();
 
-    struct action {
-        char32_t *name;
-        char32_t *generic_name;
-        char *app_id;
-        char32_t *comment;
-        char32_list_t keywords;
-        char32_list_t categories;
-
-        int name_locale_score;
-        int generic_name_locale_score;
-        int comment_lcoale_score;
-        int keywords_locale_score;
-        int categories_locale_score;
-
-        char *icon;
-        char *exec;
-        char32_t *wexec;
-
-        char *path;
-        bool visible;
-        bool use_terminal;
-    };
-
     tll(struct action) actions = tll_init();
     tll_push_back(actions, ((struct action){.visible = true}));
     struct action *action = &tll_back(actions);
@@ -153,8 +179,9 @@
             }
         }
 
-        char *key = strtok(line, "=");
-        char *value = strtok(NULL, "\n");
+        char *ctx;
+        char *key = strtok_r(line, "=", &ctx);
+        char *value = strtok_r(NULL, "\n", &ctx);
         int locale_score = 1;  /* Default, locale not specified in key */
 
         if (key != NULL && value != NULL) {
@@ -228,18 +255,18 @@
             }
 
             else if (strcmp(key, "Comment") == 0) {
-                if (locale_score > action->comment_lcoale_score) {
+                if (locale_score > action->comment_locale_score) {
                     free(action->comment);
                     action->comment = ambstoc32(value);
-                    action->comment_lcoale_score = locale_score;
+                    action->comment_locale_score = locale_score;
                 }
             }
 
             else if (strcmp(key, "Keywords") == 0) {
                 if (locale_score > action->keywords_locale_score) {
-                    for (const char *kw = strtok(value, ";");
+                    for (const char *kw = strtok_r(value, ";", &ctx);
                          kw != NULL;
-                         kw = strtok(NULL, ";"))
+                         kw = strtok_r(NULL, ";", &ctx))
                     {
                         char32_t *wide_kw = ambstoc32(kw);
                         if (wide_kw != NULL)
@@ -252,9 +279,9 @@
 
             else if (strcmp(key, "Categories") == 0) {
                 if (locale_score > action->categories_locale_score) {
-                    for (const char *category = strtok(value, ";");
+                    for (const char *category = strtok_r(value, ";", &ctx);
                          category != NULL;
-                         category = strtok(NULL, ";"))
+                         category = strtok_r(NULL, ";", &ctx))
                     {
                         char32_t *wide_category = ambstoc32(category);
                         if (wide_category != NULL)
@@ -266,14 +293,32 @@
             }
 
             else if (strcmp(key, "Actions") == 0) {
-                for (const char *action = strtok(value, ";");
+                for (const char *action = strtok_r(value, ";", &ctx);
                      action != NULL;
-                     action = strtok(NULL, ";"))
+                     action = strtok_r(NULL, ";", &ctx))
                 {
                     tll_push_back(action_names, strdup(action));
                 }
             }
 
+            else if (strcmp(key, "OnlyShowIn") == 0) {
+                for (const char *desktop = strtok_r(value, ";", &ctx);
+                     desktop != NULL;
+                     desktop = strtok_r(NULL, ";", &ctx))
+                {
+                    tll_push_back(action->onlyshowin, strdup(desktop));
+                }
+            }
+
+            else if (strcmp(key, "NotShowIn") == 0) {
+                for (const char *desktop = strtok_r(value, ";", &ctx);
+                     desktop != NULL;
+                     desktop = strtok_r(NULL, ";", &ctx))
+                {
+                    tll_push_back(action->notshowin, strdup(desktop));
+                }
+            }
+
             else if (strcmp(key, "Icon") == 0) {
                 free(action->icon);
                 action->icon = strdup(value);
@@ -291,7 +336,6 @@
                     action->use_terminal = true;
             }
         }
-
         free(line);
     }
 
@@ -315,6 +359,8 @@
 
             tll_free_and_free(a->keywords, free);
             tll_free_and_free(a->categories, free);
+            tll_free_and_free(a->onlyshowin, free);
+            tll_free_and_free(a->notshowin, free);
 
             continue;
         }
@@ -358,7 +404,7 @@
                 .keywords = a->keywords,
                 .categories = a->categories,
                 .icon = {.name = a->icon},
-                .visible = a->visible,
+                .visible = a->visible && (!filter_desktops || 
filter_desktop_entry(a, desktops)),
                 .count = 0}));
     }
 
@@ -385,6 +431,7 @@
 
 static void
 scan_dir(int base_fd, const char *terminal, bool include_actions,
+         bool filter_desktop, char_list_t *desktops,
          application_llist_t *applications, const char *base_id)
 {
     DIR *d = fdopendir(base_fd);
@@ -445,6 +492,7 @@
                 lc_messages.lang_modifier, lc_messages.lang_country_modifier);
     }
 
+
     for (const struct dirent *e = readdir(d); e != NULL; e = readdir(d)) {
         if (strcmp(e->d_name, ".") == 0 || strcmp(e->d_name, "..") == 0)
             continue;
@@ -464,6 +512,7 @@
 
             char *nested_base_id = new_id(base_id, e->d_name);
             scan_dir(dir_fd, terminal, include_actions,
+                     filter_desktop, desktops,
                      applications, nested_base_id);
             free(nested_base_id);
             close(dir_fd);
@@ -512,6 +561,7 @@
                 if (!already_added) {
                     parse_desktop_file(
                         fd, id, wfile_basename, terminal, include_actions,
+                        filter_desktop, desktops,
                         &lc_messages, applications);
                 } else
                     free(id);
@@ -537,6 +587,7 @@
 
 void
 xdg_find_programs(const char *terminal, bool include_actions,
+                  bool filter_desktop, char_list_t *desktops,
                   struct application_list *applications)
 {
     application_llist_t apps = tll_init();
@@ -548,7 +599,7 @@
 
         int fd = open(path, O_RDONLY);
         if (fd != -1) {
-            scan_dir(fd, terminal, include_actions, &apps, NULL);
+            scan_dir(fd, terminal, include_actions, filter_desktop, desktops, 
&apps, NULL);
             close(fd);
         }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fuzzel/xdg.h new/fuzzel/xdg.h
--- old/fuzzel/xdg.h    2023-03-30 15:52:59.000000000 +0200
+++ new/fuzzel/xdg.h    2023-07-14 08:49:46.000000000 +0200
@@ -18,4 +18,5 @@
 
 void xdg_find_programs(
     const char *terminal, bool include_actions,
+    bool filter_desktop, char_list_t *desktops,
     struct application_list *applications);

Reply via email to