{"id":19234625,"url":"https://github.com/vimpostor/sphere","last_synced_at":"2025-02-23T13:10:00.015Z","repository":{"id":164933256,"uuid":"640268151","full_name":"vimpostor/sphere","owner":"vimpostor","description":"A browser proxy application","archived":false,"fork":false,"pushed_at":"2023-12-25T23:03:24.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T01:12:11.689Z","etag":null,"topics":["browser","proxy","uri-scheme"],"latest_commit_sha":null,"homepage":"https://blog.mggross.com/extending-scheme-handlers/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vimpostor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-13T14:27:45.000Z","updated_at":"2024-11-13T14:23:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"0888f46e-badf-4e88-a90a-654f6a423c36","html_url":"https://github.com/vimpostor/sphere","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpostor%2Fsphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpostor%2Fsphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpostor%2Fsphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimpostor%2Fsphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimpostor","download_url":"https://codeload.github.com/vimpostor/sphere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240317431,"owners_count":19782389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","proxy","uri-scheme"],"created_at":"2024-11-09T16:14:28.915Z","updated_at":"2025-02-23T13:09:59.969Z","avatar_url":"https://github.com/vimpostor.png","language":"Haskell","readme":"# Sphere\n\nSphere is a Linux browser proxy application, that can register different handlers for `http/https` URI schemes, similar to how [Android apps can register to be the default app for just specific https URLs](https://developer.android.com/guide/topics/manifest/data-element#path) by setting `android:pathAdvancedPattern`.\n\nIt works by registering sphere as the default browser, which acts as a proxy that delegates to the correct final application via rules given in a configuration file.\n\nThe configuration file is located at `~/.config/sphere/config` and has a very simple syntax `\u003crule_regex\u003e \u003chandler\u003e`. The file is parsed from top to bottom and the first line where `\u003crule_regex\u003e` matches the given URL, will cause the corresponding `\u003chandler\u003e` to be executed.\n\n# Example\n\nThe following example will configure Chromium as the default browser, while opening Spotify links directly in the [Spotify desktop application](https://github.com/kpcyrd/spotify-launcher):\n\n```\n^https://open.spotify.com/(artist|album|track|search)/[[:alnum:]]+\\??.*$ spotify-launcher\n.* chromium\n```\n\nNote that the rules are tried from top to bottom, so the default browser should usually come last with a Regex that matches everything.\n\n# Installation\n\nArch Linux users can simply install the [sphere-git](https://aur.archlinux.org/packages/sphere-git) package.\n\nTo build from source, clone the repo and run:\n\n```bash\ncabal build\ncabal install\n```\n\n# Usage\n\nFirst ensure that Sphere is set as your default browser:\n\n```\nxdg-settings set default-web-browser sphere.desktop\n```\n\nThen configure the rules in `~/.config/sphere/config`.\n\n## Demo\n\nhttps://github.com/vimpostor/sphere/assets/21310755/2895bf5d-7dea-4cab-862d-5accdbbd4697\n\nAlso read my [blog post about this](https://blog.mggross.com/extending-scheme-handlers/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimpostor%2Fsphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimpostor%2Fsphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimpostor%2Fsphere/lists"}