3

Sharing a little script I use to automatically choose the correct browser profile based on the link. I set it as my default link handler.

https://gist.github.com/scriptcoded...

Comments
  • 0
    Small nitpick:

    url=${1:?'Missing first parameter "url"'}

    Then replace $1 with url ;)

    A case esac statement could be more readable / extendable.

    https://gnu.org/software/bash/...

    Case supports pattern matching.

    gtk-launch is based upon desktop files, probably just used for bling bling notification regarding startup.

    Maybe add a comment that
    firefox -P <Profile>

    starts Firefox with the given profile.

    Profiles could be added / viewed via
    firefox -ProfileManager

    If someone wants real fun, one could make it platform independent by utilizing xdg-mime for finding out the default browser and then add the necessary command options, e.g. for a browser like chrome.

    xdg-mime to be desktop environment independent.

    But nice idea and a good lil helper script. 👍
Add Comment