Skip to content

Commit

Permalink
Add Opera
Browse files Browse the repository at this point in the history
  • Loading branch information
Fullaxx committed Jul 2, 2024
1 parent 2689f2e commit 051a8ad
Show file tree
Hide file tree
Showing 3 changed files with 25 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 @@ -43,6 +43,7 @@
<item label="Chromium"><action name="Execute"><command>/app/scripts/chromium.sh</command></action></item>
<item label="Vivaldi"><action name="Execute"><command>/app/scripts/vivaldi.sh</command></action></item>
<item label="Firefox"><action name="Execute"><command>/app/scripts/firefox.sh</command></action></item>
<item label="Opera"><action name="Execute"><command>/app/scripts/opera.sh</command></action></item>
<item label="Brave (stable)"><action name="Execute"><command>/app/scripts/brave_release.sh</command></action></item>
<item label="Brave (beta)"><action name="Execute"><command>/app/scripts/brave_beta.sh</command></action></item>
<item label="Brave (nightly)"><action name="Execute"><command>/app/scripts/brave_nightly.sh</command></action></item>
Expand Down
12 changes: 12 additions & 0 deletions scripts/install_opera.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

export DEBIAN_FRONTEND="noninteractive"
OPERA_VERS=`curl 'https://download3.operacdn.com/pub/opera/desktop/' | grep "\-2024 " | awk -F\" '{print $2}' | cut -d/ -f1 | tail -n1`
URL="https://download3.operacdn.com/pub/opera/desktop/${OPERA_VERS}/linux/opera-stable_${OPERA_VERS}_amd64.deb"
DEB="/tmp/opera.deb"

wget ${URL} -O ${DEB}
dpkg -i ${DEB} || (set -e; apt-get update; apt-get install -f -y; apt-get install -y upower)
rm ${DEB}
12 changes: 12 additions & 0 deletions scripts/opera.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

BINARY="opera"

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

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

dbus-launch ${BINARY} --no-sandbox --disable-gpu

0 comments on commit 051a8ad

Please sign in to comment.