sonnyp / Junction

Application/browser chooser
https://flathub.org/apps/re.sonny.Junction
GNU General Public License v3.0
458 stars 29 forks source link

Open Links in different Firefox Profiles? #9

Closed yesnoidontknow1 closed 2 years ago

yesnoidontknow1 commented 2 years ago

Hello, I use 4 different Firefox profiles to separate work from personal from shopping etc. Would be great if I could somehow add those profiles to the selection screen of junction and select the opening of certain links in certain firefox profiles.

sonnyp commented 2 years ago

Hello

You can make desktop files for your firefox profiles in ~/.local/share/applications

Try something like https://unix.stackexchange.com/questions/484798/how-to-give-each-firefox-profile-its-own-application-icon-in-plasma

Let me know how it goes or if you need help.

Would be nice to contribute to the README "Tips and Tricks".

It may also makes sense for Junction to do this out of the box but this would be the first step.

yesnoidontknow1 commented 2 years ago

Thank you for your quick answer! I did as told in the links and separate icons now appear in the task bar for separate browser profiles. But the OS doesn't seem to know it, at least the browser selection stays the same: https://imgur.com/a/2QbxWRG

sonnyp commented 2 years ago

Could you share the exact .desktop files you created?

As well as operating system name/version and desktop environment ?

yesnoidontknow1 commented 2 years ago

Sure! Linux Mint 20.2 / Cinnamon

[Desktop Entry] Name=Firefox Work Exec=firefox -P WORK --class=secondclass %u Comment= Terminal=false Icon=7765_winebrowser.0 Type=Application StartupWMClass=secondclass

yesnoidontknow1 commented 2 years ago

So I tried out a bit more, but the selection menu from Junction stays the same whatever I do. I think it would be most practical to have the choice to manually edit which browser / desktop shortcuts can be part of the browser list somewhere in a Junction configuration menu?

sonnyp commented 2 years ago

You're missing MimeType and probably refreshing the database. The following works for me

# firefox-work.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Work
Exec=firefox -P WORK --class=secondclass %u
Icon=firefox
Terminal=false
Type=Application
StartupWMClass=secondclass
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
cp firefox-work.desktop ~/.local/share/applications
update-desktop-database ~/.local/share/applications
flatpak run re.sonny.Junction https://gnome.org
yesnoidontknow1 commented 2 years ago

Well done, works now for me too!

sonnyp commented 2 years ago

https://github.com/sonnyp/Junction/commit/16292709289b38d5fb6da48e9ec71b34a875b8f5