OS: Kubuntu 20.04 with Plasma 5.18.5
I made a "service menu" to use in the Dolphin file manager.
It's purpose is to reduce the brightness of a png/jpg file using ImageMagick's `convert`
Code:
[Desktop Action less-bright]
Exec=convert -brightness-contrast -10x0 %U $(basename -s .png %U)-1.png \
&& convert -brightness-contrast -20x0 %U $(basename -s .png %U)-2.png \
&& convert -brightness-contrast -30x0 %U $(basename -s .png %U)-3.png \
&& convert -brightness-contrast -40x0 %U $(basename -s .png %U)-4.png \
&& convert -brightness-contrast -50x0 %U $(basename -s .png %U)-5.png
Name=Reduce Brightness
Icon=colorneg
[Desktop Entry]
Actions=less-bright
MimeType=image/png;image/jpeg;
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel
So if I right-click on an image file in Dolphin, I'll get a "Reduce Brightness" entry in the context menu (just like Thunar's custom actions).
Choosing "Reduce Brightness", will produce 5 additional image files of differing brightness:
64-brave-browser-1.png
64-brave-browser-2.png
64-brave-browser-3.png
64-brave-browser-4.png
64-brave-browser-5.png
64-brave-browser.png (original)
My question is this: my Exec line uses `&&` over and over again but is there a better way to do what my script does?