Make it available for first run if no file is present.

This commit is contained in:
Emre AKYÜZ 2023-04-23 09:36:19 +03:00 committed by GitHub
parent 3bf45ee80d
commit 6803d72cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,8 @@
FILE="~/.local/share/larbs/urlquery"
[ -s "$FILE" ] || echo "[]" > "$FILE"
OBJ_SELECTED=$(jq -r ".[][0]" "$FILE" | rofi -dmenu -l 10 -p "Select a website")
ENTRY_EXISTS=$(jq -r --arg sel "$OBJ_SELECTED" 'map(.[0] == $sel) | any' "$FILE")