Skip to content

Instantly share code, notes, and snippets.

@edubxb
Last active April 20, 2021 08:45
Show Gist options
  • Save edubxb/c7b6970d95f2ad4a311b34d7f2e726cb to your computer and use it in GitHub Desktop.
Save edubxb/c7b6970d95f2ad4a311b34d7f2e726cb to your computer and use it in GitHub Desktop.
#!/bin/bash
URL=$1
if [[ ${URL} =~ ^https://.+\.work\.com.+$ ]]; then
exec firefox -P work "$URL"
elif [[ ${URL} =~ ^https://meet\.google\.com.+$ ]]; then
exec gtk-launch google-chrome "$URL"
else
exec gtk-launch firefox "$URL"
fi
[Desktop Entry]
Version=1.0
Name=HTTP Handler
Exec=http-handler %u
StartupNotify=true
Categories=Network;GNOME;GTK;WebBrowser;
Terminal=false
Type=Application
MimeType=x-scheme-handler/unknown;x-scheme-handler/about;text/html;x-scheme-handler/http;x-scheme-handler/https;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment