Helper commands for browsing and viewing files on a remote server from the terminal.
terminal-notifier(for sync notifications) —brew install terminal-notifierviu(optional, for--view) — install withcargo install viu
Place rsh.sh in the directory you want to browse, then:
./rsh.sh --last # Most recent filename
./rsh.sh --last 5 # Last 5 files
./rsh.sh --today # Files modified today
./rsh.sh --search term # Find files by name
./rsh.sh --count # Total number of files
./rsh.sh --view # View the latest image in the terminal (requires viu)
./rsh.sh --view foo.png # View a specific image
./rsh.sh --view-latest # Quick preview of the latest screenshotSet REMOTE_SYNC_DIR to override the target directory (defaults to the script's location).
sync-notify.sh watches Syncthing's Events API and fires a macOS notification when a folder finishes syncing to a remote device.
cp .sync-notify.conf.example .sync-notify.conf
# Edit .sync-notify.conf with your Syncthing API key and folder IDFind your API key in the Syncthing GUI under Actions > Settings > API Key. The folder ID is shown under each folder's name in the GUI.
./sync-notify.sh # Run in foreground
./sync-notify.sh --install # Install as a background launchd agent
./sync-notify.sh --uninstall # Remove the agent
./sync-notify.sh --status # Check if the agent is runningNotifications are delivered via terminal-notifier. To receive them while a Focus mode is active:
- Open System Settings > Focus
- Select your active Focus profile
- Under Allowed Notifications, click Apps
- Add terminal-notifier to the list