From ae33b20c6536b6d5371797f2518b33776bd1d423 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 13 Jul 2021 01:10:51 -0500 Subject: [PATCH] Switch to custom Iosevka font, other fixes --- common/bin/dns-cleaner | 2 +- common/bin/dns-deleter | 9 ++++- common/bin/dns-deleter-matching | 11 ++++++ common/colors/vconsole | 48 ------------------------ common/fish/config.fish | 1 - common/kitty/kitty.conf | 14 ++++--- common/{colors/shell => terminal_colors} | 0 7 files changed, 28 insertions(+), 57 deletions(-) create mode 100644 common/bin/dns-deleter-matching delete mode 100755 common/colors/vconsole rename common/{colors/shell => terminal_colors} (100%) diff --git a/common/bin/dns-cleaner b/common/bin/dns-cleaner index 442b141..7b065de 100755 --- a/common/bin/dns-cleaner +++ b/common/bin/dns-cleaner @@ -4,4 +4,4 @@ set -x -e API="https://api.netlify.com/api/v1" TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" URL="$API/dns_zones/lyte_dev/dns_records?access_token=$TOKEN" -curl -sL "$URL" > /tmp/zone.json +curl -vvv -sL "$URL" > /tmp/zone.json diff --git a/common/bin/dns-deleter b/common/bin/dns-deleter index 953fef1..c4e92af 100755 --- a/common/bin/dns-deleter +++ b/common/bin/dns-deleter @@ -2,10 +2,15 @@ API="https://api.netlify.com/api/v1" TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" +counter=0 while read -r l; do - set -x -e + counter=$((counter+1)) ID="$(echo $l | awk '{print $2}')" URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" - curl -X DELETE -sL "$URL" & + curl -vvv -X DELETE -sL "$URL" 2>&1 | grep 'ratelimit-remaining' & + echo "counter: $counter" + jq 'del(.[] | select(.id == "'$ID'"))' /tmp/zone.json > /tmp/zone2.json + mv /tmp/zone2.json /tmp/zone.json + [ $counter -gt 480 ] && break done wait diff --git a/common/bin/dns-deleter-matching b/common/bin/dns-deleter-matching new file mode 100644 index 0000000..cf6c334 --- /dev/null +++ b/common/bin/dns-deleter-matching @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +API="https://api.netlify.com/api/v1" +TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" +while read -r l; do + set -x -e + ID="$(echo $l | awk '{print $2}')" + URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" + curl -X DELETE -sL "$URL" +done +wait diff --git a/common/colors/vconsole b/common/colors/vconsole deleted file mode 100755 index 0d95e6a..0000000 --- a/common/colors/vconsole +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -black="111111" # black -red="f92672" # red -green="a6e22e" # green -yellow="f4bf75" # yellow -blue="66d9ef" # blue -magenta="ae81ff" # magenta -cyan="a1efe4" # cyan -white="cccccc" # white -black2="75715e" # black2 -white2="f8f8f8" # white2 - -c() { - c="${1}"; shift - for n in "$@"; do - printf "\e]P%d%s" "$n" "$c"; - done -} - -c $black 0 -c $red 1 9 -c $green 2 A -c $yellow 3 B -c $blue 4 C -c $magenta 5 D -c $cyan 6 E -c $white 7 -c $black2 8 -c $white2 F - -if [ -x /sbin/clear ]; then - /sbin/clear -else - printf "\e[H\e[2J" -fi - -unset -f c -unset black -unset red -unset green -unset yellow -unset blue -unset magenta -unset cyan -unset white -unset black2 -unset white2 diff --git a/common/fish/config.fish b/common/fish/config.fish index 68d5af2..c29afb8 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -13,7 +13,6 @@ end status --is-interactive || exit -test (uname) = Linux && $DOTFILES_PATH/common/colors/vconsole for f in key-bindings colors prompt aliases source $FISH_PATH/$f.fish end diff --git a/common/kitty/kitty.conf b/common/kitty/kitty.conf index 3901a49..3f6429c 100644 --- a/common/kitty/kitty.conf +++ b/common/kitty/kitty.conf @@ -1,16 +1,20 @@ -font_family Iosevka -bold_font Iosevka Heavy +font_family iosevkalyte +# bold_font Iosevka Heavy +# italic_font Iosevka Italic +# bold_italic_font Iosevka Heavy Italic font_size 11.0 -font_features Iosevka -calt +FSTA +MTLB +HSKL +JSPT +dlig +# use `kitty + list-fonts --psnames` to get the font's PostScript name +# font_features IosevkaLyte +# font_features Iosevka-Heavy +calt +dlig +# font_features Iosevka-Italic +calt +dlig +# font_features Iosevka-Heavy-Italic +calt +dlig allow_remote_control yes repaint_delay 5 input_delay 5 sync_to_monitor yes -disable_ligatures always - adjust_line_height 0 window_padding_width 10.0 window_margin_width 0.0 diff --git a/common/colors/shell b/common/terminal_colors similarity index 100% rename from common/colors/shell rename to common/terminal_colors