#!/usr/bin/env bash # Use with rofi -show "GitHub Starred" -modes "GitHub Starred:/home/jas/bin/rofistarred" USERNAME="hyperreal64" STARRED_FILE="${HOME}/.github-starred" if [ ! -f "$STARRED_FILE" ]; then curl -s "https://api.github.com/users/${USERNAME}/starred?per_page=1000" | jq '.[] | .full_name' | tr -d '"' | tee "$STARRED_FILE" fi starred_repos=$(cat "$STARRED_FILE") if [ "$#" -eq 1 ]; then xdg-open "https://github.com/$1" else echo "$starred_repos" fi