#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "Select pkgs from xapps(Independent X Applications)"   --checklist "Select packages to install from xapps series. Use cursor up/down to select the package, mark(*) by space key. Push Enter to start install." 24 72 15 "Imath" "Imath 2D/3D vectors/matrices library " "on" \
"Pillow" "Python Imaging Library" "on" \
"PySolFC" "Famous card/mahjong games" "on" \
"PySolFC_Cardsets" "Cards data for PySolFC" "on" \
"XPython" "Python3 with X libs" "on" \
"adwaita_icon_theme" "Adwaita icon theme" "on" \
"cssselect" "CSS selectors for Python " "on" \
"emacs" "Emacs" "on" \
"evince" "e_title" "on" \
"gimp" "e_title" "on" \
"gimp_help" "Help messages for GIMP" "on" \
"gnome_icon_theme" "e_title" "on" \
"gnome_keyring" "GNOME keyring" "on" \
"gnuplot" "gnuplot 4.0" "on" \
"graphviz" "Graph Visualization Software" "on" \
"hicolor_icon_theme" "fallback theme for icons" "on" \
"inkscape" "e_title" "on" \
"libheif" "HEIF handling library" "on" \
"libimagequant" "PNG quantize library" "on" \
"libinput_gestures" "Actions gestures on your touchpad using libinput" "on" \
"libmypaint" "brush effect library" "on" \
"mcomix" "Mcomix image viewer" "on" \
"miniupnpc" "library for UPnP Internet Gateway Device specifications" "on" \
"murrine" "Murrine Theme engine" "on" \
"mypaint_brushes" "Brushes for libmypaint" "on" \
"mypaint_brushes2" "Brushes collection V2" "on" \
"netpbm" "e_title" "on" \
"numix_gtk_theme" "Numix GTK Theme" "on" \
"openexr" "OpenEXR: HDRI library" "on" \
"perl_Tk" "Tk modules for Perl" "on" \
"pysol_cards" "Cards data for PySolFC" "on" \
"python_attrs" "Classes Without Boilerplate" "on" \
"python_configobj" "config file reader for Python" "on" \
"python_sane" "Python module for SANE" "on" \
"random2" "random2 module for Python3" "on" \
"sane_backends" "sane-backends 1.0.17" "on" \
"tcl" "Tcl interpreter" "on" \
"thunderbird" "e_title" "on" \
"tk" "Tk" "on" \
"transmission" "Transmission" "on" \
"wmctrl" "Control window manager from command line" "on" \
"xarchiver" "A lightweight desktop independent archive manager" "on" \
"xdotool" "Command-line X11 automation tool" "on" \
"xsane" "Xsane image scan utility" "on" \
"xscreensaver" "Screen Saver" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in Imath Pillow PySolFC PySolFC_Cardsets XPython adwaita_icon_theme cssselect emacs evince gimp gimp_help gnome_icon_theme gnome_keyring gnuplot graphviz hicolor_icon_theme inkscape libheif libimagequant libinput_gestures libmypaint mcomix miniupnpc murrine mypaint_brushes mypaint_brushes2 netpbm numix_gtk_theme openexr perl_Tk pysol_cards python_attrs python_configobj python_sane random2 sane_backends tcl thunderbird tk transmission wmctrl xarchiver xdotool xsane xscreensaver  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in Imath Pillow PySolFC PySolFC_Cardsets XPython adwaita_icon_theme cssselect emacs evince gimp gimp_help gnome_icon_theme gnome_keyring gnuplot graphviz hicolor_icon_theme inkscape libheif libimagequant libinput_gestures libmypaint mcomix miniupnpc murrine mypaint_brushes mypaint_brushes2 netpbm numix_gtk_theme openexr perl_Tk pysol_cards python_attrs python_configobj python_sane random2 sane_backends tcl thunderbird tk transmission wmctrl xarchiver xdotool xsane xscreensaver ; do
    if grep "$PACKAGE" /tmp/SeTpkgs 1> /dev/null 2> /dev/null ; then
        echo "$PACKAGE: ADD" >> /tmp/SeTnewtag
    else echo "$PACKAGE: SKP" >> /tmp/SeTnewtag
    fi
done
rm -f /tmp/SeTpkgs

