- commit
- 122cc8d
- parent
- 426393c
- author
- chasinglightning
- date
- 2025-07-24 14:29:08 -0400 EDT
update dict again
1 files changed,
+3,
-1
+3,
-1
1@@ -8,5 +8,7 @@ word=$(echo " " | dmenu -i -c -l 10)
2
3 if [ -n "$word" ]; then
4 response=$(curl -s --connect-timeout 5 --max-time 10 "https://api.dictionaryapi.dev/api/v2/entries/en_US/$word")
5- notif=$(echo $response | jq '.[]? | .meanings[]? | ["("+.partOfSpeech+") ", .definitions[]?.definition] | join(", ")' | dmenu -i -c -l 10 | xclip -selection clipboard)
6+ notif=$(echo $response | jq -r '[.[].meanings[] | {pos: .partOfSpeech, def: .definitions[].definition}] | .[:3].[] | "\n\(.pos). \(.def)"')
7+
8+ notify-send -t 40000 "$word" "$notif"
9 fi