{"id":51528333,"url":"https://github.com/thanegill/alfred-windows-app","last_synced_at":"2026-07-09T00:01:13.009Z","repository":{"id":365992197,"uuid":"1274637762","full_name":"thanegill/alfred-windows-app","owner":"thanegill","description":"Alfred workflow to search and open saved bookmarks from Windows App (Microsoft's macOS remote desktop client)","archived":false,"fork":false,"pushed_at":"2026-06-19T20:08:53.000Z","size":269,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T20:18:16.738Z","etag":null,"topics":["alfred","alfred-workflow","alfredapp","macos","microsoft-remote-desktop","rdp","remote-desktop","ruby","windows-app"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thanegill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-19T18:17:33.000Z","updated_at":"2026-06-19T20:09:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thanegill/alfred-windows-app","commit_stats":null,"previous_names":["thanegill/alfred-windows-app"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thanegill/alfred-windows-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanegill%2Falfred-windows-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanegill%2Falfred-windows-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanegill%2Falfred-windows-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanegill%2Falfred-windows-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanegill","download_url":"https://codeload.github.com/thanegill/alfred-windows-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanegill%2Falfred-windows-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35281841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alfred","alfred-workflow","alfredapp","macos","microsoft-remote-desktop","rdp","remote-desktop","ruby","windows-app"],"created_at":"2026-07-09T00:01:12.251Z","updated_at":"2026-07-09T00:01:12.981Z","avatar_url":"https://github.com/thanegill.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alfred-windows-app\nSimple Alfred workflow to search and open saved bookmarks from [Windows App](https://apps.apple.com/us/app/windows-app/id1295203466) — Microsoft's macOS remote desktop client, formerly named *Microsoft Remote Desktop*. Based on https://github.com/ctwise/alfred-workflows/tree/master/remote-desktop\n\n**Requires [Alfred](https://www.alfredapp.com/) with the Powerpack, and Windows App installed in `/Applications`.**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screenshot.png\" width=\"493\" alt=\"Alfred showing the rdp keyword listing saved Windows App bookmarks, each row with the desktop name and an Open desktop subtitle\"\u003e\n\u003c/p\u003e\n\n## Usage\nTrigger Alfred and use the `rdp` keyword:\n- `rdp ` — list every saved bookmark.\n- `rdp \u003cname\u003e` — filter bookmarks whose name contains `\u003cname\u003e`.\n- `rdp \u003cuser@host[:port]\u003e` — connect directly to an ad-hoc host (IP or FQDN) that isn't saved as a bookmark. A **Connect to …** item appears alongside any matching bookmarks. The username and port are optional: `rdp 192.168.4.3`, `rdp me@192.168.4.3`, and `rdp me@host.example.com:3390` all work. With no username, Windows App prompts for credentials.\n\nSelect a result and press Enter to open the session in Windows App.\n\n## Why?\nThe version in the source repository was no longer maintained and no longer functional. It also relied on `osascript` to bring Microsoft Remote Desktop to the foreground and simulate keypresses to open a session, which did not always work reliably. This workflow instead drives Windows App through its [command line interface](https://learn.microsoft.com/en-us/windows-app/cli-macos), which exposes the same `--script bookmark` commands the old app used.\n\n## How?\nEverything lives in [`windows_app.rb`](windows_app.rb), which Alfred invokes with a subcommand:\n- `windows_app.rb list \"{query}\"` (the Script Filter): runs `--script bookmark list` to get the saved bookmarks as CSV, filters by query, and returns matches to Alfred as Script Filter JSON, letting you search through your bookmarks. An empty query returns every bookmark, so the keyword alone lists them all. When the query parses as `[user@]host[:port]`, it also appends a **Connect to …** item whose arg is an `adhoc:\u003ctarget\u003e` token (not a URI — see below).\n- `windows_app.rb open \"{query}\"` (the Action): if the arg is an `adhoc:\u003ctarget\u003e` token, it builds the `rdp://` URI from `\u003ctarget\u003e` and `open`s it directly; otherwise it treats the arg as a bookmark ID, runs `--script bookmark export \u003cid\u003e --uri`, and `open`s that. Either way Windows App launches the session.\n\nThe file is organized into a few units:\n- `RemoteTarget` parses an ad-hoc `[user@]host[:port]` target and builds the `rdp://` URI. Windows App rejects a minimal `full address`+`username` URI with *\"The URL is not valid\"*, so it emits the app's full default attribute set (captured from `--script bookmark export`) with `full address`, the optional port, and `username` substituted in.\n- `WindowsApp` wraps the binary (`bookmarks`, `export_uri`) and the OS `open` (`open_uri`). It locates the binary with `WINDOWS_APP` → the standard `/Applications` path → a Spotlight (`mdfind`) lookup by bundle id `com.microsoft.rdc.macos` → the standard path as a fallback; the fast common case avoids any subprocess since the Script Filter runs per keystroke. Opening uses `open -b com.microsoft.rdc.macos` so the session lands in Windows App even if another app is registered for the `rdp://` scheme.\n- `Workflow` is the two commands (`list`/`open`) built on those.\n- `Feedback` builds the Script Filter JSON.\n\nThe ad-hoc item passes the bare target (not a pre-built URI) through Alfred so the URI's `\u0026`/`%` characters — which Alfred mangles in argument substitution — are only ever produced inside Ruby, just like the bookmark path.\n\n## Testing\nRun the unit tests on the system Ruby:\n\n```sh\nruby test/windows_app_test.rb\n```\n\nLint with [RuboCop](https://rubocop.org/) (config in [`.rubocop.yml`](.rubocop.yml)). The system Ruby (2.6) is too old for current RuboCop, so run it through a newer Ruby — e.g. via Nix:\n\n```sh\nnix-shell -p rubocop --run rubocop\n```\n\n## Installation\nDownload the latest [`Windows-App.alfredworkflow`](https://github.com/thanegill/alfred-windows-app/releases/latest) and double-click it to import into Alfred. It runs on the system Ruby that ships with macOS, so there's nothing to build.\n\n## Demo data\n`windows_app.rb` reads the Windows App binary path from the `WINDOWS_APP` environment variable, defaulting to `/Applications/Windows App.app/Contents/MacOS/Windows App`. Point it at any executable that speaks the same `--script bookmark` interface.\n\n[`test/fake-windows-app`](test/fake-windows-app) is such a stand-in: it returns a fixed set of fake bookmarks, so you can demo or screenshot the workflow without exposing your real desktops. To use it, set `WINDOWS_APP` to its absolute path — either inline:\n\n```sh\nWINDOWS_APP=\"$PWD/test/fake-windows-app\" ruby windows_app.rb list prod\n```\n\nor, to drive Alfred itself, add it under the workflow's **Configuration → Workflow Environment Variables** in Alfred, then remove it when you're done.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanegill%2Falfred-windows-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanegill%2Falfred-windows-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanegill%2Falfred-windows-app/lists"}