From d8d522399943a040cdd85f3cad5a102ba56420eb Mon Sep 17 00:00:00 2001 From: zenobit Date: Thu, 30 Mar 2023 05:38:11 +0200 Subject: [PATCH] desktop entry --- dh | 19 ++++++++++++++++++- dh.desktop | 9 +++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 dh.desktop diff --git a/dh b/dh index 4473975..e8065d0 100755 --- a/dh +++ b/dh @@ -104,6 +104,21 @@ function create_structure() { mkdir -p "$DH_ICON_DIR" >/dev/null 2>&1 || sudo mkdir -p "$DH_ICON_DIR" } +function dh_desktop_entry() { + cat < ${TMP_DIR}/dh.desktop +[Desktop Entry] +Type=Application +Name=DistroHopper +Description=Quickly download, create and run VM of any#TODO operating system. +version=0.77b +Exec=sh -c 'cd ${VMS_DIR} && exec dh g' +Icon=/home/zen/git/distrohopper/icons/hop.svg +Categories=System;Virtualization; + +EOF + sudo cp dh.desktop /usr/share/applications/ +} + function set_dir() { NEWDIR="$(yad --file --directory --title="Where to save VMs?")" VMS_DIR="$NEWDIR" @@ -163,7 +178,9 @@ function install_process() { && echo $"Installing needed..." \ && install_prereq \ && echo $"Installing DistroHopper to bin..." \ - && install_dh + && install_dh \ + && echo $"Copying desktop entry..." \ + && dh_desktop_entry } # basic ----------------------------------- function renew_ready() { diff --git a/dh.desktop b/dh.desktop new file mode 100755 index 0000000..4f78674 --- /dev/null +++ b/dh.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=DistroHopper +Description=Quickly download, create and run VM of any#TODO operating system. +version=0.77b +Exec=sh -c './dh m g' +Icon=/home/zen/git/distrohopper/icons/hop.svg +Categories=System;Virtualization; +