Register names for CraftOS-PC computers and then launch them with fzf.
- CraftOS-PC (with the CLI accessible)
- awk (GNU awk was used in development, but any compliant version should suffice)
- fzf (for picking the computer from the registry)
- jq (for manipulating the registry)
Add this to your .profile
/.bashrc
/.zshrc
# Path to the JSON registry file, feel free to adjust as desired
export CRAFTOS_SELECT_REGISTRY_FILE="$HOME/.local/share/craftos-select/registry.json"
source /path/to/craftos-select
source /ptah/to/craftos-register
Then, relaunch your shell and run this:
craftos-register <id of computer> "<name of computer, spaces allowed>"
# Run this as many times as you want, or edit the registry file manually
craftos-select
# Pick the computer you want
# CraftOS-PC opens
# Script exits