{"id":50398701,"url":"https://github.com/ggfevans/nfs-swiftbar","last_synced_at":"2026-05-30T22:01:57.766Z","repository":{"id":360325274,"uuid":"1249619603","full_name":"ggfevans/nfs-swiftbar","owner":"ggfevans","description":"macOS SwiftBar plugin for NFS autofs mount status with one-click sudo recovery","archived":false,"fork":false,"pushed_at":"2026-05-26T00:03:33.000Z","size":191,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T01:20:40.200Z","etag":null,"topics":["autofs","bitbar","homelab","macos","menubar","nfs","swiftbar","xbar"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/ggfevans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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-05-25T22:24:29.000Z","updated_at":"2026-05-26T00:03:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ggfevans/nfs-swiftbar","commit_stats":null,"previous_names":["ggfevans/nfs-swiftbar"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ggfevans/nfs-swiftbar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fnfs-swiftbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fnfs-swiftbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fnfs-swiftbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fnfs-swiftbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggfevans","download_url":"https://codeload.github.com/ggfevans/nfs-swiftbar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fnfs-swiftbar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33711018,"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-05-30T02:00:06.278Z","response_time":92,"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":["autofs","bitbar","homelab","macos","menubar","nfs","swiftbar","xbar"],"created_at":"2026-05-30T22:01:57.552Z","updated_at":"2026-05-30T22:01:57.756Z","avatar_url":"https://github.com/ggfevans.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nfs-swiftbar\n\n[![lint](https://github.com/ggfevans/nfs-swiftbar/actions/workflows/lint.yml/badge.svg)](https://github.com/ggfevans/nfs-swiftbar/actions/workflows/lint.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n![Platform: macOS](https://img.shields.io/badge/platform-macOS-000000?logo=apple\u0026logoColor=white)\n\nA [SwiftBar](https://github.com/swiftbar/SwiftBar) plugin that shows the status of\nNFS shares mounted by macOS autofs, with sudo actions to recover a stale mount.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/nfs-swiftbar-screenshot.png\" alt=\"nfs-swiftbar menu\" width=\"418\"\u003e\n\u003c/p\u003e\n\n## Why\n\nUnder autofs, shares mount on access and unmount after an idle period, so nothing\ntells you what is currently mounted or whether a server is up. This plugin shows\nthat in the menu bar. Its background poll never reads the mount paths, so it does\nnot keep idle shares alive.\n\n## Status\n\nShares are read from `/etc/auto_direct`. Each one renders as:\n\n| Dot | State | Meaning |\n|-----|-------|---------|\n| 🟢 | active | mounted now |\n| ⚪️ | idle | reachable but not mounted (normal after the idle timeout) |\n| 🔴 | unreachable | nfsd (TCP 2049) not answering |\n\nThe menu-bar icon is green if any share is active, red if any host is\nunreachable, otherwise grey. The header shows `N/total active`.\n\n## Actions\n\nPer share (sudo actions use a single admin prompt):\n\n| Action | Effect |\n|--------|--------|\n| Reveal in Finder | opens the path, which mounts it |\n| Show free space | reports `df` output (active shares only) |\n| Unmount (sudo) | `umount -f`, no remount (active shares only) |\n| Force remount (sudo) | `umount -f`, then re-access to mount fresh |\n\nRoot menu:\n\n| Action | Effect |\n|--------|--------|\n| Force remount all (sudo) | remount every share in one prompt |\n| Unmount all (sudo) | unmount every share in one prompt |\n\n## Requirements\n\n- macOS with [SwiftBar](https://github.com/swiftbar/SwiftBar).\n- NFS shares in an autofs direct map at `/etc/auto_direct` (see Configuration).\n- Stock tools: `bash`, `mount`, `nc`, `df`, `osascript`, `perl`.\n\n## Configuration\n\nThe plugin parses `/etc/auto_direct`. Each line is `mountpoint  options  host:export`:\n\n```\n/Volumes/media      -fstype=nfs,resvport,rw,soft,intr,tcp   nas.example.lan:/export/media\n/Volumes/backups    -fstype=nfs,resvport,rw,soft,intr,tcp   nas.example.lan:/export/backups\n```\n\nWire it into the automounter in `/etc/auto_master`:\n\n```\n/-    auto_direct\n```\n\nThen run `sudo automount -vc`. To use a different map file, edit the `MAP`\nvariable at the top of `nfs.30s.sh`.\n\n## Install\n\n```bash\ngit clone https://github.com/ggfevans/nfs-swiftbar.git\nln -sf \"$PWD/nfs-swiftbar/nfs.30s.sh\" \"$HOME/Documents/SwiftBar/nfs.30s.sh\"\n```\n\nConfirm your SwiftBar plugin directory with\n`defaults read com.ameba.SwiftBar PluginDirectory`, then run SwiftBar \u003e Refresh\nAll. The `30s` in the filename sets the refresh interval; rename it (e.g.\n`nfs.1m.sh`) to change it.\n\n## Idle behaviour\n\nThe poll reads the `mount` table and probes TCP 2049. It never runs `ls`, `stat`\nor `df` on a mount path, since that would re-trigger the automounter on every\ncycle. `df` (Show free space) and path access (Reveal in Finder) run only on a\nclick. Unmount and remount use `umount -f` so an unreachable server cannot hang\nthem, and the re-access is bounded by a `perl` alarm.\n\n## Development\n\n```bash\n./nfs.30s.sh --selftest\n```\n\nRenders all three states from fixture data without touching real mounts. The\nlive poll and `--selftest` share one function (`emit_share`), so the output\nmatches.\n\n## Security\n\nTo report a vulnerability, see [SECURITY.md](SECURITY.md). Please use GitHub's\nprivate vulnerability reporting rather than a public issue.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggfevans%2Fnfs-swiftbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggfevans%2Fnfs-swiftbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggfevans%2Fnfs-swiftbar/lists"}