I implemented some shell scripts to my dolphin context menue. Within the shells scripts i run some commands, which take some time.
My question is: Is it possible to implement some code into the (a) shell script, so that a pop up window or a status bar in the notification field (kde plasma) is showing up?
Here is the script i want to use the progress bar on:
#!/bin/bash
mkdir small
cp *.jpg small
cp *.JPG small
cd small
for i in *.jpg; do
if [ -e "$i" ]; then
file=`basename "$i" .jpg`
mogrify -unsharp 0.25x0.25+8+0.065 -resize 1280x1024 -normalize -density 180 -monitor "$i"
fi
done
for i in *.JPG; do
if [ -e "$i" ]; then
file=`basename "$i" .JPG`
mogrify -unsharp 0.25x0.25+8+0.065 -resize 1280x1024 -normalize -density 180 -monitor "$i"
fi
done
Explanation: The script is very handy to post-process pictures (jpegs) to a reasonable size for picture protocols (ppt, pdf, etc.) or whatelse...
zenity
which has a progress bar, but that's done in Gtk and may not look good on KDE. For KDE there might be something else but I'm no KDE user so can't suggestzenity
command with appropriate flags. Here's an example: askubuntu.com/a/931015/295286cp
orfind
they're built to perform one specific function, and if there's no progress option - there's not much we can do.