add desktop shortcut

This commit is contained in:
fred 2023-05-03 02:46:00 +02:00
parent ee83196c16
commit fb5083ab42
4 changed files with 20 additions and 0 deletions

12
add_desktop_shortcut.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
################################################################################
# Author: Fred (support@qo-op.com)
# Version: 0.1
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
################################################################################
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
[[ -d ~/Bureau ]] && sed "s/_USER_/$USER/g" ${MY_PATH}/g1billet.desktop > ~/Bureau/g1billet.desktop && chmod +x ~/Bureau/g1billet.desktop
[[ -d ~/Desktop ]] && sed "s/_USER_/$USER/g" ${MY_PATH}/g1billet.desktop > ~/Desktop/g1billet.desktop && chmod +x ~/Desktop/g1billet.desktop

7
g1billet.desktop Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=G1BILLET
Exec=xdg-open http://localhost:33101
Icon=/home/_USER_/.zen/G1BILLET/g1logo.png
Type=Application
Categories=Utility

BIN
g1logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -37,3 +37,4 @@ sudo sed -i "s~_MYPATH_~${MY_PATH}~g" /etc/systemd/system/g1billet.service
sudo systemctl daemon-reload
sudo systemctl enable g1billet
sudo systemctl restart g1billet