It's been very quite here in regard to Yad.
Code: Select all
#!/bin/bash
process=`ps -u $USER | yad --list --title="Kill Process" --window-icon="process-stop" --buttons-layout=center --column "Please select a process to kill:" --text="List all $USER processes:" --width 350 --height 450`
ans=`echo $?`
if test "$ans" -eq "0" ;
then
select=`echo $process | cut -d" " -f1`
kill $select
ans1=`echo $?`
if [ "$ans1" == "0" ] ;
then
select1=`echo $process | cut -d":" -f3 | cut -d" " -f2`
echo | yad --fixed --timeout="5" --title="Kill Process" --window-icon="process-stop" --buttons-layout=center --button="gtk-ok:0" --text-align="center" --borders="30" \
--text="<big><big><b>${select1%|*}</b></big></big><big><b> was killed!</b></big>"
else
echo | yad --fixed --timeout="5" --title="Kill Process" --window-icon="process-stop" --buttons-layout=center --button="gtk-ok:0" --text-align="center" --borders="30" \
--text="<big><big><b>Process</b></big></big><big><b> not found!</b></big>"
fi
exit 0
fi
if test "$ans" -eq "1" ;
then
exit 0
fi