Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jgmenu for openSUSE:Factory checked in at 2026-08-11 17:12:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jgmenu (Old) and /work/SRC/openSUSE:Factory/.jgmenu.new.17972 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jgmenu" Tue Aug 11 17:12:44 2026 rev:22 rq:1370480 version:4.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/jgmenu/jgmenu.changes 2024-12-16 19:18:10.809061128 +0100 +++ /work/SRC/openSUSE:Factory/.jgmenu.new.17972/jgmenu.changes 2026-08-11 17:13:50.481670863 +0200 @@ -1,0 +2,15 @@ +Mon Aug 10 07:07:40 UTC 2026 - Michael Vetter <[email protected]> + +- Update to 4.6.0: + * Validate .desktop filename better by checking that the filename ends with + ".desktop" rather than just contains ".desktop" #251 + * Add search_markup config option #258 + * Add keybinds listed below #254 + + Ctrl+n and Ctrl+p to select next/previous item + + Ctrl+c and Ctrl+[ to abort + + Ctrl+u as an alternative to Escape + + Ctrl+w to delete last word + * jgmenu: add --override command-line option to override config file options #247 + * jgmenu-ob: support xml !ENTITY definitions #236 + +------------------------------------------------------------------- Old: ---- v4.5.0.tar.gz New: ---- v4.6.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jgmenu.spec ++++++ --- /var/tmp/diff_new_pack.Wt6bgp/_old 2026-08-11 17:13:51.641720002 +0200 +++ /var/tmp/diff_new_pack.Wt6bgp/_new 2026-08-11 17:13:51.641720002 +0200 @@ -1,7 +1,7 @@ # # spec file for package jgmenu # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # 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: jgmenu -Version: 4.5.0 +Version: 4.6.0 Release: 0 Summary: Small X11 menu intended to be used with openbox and tint2 License: GPL-2.0-only @@ -49,6 +49,7 @@ %build %configure make %{?_smp_mflags} prefix=%{_prefix} +sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/python/' src/jgmenu-unity-hack.py %install make %{?_smp_mflags} prefix=%{_prefix} DESTDIR=%{buildroot} install ++++++ v4.5.0.tar.gz -> v4.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/.github/workflows/build.yml new/jgmenu-4.6.0/.github/workflows/build.yml --- old/jgmenu-4.5.0/.github/workflows/build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/jgmenu-4.6.0/.github/workflows/build.yml 2026-08-07 20:18:13.000000000 +0200 @@ -0,0 +1,74 @@ +name: CI + +on: + pull_request: + paths: + - 'Makefile' + - 'Makefile.inc' + - 'src/**' + - 'scripts/**' + - '.github/workflows/**' + +jobs: + codestyle: + name: CodeStyleCheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Code Style + run: | + ./scripts/check -a + build: + name: Build + needs: codestyle + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + name: [ + Arch, + ] + include: + - name: Arch + os: ubuntu-latest + container: archlinux:base-devel + env: + TARGET: 'sh -xe' + + env: ${{ matrix.env }} + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + + steps: + - uses: actions/checkout@v1 + + - name: Install Arch Linux dependencies + if: matrix.name == 'Arch' + run: | + pacman-key --init + pacman -Syu --noconfirm + pacman -S --noconfirm git make gcc clang \ + cairo pango libxml2 librsvg \ + libx11 libxrandr menu-cache python gdb + + # These builds are executed on all runners + - name: Build with gcc + run: | + echo ' + cd "$GITHUB_WORKSPACE" + export CC=gcc + ./configure + make + make test + ' | $TARGET + + - name: Build with clang + run: | + echo ' + cd "$GITHUB_WORKSPACE" + export CC=clang + ./configure + make + make test + ' | $TARGET + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/Makefile new/jgmenu-4.6.0/Makefile --- old/jgmenu-4.5.0/Makefile 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/Makefile 2026-08-07 20:18:13.000000000 +0200 @@ -14,15 +14,15 @@ include Makefile.inc jgmenu: CFLAGS += `pkg-config cairo pango pangocairo $(RSVG_LIB) --cflags` $(RSVG_FLAGS) -jgmenu-ob: CFLAGS += `xml2-config --cflags` -jgmenu-obtheme: CFLAGS += `xml2-config --cflags` +jgmenu-ob: CFLAGS += `pkg-config --cflags libxml-2.0` +jgmenu-obtheme: CFLAGS += `pkg-config --cflags libxml-2.0` jgmenu-config: CFLAGS += `pkg-config --cflags glib-2.0` jgmenu-apps: CFLAGS += `pkg-config --cflags glib-2.0` jgmenu: LIBS += `pkg-config x11 xrandr cairo pango pangocairo $(RSVG_LIB) --libs` $(RSVG_FLAGS) jgmenu: LIBS += -pthread -lpng -jgmenu-ob: LIBS += `xml2-config --libs` -jgmenu-obtheme: LIBS += `xml2-config --libs` +jgmenu-ob: LIBS += `pkg-config --libs libxml-2.0` +jgmenu-obtheme: LIBS += `pkg-config --libs libxml-2.0` jgmenu-config: LIBS += `pkg-config --libs glib-2.0` jgmenu-apps: LIBS += `pkg-config --libs glib-2.0` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/NEWS.md new/jgmenu-4.6.0/NEWS.md --- old/jgmenu-4.5.0/NEWS.md 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/NEWS.md 2026-08-07 20:18:13.000000000 +0200 @@ -8,6 +8,7 @@ | Date | Release Notes | |------------|-----------------------------------| +| 2026-08-07 | [v4.6.0](docs/relnotes/4.6.0.txt) | | 2024-12-06 | [v4.5.0](docs/relnotes/4.5.0.txt) | | 2022-10-30 | [v4.4.1](docs/relnotes/4.4.1.txt) | | 2021-09-16 | [v4.4.0](docs/relnotes/4.4.0.txt) | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/configure new/jgmenu-4.6.0/configure --- old/jgmenu-4.5.0/configure 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/configure 2026-08-07 20:18:13.000000000 +0200 @@ -50,7 +50,7 @@ } check_core_dependencies () { - for b in "pkg-config" "xml2-config"; do + for b in "pkg-config"; do check_bin "$b" done for l in "x11" "xrandr" "cairo" "pango" "pangocairo" "glib-2.0"; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/contrib/zsh/_jgmenu new/jgmenu-4.6.0/contrib/zsh/_jgmenu --- old/jgmenu-4.5.0/contrib/zsh/_jgmenu 1970-01-01 01:00:00.000000000 +0100 +++ new/jgmenu-4.6.0/contrib/zsh/_jgmenu 2026-08-07 20:18:13.000000000 +0200 @@ -0,0 +1,27 @@ +#compdef jgmenu + +function _jgmenu() { + local integer ret=1 + + _arguments -s \ + '(--no-spawn)--no-spawn[Redirect command to stdout rather than execute it]' \ + '(--at-pointer)--at-pointer[Launch menu at mouse pointer]' \ + '(--hide-on-startup)--hide-on-startup[Start menu is hidden state]' \ + '(--simple)--simple[Ignore tint2 settings; Run in short-lived mode (i.e. exit after mouse click or enter/escape); read menu items from stdin]' \ + '(--vsimple)--vsimple[Same as --simple, but also disables icons and ignores jgmenurc]' \ + '(--die-when-loaded)--die-when-loaded[Open menu and then exit(0). Useful for debugging and testing]' \ + '(--center)--center[Center align menu horizontally and vertically]' \ + '(--persistent)--persistent[Same as the persistent config option. See config option section below for details]' \ + \ + '(--checkout)--checkout=[Checkout submenu on startup]' \ + '(--config-file)--config-file=[Read config file]:file:_files' \ + '(--icon-size)--icon-size=[Specify icon size (22 by default). If set to 0, icons will not be loaded]:number' \ + '(--csv-file)--csv-file=[Specify menu file (in jgmenu flavoured CSV format). If file cannot be opened, input is reverted to stdin]:file:_files' \ + '(--csv-cmd)--csv-cmd=[Specify command to produce menu data, for example jgmenu_run pmenu]' \ + \ + '(--version)--version[Print version]' \ + '(--help)--help[Print help]' \ + && ret=0 + + return $ret +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/data/jgmenu.desktop new/jgmenu-4.6.0/data/jgmenu.desktop --- old/jgmenu-4.5.0/data/jgmenu.desktop 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/data/jgmenu.desktop 2026-08-07 20:18:13.000000000 +0200 @@ -3,9 +3,11 @@ Encoding=UTF-8 Name=jgmenu GenericName=Application Menu +GenericName[pt]=Menu de aplicações GenericName[ru]=Меню приложений GenericName[sv]=Program Meny Comment=Displays menu for launching installed applications +Comment[pt]=Mostra o menu para lançar as aplicações instaladas Comment[ru]=Отображает меню для запуска установленных приложений Comment[sv]=Visar meny för installerade program Exec=jgmenu_run diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/data/schema new/jgmenu-4.6.0/data/schema --- old/jgmenu-4.5.0/data/schema 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/data/schema 2026-08-07 20:18:13.000000000 +0200 @@ -1,53 +1,64 @@ Name=Accessories +Name[pt]=Acessórios Name[sv]=Tillbehör Icon=applications-accessories Categories=Accessibility;Core;Utility; Name=Development +Name[pt]=Desenvolvimento Name[sv]=Utveckling Icon=applications-development Categories=Development; Name=Education +Name[pt]=Educação Name[sv]=Utbildning Icon=applications-science Categories=Education; Name=Games +Name[pt]=Jogos Name[sv]=Spel Icon=applications-games Categories=Game; Name=Graphics +Name[pt]=Gráficos Name[sv]=Grafik Icon=applications-graphics Categories=Graphics; Name=Multimedia +Name[pt]=Multimédia Name[sv]=Multimedia Icon=applications-multimedia Categories=Audio;Video;AudioVideo; Name=Internet +Name[pt]=Internet Name[sv]=Internet Icon=applications-internet Categories=Network; Name=Office +Name[pt]=Produtividade Name[sv]=Kontorsprogram Icon=applications-office Categories=Office; Name=Other +Name[pt]=Outros Name[sv]=Övrigt Icon=applications-other Name=Settings +Name[pt]=Definições Name[sv]=Inställningar Icon=preferences-desktop Categories=Settings;Screensaver; Name=System +Name[pt]=Sistema Name[sv]=System Icon=applications-system Categories=Emulator;System; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/docs/manual/jgmenu.1.md new/jgmenu-4.6.0/docs/manual/jgmenu.1.md --- old/jgmenu-4.5.0/docs/manual/jgmenu.1.md 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/docs/manual/jgmenu.1.md 2026-08-07 20:18:13.000000000 +0200 @@ -12,7 +12,7 @@ \[\--icon-size=<*size*>] \[\--at-pointer] \[\--hide-on-startup] \[\--simple] \[\--vsimple] \[\--csv-file=<*file*>] \[\--csv-cmd=<*command*>] \[\--die-when-loaded] - \[\--center] \[\--persistent] + \[\--center] \[\--persistent] \[\--override=<*option*>=<*val*>] Use these commands to get started @@ -231,13 +231,17 @@ : Same as the persistent config option. See config option section below for details. +`--override=<option>=<value>` + +: Override any option from the config file. Can be used multiple times. + # USER INTERFACE -`Up`, `Down` +`Up`, `Down`, `Ctrl+p`, `Ctrl+n` : Select previous/next item -`Left`. `Right` +`Left`, `Right` : Move to parent/sub menu @@ -269,10 +273,22 @@ : exit(0) +`Escape`, `Ctrl+c`, `Ctrl+[` + +: Clear filter and then hide or exit jgmenu + `Backspace` : Return to parent menu +`Ctrl+w` + +: Backward erase word + +`Ctrl+u` + +: Backward erase line + Type any string to invoke a search. Words separated by space will be searched for using `OR` logic (i.e. the match of either word is sufficient to display an item). @@ -432,7 +448,7 @@ careful!). If left blank, jgmenu will read from `stdin`. Examples: csv_cmd = lx - csv_cmd = jgmenu_run lx --no-dirs + csv_cmd = JGMENU_NO_DIRS=1 jgmenu_run lx csv_cmd = cat ~/mymenu.csv `tint2_look` = __boolean__ (default 0) @@ -671,6 +687,10 @@ sep_markup = font="Sans Italic 12" foreground="blue" +`search_markup` = __string__ (unset by default) + +: Same as `sep_markup` but applies to the `search` widget. + `font` = __string__ (unset by default) : Font description for menu items. `font` accepts a string such as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/docs/relnotes/4.6.0.txt new/jgmenu-4.6.0/docs/relnotes/4.6.0.txt --- old/jgmenu-4.5.0/docs/relnotes/4.6.0.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/jgmenu-4.6.0/docs/relnotes/4.6.0.txt 2026-08-07 20:18:13.000000000 +0200 @@ -0,0 +1,21 @@ +jgmenu v4.6.0 release notes +=========================== + +Updates since v4.5.0 +-------------------- + + * Validate .desktop filename better by checking that the filename ends with + ".desktop" rather than just contains ".desktop" @johanmalm #251 + + * Add search_markup config option @cdlscpmv #258 + + * Add keybinds listed below @elig0n #254 + * Ctrl+n and Ctrl+p to select next/previous item + * Ctrl+c and Ctrl+[ to abort + * Ctrl+u as an alternative to Escape + * Ctrl+w to delete last word + + * jgmenu: add --override command-line option to override config file + options. @cdlscpmv #247 + + * jgmenu-ob: support xml !ENTITY definitions @johanmalm #236 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/scripts/checkpatch.pl new/jgmenu-4.6.0/scripts/checkpatch.pl --- old/jgmenu-4.5.0/scripts/checkpatch.pl 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/scripts/checkpatch.pl 2026-08-07 20:18:13.000000000 +0200 @@ -41,7 +41,10 @@ my %use_type = (); my @use = (); my %ignore_type = (); -my @ignore = (); +my @ignore = ( + "NAKED_SSCANF", + "SPLIT_STRING", +); my $help = 0; my $configuration_file = ".checkpatch.conf"; my $max_line_length = 80; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/scripts/version-gen.sh new/jgmenu-4.6.0/scripts/version-gen.sh --- old/jgmenu-4.5.0/scripts/version-gen.sh 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/scripts/version-gen.sh 2026-08-07 20:18:13.000000000 +0200 @@ -8,7 +8,7 @@ # Change "default_version" before doing a `git tag -a ...` # -default_version="4.5.0" +default_version="4.6.0" v=$(git describe --dirty --abbrev=1 2>/dev/null) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/args.c new/jgmenu-4.6.0/src/args.c --- old/jgmenu-4.5.0/src/args.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/args.c 2026-08-07 20:18:13.000000000 +0200 @@ -55,6 +55,15 @@ config.position_mode = POSITION_MODE_CENTER; } else if (!strncmp(argv[i], "--persistent", 12)) { config.persistent = 1; + } else if (!strncmp(argv[i], "--override=", 11)) { + /* + * Create a copy as config_process_line modifies the + * C string passed to it; and we call this more than once. + */ + char *line = xstrdup(argv[i] + 11); + + config_process_line(line); + free(line); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/config.c new/jgmenu-4.6.0/src/config.c --- old/jgmenu-4.5.0/src/config.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/config.c 2026-08-07 20:18:13.000000000 +0200 @@ -84,6 +84,7 @@ config.arrow_width = 15; config.search_empty_string = xstrdup("<empty>"); + config.search_markup = NULL; parse_hexstr("#000000 100", config.color_menu_bg); parse_hexstr("#000000 100", config.color_menu_bg_to); @@ -123,7 +124,7 @@ xfree(config.csv_name_format); } -static void process_line(char *line) +void config_process_line(char *line) { char *option, *value; @@ -369,6 +370,9 @@ } else if (!strcmp(option, "search_empty_string")) { xfree(config.search_empty_string); config.search_empty_string = xstrdup(value); + } else if (!strcmp(option, "search_markup")) { + xfree(config.search_markup); + config.search_markup = xstrdup(value); } else if (!strcmp(option, "color_menu_bg")) { parse_hexstr(value, config.color_menu_bg); @@ -438,7 +442,7 @@ char line[1024]; while (fgets(line, sizeof(line), fp)) - process_line(line); + config_process_line(line); } static void parse_file(char *filename) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/config.h new/jgmenu-4.6.0/src/config.h --- old/jgmenu-4.5.0/src/config.h 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/config.h 2026-08-07 20:18:13.000000000 +0200 @@ -76,6 +76,7 @@ int arrow_width; char *search_empty_string; + char *search_markup; double color_menu_bg[4]; double color_menu_bg_to[4]; @@ -102,6 +103,7 @@ void config_set_defaults(void); void config_cleanup(void); +void config_process_line(char *line); void config_read_jgmenurc(const char *filename); void config_post_process(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/desktop.c new/jgmenu-4.6.0/src/desktop.c --- old/jgmenu-4.5.0/src/desktop.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/desktop.c 2026-08-07 20:18:13.000000000 +0200 @@ -172,6 +172,19 @@ return 0; } +static bool +str_ends_with(const char *const string, const char *const suffix) +{ + size_t len_str = string ? strlen(string) : 0; + size_t len_sfx = suffix ? strlen(suffix) : 0; + + if (len_str < len_sfx) + return false; + if (len_sfx == 0) + return true; + return strcmp(string + len_str - len_sfx, suffix) == 0; +} + static void process_file(char *filename, const char *path) { FILE *fp; @@ -179,7 +192,7 @@ int ret = 0; size_t len; - if (!strcasestr(filename, ".desktop")) + if (!str_ends_with(filename, ".desktop")) return; len = strlen(path); strlcpy(fullname, path, sizeof(fullname)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/filter.c new/jgmenu-4.6.0/src/filter.c --- old/jgmenu-4.5.0/src/filter.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/filter.c 2026-08-07 20:18:13.000000000 +0200 @@ -77,6 +77,18 @@ filter_backspace(); } +void filter_delword(void) +{ + if (!has_been_inited) + die("filter has not been initiated"); + if (!needle.len) + return; + + do { + filter_backspace(); + } while (!isspace(needle.buf[needle.len-1]) && needle.len); +} + void filter_reset(void) { BUG_ON(!has_been_inited); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/filter.h new/jgmenu-4.6.0/src/filter.h --- old/jgmenu-4.5.0/src/filter.h 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/filter.h 2026-08-07 20:18:13.000000000 +0200 @@ -8,6 +8,7 @@ void filter_set_clear_on_keyboard_input(int clear); void filter_addstr(const char *str, size_t n); void filter_backspace(void); +void filter_delword(void); void filter_reset(void); int filter_needle_length(void); char *filter_needle(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/jgmenu-config.c new/jgmenu-4.6.0/src/jgmenu-config.c --- old/jgmenu-4.5.0/src/jgmenu-config.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/jgmenu-config.c 2026-08-07 20:18:13.000000000 +0200 @@ -81,6 +81,7 @@ { "arrow_string", "▸" }, { "arrow_width", "15" }, { "search_empty_string", "<empty>" }, + { "search_markup", "" }, { "color_menu_bg", "#000000 100" }, { "color_menu_bg_to", "#000000 100" }, { "color_menu_border", "#eeeeee 8" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/jgmenu-init.sh new/jgmenu-4.6.0/src/jgmenu-init.sh --- old/jgmenu-4.5.0/src/jgmenu-init.sh 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/jgmenu-init.sh 2026-08-07 20:18:13.000000000 +0200 @@ -234,8 +234,7 @@ } check_menu_package_installed () { - # shellcheck disable=SC2039 - local menu_package_exists= + menu_package_exists= for d in $xdg_config_dirs do for file in "${d}"/menus/*.menu @@ -287,11 +286,11 @@ icon_theme_last_used_by_jgmenu () { if [ -d "$XDG_CACHE_HOME" ] then - icon_theme=$(grep -i 'Inherits' $XDG_CACHE_HOME/jgmenu/icons/index.theme) - icon_size=$(grep -i 'Size' $XDG_CACHE_HOME/jgmenu/icons/index.theme) + icon_theme=$(grep -i 'Inherits' "$XDG_CACHE_HOME/jgmenu/icons/index.theme") + icon_size=$(grep -i 'Size' "$XDG_CACHE_HOME/jgmenu/icons/index.theme") else - icon_theme=$(grep -i 'Inherits' ~/.cache/jgmenu/icons/index.theme) - icon_size=$(grep -i 'Size' ~/.cache/jgmenu/icons/index.theme) + icon_theme=$(grep -i 'Inherits' "$HOME/.cache/jgmenu/icons/index.theme") + icon_size=$(grep -i 'Size' "$HOME/.cache/jgmenu/icons/index.theme") fi printf 'last time, icon-theme %s-%s was used\n' "${icon_theme#Inherits=}" \ "${icon_size#Size=}" @@ -419,12 +418,9 @@ } backup_config_files () { - # shellcheck disable=SC2039 - local files_to_backup="${HOME}/.config/jgmenu/jgmenurc \ + files_to_backup="${HOME}/.config/jgmenu/jgmenurc \ ${HOME}/.config/jgmenu/prepend.csv \ ${HOME}/.config/jgmenu/append.csv" - # shellcheck disable=SC2039 - local backup_dir backup_dir="${HOME}/.config/jgmenu/backup/$(date +%Y%m%d%H%M%S%N)" test -d "${backup_dir}" && die "duplicate backup directory" @@ -476,8 +472,7 @@ } prompt () { - # shellcheck disable=SC2039 - local cmd= + cmd= printf "%b" "What now> " read -r cmd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/jgmenu-ob.c new/jgmenu-4.6.0/src/jgmenu-ob.c --- old/jgmenu-4.5.0/src/jgmenu-ob.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/jgmenu-ob.c 2026-08-07 20:18:13.000000000 +0200 @@ -398,7 +398,29 @@ { xmlDoc *d; - d = xmlParseMemory(xmlbuf->buf, strlen(xmlbuf->buf)); + /* + * XML_PARSE_NOENT enables substitution of entities defined by !ENTITY + * as in the example below: + * + * <?xml version="1.0" encoding="UTF-8"?> + * + * <!DOCTYPE openbox_config [ + * <!ENTITY image_viewer "imv"> + * ]> + * + * <openbox_menu> + * <menu id="root-menu" label="root-menu"> + * <item label="View Screenshot"> + * <action name="Execute"> + * <command>&image_viewer; screenshot.png</command> + * </action> + * </item> + * </menu> + * </openbox_menu> + */ + int options = XML_PARSE_NOENT; + + d = xmlReadMemory(xmlbuf->buf, strlen(xmlbuf->buf), NULL, NULL, options); if (!d) exit(1); xml_tree_walk(xmlDocGetRootElement(d)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/jgmenu-themes.sh new/jgmenu-4.6.0/src/jgmenu-themes.sh --- old/jgmenu-4.5.0/src/jgmenu-themes.sh 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/jgmenu-themes.sh 2026-08-07 20:18:13.000000000 +0200 @@ -1,5 +1,7 @@ #!/bin/sh +# shellcheck disable=SC2329,SC2317 + valid_args="\ archlabs_1803_config \ bunsenlabs_hydrogen_config \ @@ -17,11 +19,6 @@ printf '%b\n' "$@" } -die () { - printf 'fatal: %b\n' "$@" >&2 - exit 1 -} - usage () { printf '%b' "Usage: jgmenu_run themes <theme>_<mode> Output config files for themes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/jgmenu.c new/jgmenu-4.6.0/src/jgmenu.c --- old/jgmenu-4.5.0/src/jgmenu.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/jgmenu.c 2026-08-07 20:18:13.000000000 +0200 @@ -1671,6 +1671,14 @@ case XK_Super_R: super_key_pressed = 1; break; + case XK_bracketleft: + if (!(ev->state & ControlMask)) + goto default_case; + [[fallthrough]]; + case XK_c: + if (!(ev->state & ControlMask)) + goto default_case; + [[fallthrough]]; case XK_Escape: if (filter_needle_length()) { filter_reset(); @@ -1689,6 +1697,10 @@ menu.current_node->last_sel = menu.sel; draw_menu(); break; + case XK_p: + if (!(ev->state & ControlMask)) + goto default_case; + [[fallthrough]]; case XK_Up: if (widgets_get_kb_grabbed()) { widgets_select("XK_Up"); @@ -1754,6 +1766,10 @@ if (menu.sel && menu.sel->selectable) action_cmd(menu.sel->cmd, menu.sel->working_dir); break; + case XK_n: + if (!(ev->state & ControlMask)) + goto default_case; + [[fallthrough]]; case XK_Down: if (widgets_get_kb_grabbed()) { widgets_select("XK_Down"); @@ -1820,7 +1836,20 @@ update(1); } break; + case XK_w: + if (!(ev->state & ControlMask)) + goto default_case; + filter_delword(); + update(0); + break; + case XK_u: + if (!(ev->state & ControlMask)) + goto default_case; + filter_reset(); + update(0); + break; default: +default_case: if (filter_get_clear_on_keyboard_input()) filter_reset(); filter_addstr(buf, len); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/spawn.c new/jgmenu-4.6.0/src/spawn.c --- old/jgmenu-4.5.0/src/spawn.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/spawn.c 2026-08-07 20:18:13.000000000 +0200 @@ -93,35 +93,6 @@ } } -static void print_argv(gchar **argv) -{ - printf("spawn "); - for (; *argv; argv++) - printf("%s ", *argv); - printf("\n"); -} - -void spawn_async_no_shell(char const *cmd, char const *workdir) -{ - GError *err = NULL; - gchar **argv = NULL; - - g_shell_parse_argv((gchar *)cmd, NULL, &argv, &err); - if (err) { - fprintf(stderr, "error parsing command\n"); - g_error_free(err); - return; - } - print_argv(argv); - g_spawn_async((gchar *)workdir, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, - NULL, NULL, &err); - if (err) { - fprintf(stderr, "error spawning command %s\n", cmd); - g_error_free(err); - } - g_strfreev(argv); -} - void spawn_command_line_sync(const char *command) { GError *error = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/spawn.h new/jgmenu-4.6.0/src/spawn.h --- old/jgmenu-4.5.0/src/spawn.h 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/spawn.h 2026-08-07 20:18:13.000000000 +0200 @@ -25,13 +25,6 @@ void spawn_sync(const char * const*command); /** - * spawn_async_no_shell - execute asyncronously - * @command: cmd to be executed - * @working_dir: working directory - */ -void spawn_async_no_shell(char const *cmd, char const *workdir); - -/** * spawn_command_line_sync - execute syncronously * @command: cmd to be executed */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/widgets.c new/jgmenu-4.6.0/src/widgets.c --- old/jgmenu-4.5.0/src/widgets.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/widgets.c 2026-08-07 20:18:13.000000000 +0200 @@ -111,6 +111,14 @@ sbuf_replace(&label_escaped, "&", "&"); sbuf_replace(&label_escaped, "<", "<"); sbuf_replace(&label_escaped, ">", ">"); + + if (config.search_markup && config.search_markup[0] != '\0') { + sbuf_prepend(&label_escaped, ">"); + sbuf_prepend(&label_escaped, config.search_markup); + sbuf_prepend(&label_escaped, "<span "); + sbuf_addstr(&label_escaped, "</span>"); + } + ui_insert_text(label_escaped.buf, (*w)->x + padding_left, (*w)->y, (*w)->h, (*w)->w, (*w)->fgcol, LEFT); free(label_escaped.buf); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/x11-ui.c new/jgmenu-4.6.0/src/x11-ui.c --- old/jgmenu-4.5.0/src/x11-ui.c 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/x11-ui.c 2026-08-07 20:18:13.000000000 +0200 @@ -226,7 +226,8 @@ monitor_selected: if (!ci) - die("connection cannot be established to monitor; this may be due to missing packages such as xrandr, x11-xserver-utils or mesa-utils"); + die("connection cannot be established to monitor; this may be " + "due to missing packages such as xrandr, x11-xserver-utils or mesa-utils"); *x0 = ci->x; *y0 = ci->y; *width = ci->width; @@ -394,27 +395,6 @@ rgba[3]); } -void ui_draw_rectangle_rounded_at_top(double x, double y, double w, double h, - double radius, double line_width, int fill, double *rgba) -{ - double deg = 0.017453292519943295; /* 2 x 3.1415927 / 360.0 */ - - cairo_new_sub_path(ui->w[ui->cur].c); - cairo_arc(ui->w[ui->cur].c, x + w - radius, y + radius, radius, -90 * deg, 0 * deg); /* NE */ - cairo_arc(ui->w[ui->cur].c, x + w, y + h, 0, 0 * deg, 90 * deg); /* SE */ - cairo_arc(ui->w[ui->cur].c, x, y + h, 0, 90 * deg, 180 * deg); /* SW */ - cairo_arc(ui->w[ui->cur].c, x + radius, y + radius, radius, 180 * deg, 270 * deg); /* NE */ - cairo_close_path(ui->w[ui->cur].c); - set_rgba(rgba); - if (fill) { - cairo_set_line_width(ui->w[ui->cur].c, 0.0); - cairo_fill_preserve(ui->w[ui->cur].c); - } else { - cairo_set_line_width(ui->w[ui->cur].c, line_width); - } - cairo_stroke(ui->w[ui->cur].c); -} - void ui_draw_rectangle(double x, double y, double w, double h, double radius, double line_width, int fill, double *rgba) { x += line_width / 2; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-4.5.0/src/x11-ui.h new/jgmenu-4.6.0/src/x11-ui.h --- old/jgmenu-4.5.0/src/x11-ui.h 2024-12-10 22:30:27.000000000 +0100 +++ new/jgmenu-4.6.0/src/x11-ui.h 2026-08-07 20:18:13.000000000 +0200 @@ -61,8 +61,6 @@ int ui_has_child_window_open(Window w); void ui_win_del(void); void ui_win_del_beyond(int w); -void ui_draw_rectangle_rounded_at_top(double x, double y, double w, double h, double radius, - double line_width, int fill, double *rgba); void ui_draw_rectangle(double x, double y, double w, double h, double radius, double line_width, int fill, double *rgba); void ui_draw_rectangle_gradient(double x, double y, double w, double h, double radius, double line_width,
