dotfiles/.config/kitty/kitty-themes/.tools/extract-vscode.sh

6 lines
281 B
Bash
Raw Normal View History

2022-04-07 09:23:20 +02:00
#!/usr/bin/env bash
theme=$1
jq ".colors | to_entries | map(select(.key | match(\"terminal.*\"))) | map({(.key | gsub(\"\\\\.(?<a>.)\"; .a | ascii_upcase) | ltrimstr(\"terminal\") | sub(\"(?<a>.)\"; .a | ascii_downcase)):.value}) | add" < "$theme" > "terminal/${theme%.*}.json"