Skip to content

Commit

Permalink
Add LibreWolf app
Browse files Browse the repository at this point in the history
@craigevil should be happy about this one
  • Loading branch information
Botspot committed Feb 26, 2024
1 parent d43edbb commit 10f16a0
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/updates/LibreWolf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

webVer=$(curl -s "https://gitlab.com/api/v4/projects/44042130/releases" | tr '{},[]' '\n' | grep -x '"direct_asset_url":.*linux-arm64-package.tar.bz2"' -m1 | sed 's+.*/packages/generic/librewolf/++g ; s+/.*++g')
arm64_url="https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/${webVer}/librewolf-${webVer}-linux-arm64-package.tar.bz2"

source $GITHUB_WORKSPACE/.github/workflows/update_github_script.sh
1 change: 1 addition & 0 deletions apps/LibreWolf/credits
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Botspot
6 changes: 6 additions & 0 deletions apps/LibreWolf/description
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
A custom version of Firefox, focused on privacy, security and freedom.

Note: This is not the LibreWolf arm64 appimage. Installing from here will install LibreWolf to your system as a native app with best performance.

To run: Menu -> Internet -> LibreWolf
To run in a terminal: /opt/librewolf/librewolf
Binary file added apps/LibreWolf/icon-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/LibreWolf/icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions apps/LibreWolf/install-64
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

version='123.0-1'

#install all dependencies found in the librewolf amd64 deb
install_packages lsb-release libasound2 libatk1.0-0 libc6 libcairo-gobject2 libcairo2 libdbus-1-3 libdbus-glib-1-2 libfontconfig1 libfreetype6 libgcc-s1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libharfbuzz0b libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxtst6 || exit 1

sudo rm -rf /tmp/librewolf /opt/librewolf
wget -O /tmp/librewolf.tar.bz2 "https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/${version}/librewolf-${version}-linux-arm64-package.tar.bz2" || exit 1
mkdir -p /tmp/librewolf
status "Extracting: /tmp/librewolf.tar.bz2"
tar --strip-components=1 -xf /tmp/librewolf.tar.bz2 -C /tmp/librewolf || error "Failed to extract librewolf tarfile!"

sudo mv -f /tmp/librewolf /opt || error "Failed to move extracted librewolf folder to /opt!"

#copy icons
sudo cp -n /opt/librewolf/browser/chrome/icons/default/default16.png /usr/share/icons/hicolor/16x16/apps/librewolf.png
sudo cp -n /opt/librewolf/browser/chrome/icons/default/default32.png /usr/share/icons/hicolor/32x32/apps/librewolf.png
sudo cp -n /opt/librewolf/browser/chrome/icons/default/default48.png /usr/share/icons/hicolor/48x48/apps/librewolf.png
sudo cp -n /opt/librewolf/browser/chrome/icons/default/default64.png /usr/share/icons/hicolor/64x64/apps/librewolf.png
sudo cp -n /opt/librewolf/browser/chrome/icons/default/default128.png /usr/share/icons/hicolor/128x128/apps/librewolf.png

#refresh icon caches
sudo update-icon-caches /usr/share/icons/*
sudo xdg-icon-resource forceupdate --mode system

This comment has been minimized.

Copy link
@theofficialgman

theofficialgman Feb 26, 2024

Collaborator

touch ing the root icon folder (eg: updating its timestamp) is generally enough to get the icon cache to update. copying the files into the folder doesn't update the root folder timestamp.


cat <<"EOF" | sudo tee /usr/share/applications/librewolf.desktop >/dev/null
[Desktop Entry]
Type=Application
Name=LibreWolf
GenericName=Web Browser
# Gnome and KDE 3 uses Comment.
Comment=Web Browser
StartupNotify=true
Terminal=false
Type=Application
MimeType=application/json;application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Comment=LibreWolf Browser
Categories=Network;WebBrowser;Security;
StartupWMClass=librewolf-default
Exec=/opt/librewolf/librewolf %u
Icon=librewolf
Actions=new-window;new-private-window;safe-mode;preferences;
[Desktop Action new-window]
Name=New Window
Exec=/opt/librewolf/librewolf
[Desktop Action new-private-window]
Name=New Private Window
Exec=/opt/librewolf/librewolf --private-window %u
[Desktop Action safe-mode]
Name=Start in Safe Mode
Exec=/opt/librewolf/librewolf --safe-mode
[Desktop Action preferences]
Name=Show Preferences
Exec=/opt/librewolf/librewolf --preferences
EOF
6 changes: 6 additions & 0 deletions apps/LibreWolf/uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

#Allow packages required by this app to be uninstalled
purge_packages || exit 1

sudo rm -rf /opt/librewolf /usr/share/applications/librewolf.desktop /usr/share/icons/hicolor/*/apps/librewolf.png
1 change: 1 addition & 0 deletions apps/LibreWolf/website
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://librewolf.net/
1 change: 1 addition & 0 deletions etc/categories
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ LibreCAD|Engineering
Libreoffice MS theme|Office
LibreOffice|Office
LibrePCB|Engineering
LibreWolf|Internet/Browsers
Lightpad|Appearance
LineRider|Games
LinuxCNC|Engineering
Expand Down

0 comments on commit 10f16a0

Please sign in to comment.