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?