{"id":15007122,"url":"https://github.com/sonnyp/junction","last_synced_at":"2025-05-15T15:03:39.900Z","repository":{"id":39000083,"uuid":"372269701","full_name":"sonnyp/Junction","owner":"sonnyp","description":"Application/browser chooser","archived":false,"fork":false,"pushed_at":"2024-11-12T13:45:20.000Z","size":3467,"stargazers_count":502,"open_issues_count":53,"forks_count":35,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T00:53:07.253Z","etag":null,"topics":["desktop","flatpak","gjs","gnome","gtk","gtk4","linux","linux-app"],"latest_commit_sha":null,"homepage":"https://flathub.org/apps/re.sonny.Junction","language":"JavaScript","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/sonnyp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"sonnyp","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-05-30T16:57:07.000Z","updated_at":"2025-03-30T16:32:02.000Z","dependencies_parsed_at":"2023-10-16T14:08:05.008Z","dependency_job_id":"10b21ee7-38a0-408a-b884-ffd86c9f7ae1","html_url":"https://github.com/sonnyp/Junction","commit_stats":{"total_commits":214,"total_committers":23,"mean_commits":9.304347826086957,"dds":"0.15420560747663548","last_synced_commit":"9bdbffaba37b8a5d8ca1d3a8dc53fb5867646416"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnyp%2FJunction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnyp%2FJunction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnyp%2FJunction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonnyp%2FJunction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonnyp","download_url":"https://codeload.github.com/sonnyp/Junction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721898,"owners_count":20985084,"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":["desktop","flatpak","gjs","gnome","gtk","gtk4","linux","linux-app"],"created_at":"2024-09-24T19:04:04.248Z","updated_at":"2025-04-07T20:09:33.941Z","avatar_url":"https://github.com/sonnyp.png","language":"JavaScript","readme":"\u003cimg style=\"vertical-align: middle;\" src=\"data/icons/re.sonny.Junction.svg\" width=\"120\" height=\"120\" align=\"left\"\u003e\n\n# Junction\n\nJunction lets you choose the application to open files and links.\n\n![screenshot](data/screenshot.png)\n\n\u003ca href='https://flathub.org/apps/re.sonny.Junction'\u003e\u003cimg width='240' height='80' alt='Download on Flathub' src='https://flathub.org/api/badge?svg\u0026locale=en'/\u003e\u003c/a\u003e\n\n## Usage\n\nSet Junction as the default application for a resource and let it do the rest. Junction will pop up and offer multiple options to handle it.\n\n\u003cdetails\u003e\n  \u003csummary\u003eSet Junction as default browser\u003c/summary\u003e\n  \u003ccode\u003e\n  xdg-settings set default-web-browser re.sonny.Junction.desktop\n  \u003c/code\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSet Junction as default for all files\u003c/summary\u003e\n  \u003ccode\u003e\n   xdg-mime default re.sonny.Junction.desktop x-scheme-handler/file\n  \u003c/code\u003e\n\nPlease note that this may not be respected by all applications but the command `xdg-open` will.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSet Junction as default for png\u003c/summary\u003e\n  \u003ccode\u003e\n  xdg-mime default re.sonny.Junction.desktop image/png\n  \u003c/code\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSet Junction as default email composer\u003c/summary\u003e\n  \u003ccode\u003e\n  xdg-settings set default-url-scheme-handler mailto re.sonny.Junction.desktop\n  \u003c/code\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSet Junction as default folder opener\u003c/summary\u003e\n  \u003ccode\u003e\n  xdg-mime default re.sonny.Junction.desktop inode/directory\n  \u003c/code\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAPI\u003c/summary\u003e\n\nJunction has a very simple API that doesn't require any programming. To open any resource with Junction, even if it's not configured as the default application, simply use the following URI format `x-junction://$RESOURCE`. For examples\n\n- `x-junction://https://github.com`\n- `x-junction://~`\n- `x-junction://file:///etc/os-release`\n- `x-junction:///etc/os-release`\n\nYou can use this in web pages, the terminal, native applications and anything that is able to open URIs.\n\nIf Junction is installed - you can test this in the terminal with `xdg-open \"x-junction://file:///etc/os-release\"` and in the browser with `\u003ca href=\"x-junction://file:///etc/os-release\"\u003eTest Junction URI\u003c/a\u003e`.\n\n\u003c/details\u003e\n\n## Tips and tricks\n\n\u003cdetails\u003e\n  \u003csummary\u003eKeyboard navigation\u003c/summary\u003e\n\nUse the menu or `\u003cCtrl\u003e?` to learn about Keyboard usage. You can navigate the UI with the arrow keys too.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eOpen with multiple applications\u003c/summary\u003e\n\nUse Middle-click, Ctrl+Click, Ctrl+Enter or Ctrl+Space to keep Junction open - allowing you to open the resource in multiple applications.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eMake Junction appear in the center of the screen\u003c/summary\u003e\n\nOn GNOME you can make all new windows open in the center using\n\n```sh\ngsettings set org.gnome.mutter center-new-windows true\n```\n\nSee https://gitlab.gnome.org/GNOME/mutter/-/issues/246\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eUse Junction from the terminal\u003c/summary\u003e\n\nCreate a permant alias, for example `alias open=\"flatpak run re.sonny.Junction\"`.\n\nThen you can use `open my-file`.\n\nSee [How To Create Permanent Aliases In Linux?](https://fossbytes.com/alias-in-linux-how-to-use-create-permanent-aliases/)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAdd custom scripts to Junction\u003c/summary\u003e\n\nYou can add your own script to Junction by creating a `.desktop` file for it in `~/.local/share/applications`.\n\nSee https://wiki.archlinux.org/title/desktop_entries (distro agnostic).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eBrowser integration\u003c/summary\u003e\n\n\u003c!-- Drag the following [bookmarklet](https://en.wikipedia.org/wiki/Bookmarklet) to your browser bookmarks toolbar to create a button to open the current page in Junction.\n\nBookmarklet: \u003ca herf=\"javascript:window.location='x-junction://'+window.location\"\u003eJunction\u003c/a\u003e --\u003e\n\nCreate a bookmark with the following URL\n\n```\njavascript:window.location='x-junction://'+window.location\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eMultiple Firefox profiles\u003c/summary\u003e\n\nSee [Profile Manager - Create, remove or switch Firefox profiles](https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles)\n\nIf you want to be able to choose the Firefox profile to open the resource with, you can make desktop files for your Firefox profiles in `~/.local/share/applications`.\n\nHere is an example `~/.local/share/applications/firefox-work.desktop`\n\n```ini\n[Desktop Entry]\nVersion=1.0\nName=Firefox work\nExec=firefox -P work --class=firefox-work %u\nIcon=firefox\nTerminal=false\nType=Application\nStartupWMClass=firefox-work\nMimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;\nStartupNotify=true\n```\n\nSave, run `update-desktop-database ~/.local/share/applications`, enjoy.\n\n[Reference](https://github.com/sonnyp/Junction/issues/9)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eEnvironment variables in desktop files\u003c/summary\u003e\n\n```\n# Before\nExec=firefox %u\n# After\nExec=env MOZ_USE_XINPUT2=1 firefox %u\n```\n\n\u003c/details\u003e\n\n## Troubleshooting\n\n\u003cdetails\u003e\n  \u003csummary\u003eI can't distinguish between options with the same icon\u003c/summary\u003e\n\nWithin Junction, you can toggle `Show names` in the menu or hover the application with the mouse to display a tooltip.\n\nOtherwise, you can edit the desktop files to use distinctive icons, here are a some tools\n\n- [MenuLibre](https://flathub.org/apps/details/org.bluesabre.MenuLibre) GUI\n- [AppEditor](https://flathub.org/apps/details/com.github.donadigo.appeditor) GUI\n- [ArchWiki](https://wiki.archlinux.org/title/desktop_entries) advanced\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eMy app doesn't show up\u003c/summary\u003e\n\nIf the application was installed via Flatpak, the package manager or an other conventional way, feel free to [open an issue](https://github.com/sonnyp/Junction/issues/new/choose).\n\nMake sure the application desktop file has a `MimeType` key that matches the type of resource you want it to handle. For example if you want the application `~/.local/share/applications/my-custom-browser.desktop` to handle web content; add the following `MimeType=text/html;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;`.\n\nThe `[Desktop Entry]` of the `.desktop` file must be the first section as mandated by the specification.\n\nThe desktop filename should be unique. Junction can't display both `/usr/share/applicatins/firefox.desktop` and `~/.local/share/applications/firefox.desktop`. The second overrides the first.\n\nFinally - make sure to run `update-desktop-database ~/.local/share/applications` after installing a desktop file.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eWhere are desktop files located ?\u003c/summary\u003e\n\n- System `/usr/share/applications/`\n- User `~/.local/share/applications/`\n- Flatpak system `/var/lib/flatpak/exports/share/applications/`\n- Flatpak user `~/.local/share/flatpak/exports/share/applications/`\n- Snap `/var/lib/snapd/desktop/applications/`\n\n\u003c/details\u003e\n\n## In the media\n\n[softpedia.com - Nifty and useful app switcher called Junction](https://linux.softpedia.com/get/Desktop-Environment/Gnome/Junction-104196.shtml) - 05/2022\n\n[itsfoss.com](https://itsfoss.com/junction/) - 03/2022\n\n[youtube.com - Junction 1.4 | Choose the application to open files and links](https://www.youtube.com/watch?v=rfVd9bhRWxs) - 12/2021\n\n[linuxunplugged.com - Episode 433 The Lessons of Jellyfin](https://linuxunplugged.com/433?t=3183) - 11/2021\n\n## Translation\n\nIf you'd like to help translating Junction into your language, please head over to [Weblate](https://hosted.weblate.org/engage/junction/).\n\n\u003ca href=\"https://hosted.weblate.org/engage/junction/\"\u003e\n  \u003cimg src=\"https://hosted.weblate.org/widgets/junction/-/junction/multi-auto.svg\" alt=\"Translation status\" /\u003e\n\u003c/a\u003e\n\nThank you for your help!\n\n## Development\n\n```sh\ngit clone --recursive https://github.com/sonnyp/Junction.git\ncd Junction\nnpm install\nmake dev\n```\n\nMake changes and press `\u003cPrimary\u003e\u003cShift\u003eQ` on the Junction window to restart it.\n\nUse `\u003cPrimary\u003e\u003cShift\u003eI` to open the inspector.\n\n\u003c!-- To setup development version as default application first install the desktop file with\n\n```sh\ncd Junction\nmake dev\n``` --\u003e\n\nTo pass the tests you have to install a few dependencies\n\n```sh\n# Install development dependencies\nsudo dnf install --assumeyes npm flatpak make desktop-file-utils gjs gtk4-devel libadwaita-devel\ncd Junction\nnpm install\nflatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo\nflatpak install --user --assumeyes --noninteractive flathub org.freedesktop.appstream-glib\n\n# Run tests\nmake test\n```\n\n## Maintainer\n\n\u003cdetails\u003e\n  \u003csummary\u003eBookmarks\u003c/summary\u003e\n\n- [Flathub](https://flathub.org/apps/re.sonny.Junction)\n- [Flathub repo](https://github.com/flathub/re.sonny.Junction)\n- [Flathub builds](https://flathub.org/builds/#/apps/re.sonny.Junction)\n- [Flathub stats](https://klausenbusk.github.io/flathub-stats/#ref=re.sonny.Junction)\n- [Flathub API](https://flathub.org/api/v1/apps/re.sonny.Junction)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n  \u003csummary\u003ei18n\u003c/summary\u003e\n\n```sh\n# To update the pot file\n# xgettext -f po/POTFILES -o po/re.sonny.Junction.pot --no-wrap -cTRANSLATORS --from-code=UTF-8\n# sed -i \"s/Project-Id-Version: PACKAGE VERSION/Project-Id-Version: re.sonny.Junction/\" po/re.sonny.Junction.pot\nmeson compile re.sonny.Junction-pot -C build\n\n\n# To create a translation\n# msginit -i po/re.sonny.Junction.pot -o po/fr.po -l fr_FR.UTF-8\necho -n \" fr\" \u003e\u003e po/LINGUAS\nmeson compile re.sonny.Junction-update-po -C build\n\n# To update translations\n# msgmerge -U po/*.po po/re.sonny.Junction.pot\nmeson compile re.sonny.Junction-update-po -C build\n```\n\nSee https://github.com/sonnyp/Commit/pull/14#issuecomment-894070878\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003ePublish new version\u003c/summary\u003e\n\n- update metainfo and screenshot\n- `meson compile re.sonny.Junction-pot -C build`\n- `meson compile re.sonny.Junction-update-po -C build`\n- Update version in `meson.build`\n- git tag\n- flathub\n\n\u003c/details\u003e\n\n\u003c!--\n\n## Building\n\n\u003cdetails\u003e\n  \u003csummary\u003ehost\u003c/summary\u003e\n\n```sh\ncd Junction\nmeson --prefix $PWD/install build\nninja -C build install\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eFlatpak\u003c/summary\u003e\n\nUse [GNOME Builder](https://wiki.gnome.org/Apps/Builder) or\n\n```sh\ncd Junction\nflatpak-builder --user --force-clean --repo=repo --install-deps-from=flathub flatpak re.sonny.Junction.json\nflatpak --user remote-add --no-gpg-verify --if-not-exists Junction repo\nflatpak --user install --reinstall --assumeyes Junction re.sonny.Junction\n```\n\n\u003c/details\u003e\n\n## Install\n\n\u003cdetails\u003e\n\u003csummary\u003e\nuser\n\u003c/summary\u003e\n\n`~/.local/bin` must be in `$PATH`\n\n```sh\ncd Junction\nmeson --prefix ~/.local build\nninja -C build install\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nsystem\n\u003c/summary\u003e\n\n```sh\ncd Junction\nmeson build\nninja -C build install\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003euninstall\u003c/summary\u003e\n\n```sh\ncd Junction\nninja -C build uninstall\n```\n\n\u003c/details\u003e\n\n--\u003e\n\n## Copyright\n\n© 2021 [Sonny Piers](https://github.com/sonnyp)\n\n## License\n\nGPLv3. Please see [COPYING](COPYING) file.\n","funding_links":["https://ko-fi.com/sonnyp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonnyp%2Fjunction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonnyp%2Fjunction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonnyp%2Fjunction/lists"}