2023-03-10 05:47:49 +00:00
|
|
|
#!/bin/bash
|
2023-03-14 11:24:54 +00:00
|
|
|
export LC_ALL=C
|
2023-03-10 05:47:49 +00:00
|
|
|
|
2023-03-14 10:28:20 +00:00
|
|
|
version="0.3"
|
2023-03-10 05:47:49 +00:00
|
|
|
# DEBUG mod
|
|
|
|
#bash -x quickyad 2>&1 | tee output.log
|
|
|
|
|
2023-03-12 13:52:04 +00:00
|
|
|
# YAD gui script using Forked excellent quickemu
|
2023-03-10 05:47:49 +00:00
|
|
|
#TODO Add homepages to right click
|
|
|
|
|
|
|
|
echo "Running..."
|
|
|
|
# dependencies checks
|
|
|
|
if ! command -v yad >/dev/null 2>&1; then
|
|
|
|
echo "You are missing yad..." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
# generate random key for yad (for connecting tabs in notebook together)
|
|
|
|
key=$((RANDOM % 9000 + 1000))
|
2023-03-12 16:29:06 +00:00
|
|
|
|
2023-03-10 05:47:49 +00:00
|
|
|
# set current dir as QUICKEMU_VMS_DIR
|
|
|
|
#QUICKEMU_VMS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
2023-03-12 16:29:06 +00:00
|
|
|
|
|
|
|
# distrohopper config file
|
2023-03-12 13:52:04 +00:00
|
|
|
CONFIG_DIR="$HOME/.config/distrohopper"
|
2023-03-12 16:29:06 +00:00
|
|
|
source "$CONFIG_DIR/distrohopper.conf"
|
2023-03-10 05:47:49 +00:00
|
|
|
|
|
|
|
# show YAD notebook
|
|
|
|
yad --plug="$key" --tabnum=1 --icons --listen --read-dir="$CONFIG_DIR"/vms_ready --sort-by-name --no-buttons --borders=0 --icon-size=48 --item-width=76 &
|
|
|
|
yad --plug="$key" --tabnum=2 --icons --listen --read-dir="$CONFIG_DIR"/vms_supported --sort-by-name --no-buttons --borders=0 --icon-size=48 --item-width=76 &
|
|
|
|
yad --plug="$key" --tabnum=3 --icons --listen --read-dir="$CONFIG_DIR" --sort-by-name --no-buttons --borders=0 --icon-size=48 --item-width=76 &
|
2023-03-12 14:21:22 +00:00
|
|
|
yad --dynamic --notebook --key="$key" --width=900 --height=800 --title="DistroHopper $version" --listen --no-buttons --tab="run VM" --tab="download VM" --tab="settings"
|
2023-03-10 05:47:49 +00:00
|
|
|
# exit peacfully
|
|
|
|
exit 0
|