Scripts
This commit is contained in:
parent
2858eb3854
commit
58c3ac0b71
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,28 @@
|
|||
#!/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
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"app-id": "lol.deadzone.discord-awesomeaudio",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "5.15-22.08",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"base": "io.qt.qtwebengine.BaseApp",
|
||||
"base-version": "5.15-22.08",
|
||||
"command": "discord-screenaudio",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--share=network",
|
||||
"--socket=wayland",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=pulseaudio",
|
||||
"--filesystem=xdg-videos:ro",
|
||||
"--filesystem=xdg-pictures:ro",
|
||||
"--filesystem=xdg-download",
|
||||
"--filesystem=xdg-run/pipewire-0",
|
||||
"--device=all",
|
||||
"--talk-name=org.kde.StatusNotifierWatcher",
|
||||
"--env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess",
|
||||
"--talk-name=org.freedesktop.Notifications",
|
||||
"--talk-name=org.kde.kglobalaccel"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "discord-screenaudio",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"config-opts": [
|
||||
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
|
||||
"-DGIT_SUBMODULE=OFF"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"finish-install": {
|
||||
"desktop-file": "[Desktop Entry]\nName=Discord Awesome Audio\nExec=flatpak run lol.deadzone.discord-awesomeaudio\nIcon=/path/to/application/icon.png\nType=Application\nCategories=AudioVideo;Network;"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
flatpak remove lol.deadzone.discord-awesomeaudio
|
||||
rm ~/.local/share/applications/discord-awesomeaudio.desktop
|
Loading…
Reference in New Issue