#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "Select pkgs from xfce(XFce Desktop Environment)"   --checklist "Select packages to install from xfce series. Use cursor up/down to select the package, mark(*) by space key. Push Enter to start install." 24 72 15 "Thunar" "thunar file manager" "on" \
"elementary_xfce" "e_title" "on" \
"exo" "libexo" "on" \
"garcon" "garcon menu library" "on" \
"gtk_xfce_engine" "Gtk+-2.0とGTK+-3.0の双方に対応したXfce用の描画エンジン" "on" \
"libburn" "CD/DVD/BD writing library" "on" \
"libdbusmenu" "e_title" "on" \
"libisofs" "ISO-9660 fs library" "on" \
"libxfce4ui" "libxfce4ui" "on" \
"libxfce4util" "Utilities for Xfce4" "on" \
"libxfce4windowing" "X11/Wayland windowing utility library for Xfce" "on" \
"mousepad" "text editor for Xfce" "on" \
"orage" "time managing appliction orage" "on" \
"parole" "parole media player" "on" \
"ristretto" "picture viewer for Xfce" "on" \
"thunar_archive_plugin" "An archive operations plugin for the Thunar File Manager" "on" \
"thunar_media_tags_plugin" "media tags plugin for Thunar" "on" \
"thunar_volman" "Thunar volume manager" "on" \
"tumbler" "tumbler thumbnailer" "on" \
"xfburn" "xfburn CD/DVD/BD writer" "on" \
"xfce4_appfinder" "appfinder for Xfce" "on" \
"xfce4_battery_plugin" "battery plugin for Xfce4" "on" \
"xfce4_clipman_plugin" "clipboard manager for Xfce Panel" "on" \
"xfce4_dev_tools" "Xfce4 development tools" "on" \
"xfce4_notifyd" "e_title" "on" \
"xfce4_panel" "Xfce4 panel" "on" \
"xfce4_panel_profiles" "Xfce4-panel-profiles" "on" \
"xfce4_power_manager" "e_title" "on" \
"xfce4_pulseaudio_plugin" "Xfce PulseAudio Panel Plugin" "on" \
"xfce4_screenshooter" "Xfce4 Screenshooter" "on" \
"xfce4_sensors_plugin" "e_title" "on" \
"xfce4_session" "Xfce4 session" "on" \
"xfce4_settings" "Xfce Setting tools" "on" \
"xfce4_systemload_plugin" "xfce4 systemload plugin" "on" \
"xfce4_terminal" "xfce4_terminal" "on" \
"xfce4_wavelan_plugin" "wavelan-plugin for Xfce4 " "on" \
"xfce4_weather_plugin" "Weather information plugin for Xfce Panel" "on" \
"xfce4_xkb_plugin" "XKB plugin for Xfce4" "on" \
"xfce_theme_Greybird" "Greybird theme for Xfce" "on" \
"xfconf" "Xfce configuration system" "on" \
"xfdesktop" "xfdesktop" "on" \
"xfwm4" "Xfce4 Window Manager" "on" \
"xiccd" "xiccd : Simple bridge between colord and X" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in Thunar elementary_xfce exo garcon gtk_xfce_engine libburn libdbusmenu libisofs libxfce4ui libxfce4util libxfce4windowing mousepad orage parole ristretto thunar_archive_plugin thunar_media_tags_plugin thunar_volman tumbler xfburn xfce4_appfinder xfce4_battery_plugin xfce4_clipman_plugin xfce4_dev_tools xfce4_notifyd xfce4_panel xfce4_panel_profiles xfce4_power_manager xfce4_pulseaudio_plugin xfce4_screenshooter xfce4_sensors_plugin xfce4_session xfce4_settings xfce4_systemload_plugin xfce4_terminal xfce4_wavelan_plugin xfce4_weather_plugin xfce4_xkb_plugin xfce_theme_Greybird xfconf xfdesktop xfwm4 xiccd  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in Thunar elementary_xfce exo garcon gtk_xfce_engine libburn libdbusmenu libisofs libxfce4ui libxfce4util libxfce4windowing mousepad orage parole ristretto thunar_archive_plugin thunar_media_tags_plugin thunar_volman tumbler xfburn xfce4_appfinder xfce4_battery_plugin xfce4_clipman_plugin xfce4_dev_tools xfce4_notifyd xfce4_panel xfce4_panel_profiles xfce4_power_manager xfce4_pulseaudio_plugin xfce4_screenshooter xfce4_sensors_plugin xfce4_session xfce4_settings xfce4_systemload_plugin xfce4_terminal xfce4_wavelan_plugin xfce4_weather_plugin xfce4_xkb_plugin xfce_theme_Greybird xfconf xfdesktop xfwm4 xiccd ; 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

