#!/usr/bin/env bash set -euo pipefail BOOKMARKS_FILE="$DOTFILES_REPO/bookmarks.txt" if [ ! -f "$BOOKMARKS_FILE" ] || [ ! -s "$BOOKMARKS_FILE" ]; then notify-send "Bookmarks" "Your bookmarks file is empty or missing." exit 1 fi SELECTION=$(cut -d'|' -f1 "$BOOKMARKS_FILE" | rofi -dmenu -p "Go To:") if [ -z "$SELECTION" ]; then exit 0 fi URL=$(grep "^$SELECTION|" "$BOOKMARKS_FILE" | head -n 1 | cut -d'|' -f2) if [ -n "$URL" ]; then firefox "$URL" & else notify-send "Error" "Could not resolve the URL for: $SELECTION" fi