Skip to content

Commit

Permalink
adding helper script to generate desktop shortcut for linux, for refl…
Browse files Browse the repository at this point in the history
…1d-webview server
  • Loading branch information
bmaranville committed Apr 17, 2024
1 parent 4c5b2a1 commit 9e66435
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions extra/make_linux_desktop_shortcut.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# This script creates a desktop shortcut for the Refl1d webview server.
# The shortcut will be created in the user's desktop directory.
# the executable path is in 'env/bin/python'

# Get the user's desktop directory
desktop_dir=~/Desktop

# Get the path to the bumps webview server
script_dir=$(realpath $(dirname $0))

# Create the desktop shortcut
echo "[Desktop Entry]
Name=Refl1d-Webview
Comment=Start the refl1d webview server
Exec=$script_dir/env/bin/python -m refl1d.webview.server
Icon=$script_dir/env/share/icons/refl1d-icon.svg
Terminal=true
Type=Application
Categories=Development;
" > $desktop_dir/Refl1dWebviewServer.desktop

# Make the desktop shortcut executable
chmod +x $desktop_dir/Refl1dWebviewServer.desktop

0 comments on commit 9e66435

Please sign in to comment.