Skip to content

[BUG] Applications Plugin: Preprocess Script not working #313

@JoMaZu787

Description

@JoMaZu787

Describe the bug
When I try to use a shell script (or rust program) to preprocess the command run by the applications plugin, it seems to be ignored. The script runs, but the application launches normally even if nothing is output, and if a different command to the one input is output, it is ignored as well.

To Reproduce

  1. Write a shell/bash script that echoes the arguments to a file and then outputs a different command (i tried with xeyes) to stdout
  2. Set it to be executable with chmod a+x script.sh
  3. Set it as the preprocess script in applications.ron
  4. Run an application (like alacritty) with anyrun
  5. The application command as well as term or no-term will be written to the file
  6. The application will start normally

Expected behavior
The application should not launch, instead, xeyes should run

Log

(process:16486): Gtk-WARNING **: 20:19:15.442: Unknown key gtk-modules in /home/jomazu787/.config/gtk-4.0/settings.ini
[applications] Error reading directory /usr/local/share/: No such file or directory (os error 2)

(anyrun:16486): GLib-GIO-WARNING **: 20:19:22.942: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal.  It should do one of these.

System Information

  • Distro: Arch Linux, Kernel 6.18.8-arch2-1
  • Compositor: Hyprland 0.53.3-2
  • Package type: AUR

Script used

#!/bin/sh
echo $* > /home/jomazu787/anyrun.txt
echo "xeyes"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions