Configuration

The app can be configured by changing values in TOML-based configuration file. The config file is located under your home directory ~/.config/eligere/.eligere.toml.

How to edit the config from the app

If it is not that easy for you to find and edit the config via terminal - you can use Copy config path button and edit config button near right from the main view.

edit the config from UI

When you run the app for the first time - it will copy default.toml as example and scaffold for you for inspiration to change. Once the app is launched - you can edit the config like you want.

Config example
useOnlyRunningBrowsers = false
stripTrackingAttributes = true
expandShortenURLs = true
pinningSeconds = 30
logLevel = "warning"

[[browsers]]
name = "Safari"
shortcut = "s"
apps = ["Messages"]
domains = ["apple.com"]

Global properties

There are properties defined on the first level and some defined inside browsers[<index>] level.

If there is a problem with parsing a configuration - the error will be written inside the log with error level. For some information please follow troubleshooting guide

useOnlyRunningBrowsers

possible values: true/false

When the value is true - UI popover to select a browser will be filtered and show only the apps that are launched already. E.g., if you define 3 browsers and only 2 are running - with this property turned on the UI will show only these 2 options.

stripTrackingAttributes

possible values: true/false

Eligere can remove some tracking parameters from URLs. Currently supported parameter prefixes are "utmn_", "utm_", "gclid", "fbclid", "attribution_id". If they are exist in the URL - Eligere can remove them before proxy URL into destination web browser.

Keep in mind

If expandShortenURLs is set to true as well - stripping will be applied twice: to shortened URL and to the destination one.

It cannot track prevent you from being tracked by URL shorteners as they track while expanding the URL, but you can get rid of some others

expandShortenURLs

possible values: true/false

When set to true Eligere will reach the destination URL under the shorten one. This is useful in combination with stripTrackingAttributes. Eligere “expands” the URL, takes the destination one, than it can remove tracking attributes, and then proxy it into web browser.

pinningSeconds

possible values: number of seconds starting from 1

This values defines number of seconds selected browser will behave like a default one. Once you open a browser via shortcut or with mouse click holding Shift key - a browser will be pinned for pinningSeconds time. It means that all unknown URLs will be automatically open in selected browser during pinningSeconds timeframe. Once this timeframe is over - Eligere will start to show you a UI pop-up to select a browser.

In case browser::default is defined - this property does not make any difference as browser selection UI won’t be shown at all.

logLevel

possible values: debug/warning/error/critical

This one defines the level of details the app writes into log. Default levels is set to warning, which means warning, error and critical messages will be logged.

It is not recommended to use debug unless you need to send the logs to devs to, well, debug some issues with your setup.

Troubleshooting guide

For some information please follow troubleshooting guide

Browser properties

browsers field contains an array of objects, each represents one browser Eligere should use.

name

required*

String value of a browser. It should be the same as it is named inside Applications/ folder, but without .app extension. E.g., for Safari.app the name property should be Safari. For Brave browser it is Brave Browser, unless you rename it manually.

This name is used to construct path to the app itself to be used by Eligere.

shortcut

optional

Value represents a character to be used from browser selection UI. Should be 1 symbol. Having 2+ length string won’t work. It could be a alphabet character like “shortcut”:“a” or “shortcut”:“s”; or it could be a number like “shortcut”:“1”.

shortcut example

By default Eligere generates a shortcut value as first lowercased character from browser name. For Safari it is s, for Google Chrome it is g. But you can change to anything you prefer.

apps

optional

possible values: string values of apps.

You can make a mapping between a source app from where you open an URL and a browser. E.g., you want all links from Slack go into the same browser no matter of other domains rule. apps contains an array of app’s name. The name should be the same as it is inside /Applications/ folder. E.g., “Slack”, “Discord”, kitty

apps has higher priority than domains. E.g., you open github.com from Slack and you have a rule for Slack - github.com will be opened in a browser that has Slack inside apps ignoring if github is added into domains somewhere else.

Example

    apps = ["Discord", "Telegram"]

domains

optional

possible values: string values of domains.

Currently only domains are supported, no wild-cards, no path masking (but will be in future). You can map a domain to be opened in a specific browser. Supported all domain levels, even com can be used as rule.

Example

domains = [
    "github.com",
    "youtube.com",
]

Just use only domains, do not use protocol like http(s)://. It will not work then.

In future wild card will be supported, but it’s in progress

default

optional

possible values: true/false

A browser can be defined as default one. All unknown URLs will be redirected into the browser with default == true. In that case you won’t see a browser selection UI. It is useful when you use one browser most of the time, but you need others for a specific needs. E.g., you can declare a browser for localhost

[[browsers]]
shortcut = "m"
name = "Min"
default = true
domains = ["localhost"]

hidden

optional

possible values: true/false

When hidden is set to true - the browser will be used to process domains from domains array, but it won’t be shown at browser selection UI.

Example

[[browsers]]
shortcut = "m"
name = "Min"
hidden = true
domains = ["localhost"]

false

shown browser example

true

hidden browser example

But if you will try to open localhost - Min will be opened anyway as it’s defined inside domains

arguments

optional

possible values: array of strings

This is the proxy for NSWorkspace.OpenConfiguration that allows to pass additional launch parameters into the browser. From documentation:

If the calling process is sandboxed, the system ignores the value of this property.

Eligere has no control over it, it just passed the values.

Example:

arguments = ["arg1", "--arg2"]