Browsers-software / browsers

Open the right browser at the right time
https://browsers.software
Apache License 2.0
111 stars 11 forks source link

Add custom browser or cli command #228

Open leancode opened 1 month ago

leancode commented 1 month ago

Is your feature request related to a problem? Please describe. I use "Web Apps" on Mint to organise all my web apps and they all run in their individual contexts. These are not detected by Browsers unfortunately. E.g. Microsoft Teams has been set up and the desktop shortcut contains the following:

[Desktop Entry]
Version=1.0
Name=Teams Microsoft
Comment=Web App
Exec=brave-browser --app="https://www.microsoft.com/en-us/microsoft-teams/join-a-meeting" --class=WebApp-TeamsMicrosoft6971 --name=WebApp-TeamsMicrosoft6971 --user-data-dir=/home/dom/.local/share/ice/profiles/TeamsMicrosoft6971
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=web-microsoft
Categories=GTK;WebApps;
MimeType=text/html;text/xml;application/xhtml_xml;
StartupWMClass=WebApp-TeamsMicrosoft6971
StartupNotify=true
X-WebApp-Browser=Brave Browser
X-WebApp-URL=https://www.microsoft.com/en-us/microsoft-teams/join-a-meeting
X-WebApp-CustomParameters=
X-WebApp-Navbar=false
X-WebApp-PrivateWindow=false
X-WebApp-Isolated=true

Describe the solution you'd like If the rules page would allow me to add my own command like e.g. that would do it. If it could be detected even better: brave-browser --app="https://www.microsoft.com/en-us/microsoft-teams/join-a-meeting" --class=WebApp-TeamsMicrosoft6971 --name=WebApp-TeamsMicrosoft6971 --user-data-dir=/home/dom/.local/share/ice/profiles/TeamsMicrosoft6971

Describe alternatives you've considered I have not found any alternative way to implement this

Additional context N/A

liias commented 1 month ago

Hey @leancode

As a first step - what happens if you edit the .desktop file manually and change MimeType of that Teams desktop file to

MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;

and then do a refresh inside Browsers app


Will also throw Mint's webapp manager python script as a reference for myself here - https://github.com/linuxmint/webapp-manager/blob/master/usr/lib/webapp-manager/common.py

leancode commented 1 month ago

Yes, that makes it show up and is a working workaround. Most certainly a step in the right direction. Great!

ZeronoFreya commented 3 weeks ago

Agreed, Windows also needs it.