2024-08-27 14:13:03 +02:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
function mkicon
|
|
|
|
set -l filename $argv[1]
|
|
|
|
set -l icon_name (basename $filename .svg)
|
|
|
|
set -l icon_base64 (svgcleaner --stdout $filename 2>/dev/null | base64 -w0)
|
2024-08-27 14:13:03 +02:00
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
printf "--icon-%s: url('data:image/svg+xml;base64,%s');\n" "$icon_name" "$icon_base64"
|
|
|
|
end
|
|
|
|
|
|
|
|
for arg in $argv
|
|
|
|
mkicon $arg
|
|
|
|
end
|