Skip to content

Commit

Permalink
Add Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
Fullaxx committed Jul 10, 2024
1 parent 051a8ad commit 1664f7e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
</menu>

<menu id="apps-network-chat-menu" label="Chat">
<item label="Discord"><action name="Execute"><command>/app/scripts/discord.sh</command></action></item>
<item label="Empathy"><action name="Execute"><command>/app/scripts/empathy.sh</command></action></item>
<item label="Hexchat"><action name="Execute"><command>/app/scripts/hexchat.sh</command></action></item>
<item label="Loqui"><action name="Execute"><command>/app/scripts/loqui.sh</command></action></item>
Expand Down
12 changes: 12 additions & 0 deletions scripts/discord.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

BINARY="discord"

BINARYLOC=`which ${BINARY}`
if [ "$?" -ne "0" ]; then
set -e

xterm -T InstallOpera -g 100x30 -e sudo /app/scripts/install_discord.sh
fi

dbus-launch ${BINARY} --no-sandbox --disable-gpu
11 changes: 11 additions & 0 deletions scripts/install_discord.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

export DEBIAN_FRONTEND="noninteractive"
URL="https://discord.com/api/download?platform=linux&format=deb"
DEB="/tmp/discord.deb"

wget ${URL} -O ${DEB}
dpkg -i ${DEB} || (set -e; apt-get update; apt-get install -f -y; apt-get install -y libgbm1)
rm ${DEB}

0 comments on commit 1664f7e

Please sign in to comment.