29 lines
882 B
Bash
29 lines
882 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Build Flatpak package
|
||
|
flatpak-builder build-dir lol.deadzone.discord-awesomeaudio.json --install --user --force-clean
|
||
|
|
||
|
# Create wrapper script
|
||
|
echo '#!/bin/bash
|
||
|
RUNNING=$(pgrep -f "discord-screenaudio")
|
||
|
if [[ -n $RUNNING ]]; then
|
||
|
WM_CLASS="discord-screenaudio"
|
||
|
else
|
||
|
WM_CLASS=""
|
||
|
fi
|
||
|
flatpak run --env=WM_CLASS="$WM_CLASS" lol.deadzone.discord-awesomeaudio' > ~/.local/bin/discord-awesomeaudio.sh
|
||
|
|
||
|
# Make the wrapper script executable
|
||
|
chmod +x ~/.local/bin/discord-awesomeaudio.sh
|
||
|
|
||
|
# Create .desktop file
|
||
|
echo "[Desktop Entry]
|
||
|
Name=Discord Awesome Audio
|
||
|
Exec=flatpak run lol.deadzone.discord-awesomeaudio
|
||
|
Icon=/path/to/application/icon.png
|
||
|
Type=Application
|
||
|
Categories=AudioVideo;Network;" > ~/.local/share/applications/discord-awesomeaudio.desktop
|
||
|
|
||
|
# Make the .desktop file executable (if necessary)
|
||
|
chmod +x ~/.local/share/applications/discord-awesomeaudio.desktop
|