|Noah Petherbridge df6956e419||1 year ago|
|pkg||1 year ago|
|README.md||1 year ago|
|main.go||1 year ago|
pwa-launcher is a command-line program to generate Linux desktop app launchers for Progressive Web Apps, using either Firefox or Chromium.
This tool will create a launcher in your standard Linux applications list that uses the favicon of the website in question and will launch the site as a web app in Firefox or Chrome.
Note: at time of writing, Firefox stable (77.0.1) has some support for
“site specific browsers” but it is not enabled by default. Enable it in
about:config by setting browser.ssb.enabled = true.
icotool command will be used to extract PNG images from a website’s
favicon.ico file. Install it with e.g.
apt install icoutils. If the command
is not available, only PNG images such as apple-touch-icons can be used
automatically by this program. (.ico files with image/png mime types will
be used as PNG images directly, too).
pwa-launcher [options] <url> # Examples pwa-launcher https://www.reddit.com/ pwa-launcher -title Reddit -browser google-chrome https://www.reddit.com/ pwa-launcher -browser firefox-esr https://www.youtube.com/
Options (all are optional unless they can’t be auto-detected):
Set the app name for the launcher. The default will parse the
of the website if available.
Specify what web browser to use. Use either the absolute path (/usr/bin/firefox) or just the command name. The default will search for a suitable browser, preferring Firefox > Chromium > Google Chrome.
Specify an icon image to use with the launcher. Can be a local icon on disk or at an HTTP URL (will be downloaded). The default will search the website’s HTML to find icons and also check some well-known URIs for Apple Touch icons. The largest available icon size is used by default.
Manually provide the exec line for launching the web browser. By
default a suitable value is used based on whether you’re using Firefox
or Chromium. Providing this option will override the
-browser is really only used to determine the command name
and type of browser you’re using.
Example values include:
firefox --ssb %s or
Use the placeholder “%s” where the URL would go in the command.
The web URL that the launcher will open. If a title and icon are needed, the program will parse the HTML at this URL and search for titles and icons.
Desktop launchers are placed in the user’s home directory at
~/.local/share/applications/ and their app icons (PNG images) are
File naming convention is like
pwa-$(domain)-$(time).desktop where the
domain is the base domain of the site (e.g.
www.reddit.com) and the time
is a Unix timestamp.
To remove launchers and icons, delete them from the above locations.