bin/favicon: utilise timg and save locally

This commit is contained in:
xeruf 2022-01-25 13:52:59 +01:00
parent 79c647bbbf
commit 07fade09c3
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
#!/bin/bash
# Extract the icon of a given page using duckduckgo
xdg-open "https://icons.duckduckgo.com/ip2/$1.ico"
url=$(echo $1 | sed 's|https\?://||' | cut -d '/' -f1)
file="/tmp/favicon-$url.ico"
wget -nv -O "$file" "https://icons.duckduckgo.com/ip2/$url.ico"
echo "$file"
timg "$file"