#!/bin/sh

icon=/usr/share/icons/manjaro/maia/maia.svg
img=/etc/cinnamon-panel-chooser.png

rm_auto(){
    auto=$HOME/.config/autostart/cinnamon-panel-chooser.desktop
    [[ -e $auto ]] && rm $auto
}

yad \
  --title="Select Panel Style" \
  --width=200 --fixed \
  --on-top \
  --window-icon=$icon \
  --image=$img \
  --button="Revert to traditional window list":1 \
  --button="Use grouped window list":2 \
  --buttons-layout=spread;

choice=$?

if [[ $choice -eq 1 ]]; then
    set_classic_style
    rm_auto
elif [[ $choice -eq 2 ]]; then
    set_modern_style
    rm_auto
fi

exit 0
