#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "Select pkgs from cinnamon(Cinnamon desktop environment)"   --checklist "Select packages to install from cinnamon series. Use cursor up/down to select the package, mark(*) by space key. Push Enter to start install." 24 72 15 "ModemManager" "mobile broadband modems manager " "on" \
"NetworkManager" "NetworkManager " "on" \
"adwaita_icon_theme_legacy" "Adwaita legacy icons " "on" \
"cinnamon" "Cinnamon desktop environment" "on" \
"cinnamon_control_center" "Cinnamon Control Center" "on" \
"cinnamon_desktop" "Cinnamon desktop library and documents " "on" \
"cinnamon_menus" "Cinnamon-menus library " "on" \
"cinnamon_screensaver" "Cinnamon Screen Saver" "on" \
"cinnamon_session" "Cinnamon Session Manager " "on" \
"cinnamon_settings_daemon" "Cinnamon settings daemon " "on" \
"cinnamon_translations" "multi-language messages for cinnamon" "on" \
"cjs" "The Cinnamon Javascript interpreter " "on" \
"cldr_emoji_annotation" "cldr emoji annotation " "on" \
"gjs" "GNOME JavaScript Interpreter " "on" \
"gnome_screenshot" "Gnome Screen Shot " "on" \
"gnome_terminal" "Gnome Terminal " "on" \
"gsound" "GSound library " "on" \
"gtk4_layer_shell" "GTK4 Layer Shell/Session Lock library for Wayland" "on" \
"ibus" "IBus Input Bus " "on" \
"keybinder3" "library for keyboard shortcuts " "on" \
"libadwaita" "libadwaita is a collection of GTK widgets " "on" \
"libgnomekbd" "GNOME keyboard shared library " "on" \
"libmbim" "glib-based library for talking to WWAN modems" "on" \
"libndp" "libndp - Library for Neighbor Discovery Protocol" "on" \
"libnma" "NetworkManager UI utilities" "on" \
"libqmi" "glib-based library for talking to WWAN modems" "on" \
"libqrtr_glib" "glib-based library for QRTR bus " "on" \
"libspectre" "Postsciript rendering library " "on" \
"libtimezonemap" "GTK+3 timezone map widget" "on" \
"mjs" "SpiderMonkey JavaScript engine" "on" \
"mobile_broadband_provider_info" "Mobile Broadband Service Provider Information Database " "on" \
"muffin" "Mutter is a Wayland display server and X11 window manager" "on" \
"nemo" "Nemo is a fliemanager for Cinnamon Desktop " "on" \
"pix" "An image viewer and browser utility. " "on" \
"python3_xapp" "Python binding for xapp" "on" \
"python_pam" "Python pam module " "on" \
"python_pexpect" "Pexpect is a Pure Python Expect-like module" "on" \
"python_psutil" "PS utils for Python " "on" \
"python_ptyprocess" "ptyprocss manager for Python " "on" \
"python_pyasyncore" "python async core module " "on" \
"python_pyinotify" "inotify fs event monitor for Python  " "on" \
"python_setproctitle" "process title change tool " "on" \
"python_tinycss2" "CSS parser and generator written in Python " "on" \
"python_webencodings" "Python's WHATWG Encoding standard " "on" \
"velocitty" "Velocitty terminal emulator" "on" \
"vte" "Virtual Terminal Emulator" "on" \
"xapp" "xapp project library " "on" \
"xapp_symbolic_icons" "XSI symbolic icons " "on" \
"xed" "Xed Text Editor " "on" \
"xreader" "Xreader document viewer " "on" \
"xviewer" "Xviewer is a simple image viewer " "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in ModemManager NetworkManager adwaita_icon_theme_legacy cinnamon cinnamon_control_center cinnamon_desktop cinnamon_menus cinnamon_screensaver cinnamon_session cinnamon_settings_daemon cinnamon_translations cjs cldr_emoji_annotation gjs gnome_screenshot gnome_terminal gsound gtk4_layer_shell ibus keybinder3 libadwaita libgnomekbd libmbim libndp libnma libqmi libqrtr_glib libspectre libtimezonemap mjs mobile_broadband_provider_info muffin nemo pix python3_xapp python_pam python_pexpect python_psutil python_ptyprocess python_pyasyncore python_pyinotify python_setproctitle python_tinycss2 python_webencodings velocitty vte xapp xapp_symbolic_icons xed xreader xviewer  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in ModemManager NetworkManager adwaita_icon_theme_legacy cinnamon cinnamon_control_center cinnamon_desktop cinnamon_menus cinnamon_screensaver cinnamon_session cinnamon_settings_daemon cinnamon_translations cjs cldr_emoji_annotation gjs gnome_screenshot gnome_terminal gsound gtk4_layer_shell ibus keybinder3 libadwaita libgnomekbd libmbim libndp libnma libqmi libqrtr_glib libspectre libtimezonemap mjs mobile_broadband_provider_info muffin nemo pix python3_xapp python_pam python_pexpect python_psutil python_ptyprocess python_pyasyncore python_pyinotify python_setproctitle python_tinycss2 python_webencodings velocitty vte xapp xapp_symbolic_icons xed xreader xviewer ; 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

