desktop entry

This commit is contained in:
zenobit 2023-03-30 05:38:11 +02:00
parent cb7b17ca0d
commit d8d5223999
2 changed files with 27 additions and 1 deletions

19
dh
View File

@ -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 <<EOF > ${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() {

9
dh.desktop Executable file
View File

@ -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;