Whisker menu (XFCE/Manjaro start menu) - how to create new menu entry with custom command to be run?

Hello,

i am looking ideally for the command-line method to create new menu entry to the Manjaro XFCE start menu (Whisker menu?).

So far this is what i have. It can be pasted to a command line. And will cause new menu entry added and when i click it, it launch the defined .appimage. When i right click it, i can click Update entry and it should download current .appimage from URL (in case current one is older).

mkdir ~/apps/;cat << EOF > file
[Desktop Entry]
Version=1.1
Type=Application
Name=LosslessCutUpdate
Comment=GUI tool for lossless trimming/cutting of media files
Icon=losslesscut
Exec=/home/$(whoami)/apps/LosslessCut-linux.AppImage
Actions=NewShortcut;
Categories=AudioVideo;

[Desktop Action NewShortcut]
Name=Update
Exec=$(which wget|head -n1|awk '{print $1}') -NqO /home/$(whoami)/apps/LosslessCut-linux.AppImage https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-linux.AppImage
EOF
sudo mv -f file /usr/share/applications/losslesscutupdateappimageandrun.desktop

I have not yet verified the update function (wget command) and when i tried to run update (wget) command before the actual appimage launch command (i mean both on one “Exec=” line separated by ; or &&), then it somehow not worked - did nothing on click. Seems like if it expects / as the first character after =

So another question is how to create more complicated commands like that one in .desktop file without creating separate bash script with execute permission?

After 18 days, Update entry works. But i do not know how to run the app image after the wget, in one liner?

Currently it is:

Exec=/usr/bin/wget -NqO /home/me/apps/LosslessCut-linux.AppImage https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-linux.AppImage

and i have to wait and guess when the download is finished and then run from whisker menu. It would be nice if appimage is launched after the wget is complete…

anyone please?

Put the commands into a bash script and execute the script.

Thanks, it should likely work, though i was looking for some way without creating additional file than the .desktop one.

Try Exec=/bin/bash -c 'cmd;cmd ’