From 82cb28249a7d73fc72615ccb5edb6c64c700d46e Mon Sep 17 00:00:00 2001 From: Andrew Galvan Date: Mon, 9 Mar 2026 13:13:36 -0700 Subject: [PATCH] update alacritty, yabai, and add test-anthropic-key script - Add Shift+Return keybinding to alacritty for escape sequence - Add Screen Studio and Screen Studio Beta to yabai unmanaged rules - Add test-anthropic-key utility script Co-Authored-By: Claude Sonnet 4.6 --- alacritty/.config/alacritty/alacritty.toml | 5 ++++ bin/.local/bin/test-anthropic-key | 27 ++++++++++++++++++++++ yabai/.yabairc | 2 ++ 3 files changed, 34 insertions(+) create mode 100755 bin/.local/bin/test-anthropic-key diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index 35104af..b535b52 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -54,3 +54,8 @@ y = 4 [general] live_config_reload = true import = ["/Users/drewjs/.config/alacritty/themes/catppuccin-mocha.toml"] + +[[keyboard.bindings]] +key = "Return" +mods = "Shift" +chars = "\u001b\r" diff --git a/bin/.local/bin/test-anthropic-key b/bin/.local/bin/test-anthropic-key new file mode 100755 index 0000000..81b4464 --- /dev/null +++ b/bin/.local/bin/test-anthropic-key @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# Test an Anthropic API key by making a minimal API call + +key="${1:-$ANTHROPIC_API_KEY}" + +if [[ -z "$key" ]]; then + echo "Usage: test-anthropic-key " + echo "Or set ANTHROPIC_API_KEY env var" + exit 1 +fi + +response=$(curl -s -w "\n%{http_code}" https://api.anthropic.com/v1/messages \ + --header "x-api-key: $key" \ + --header "anthropic-version: 2023-06-01" \ + --header "content-type: application/json" \ + --data '{"model":"claude-sonnet-4-5-20250929","max_tokens":10,"messages":[{"role":"user","content":"Hi"}]}') + +http_code=$(echo "$response" | tail -1) +body=$(echo "$response" | sed '$d') + +if [[ "$http_code" == "200" ]]; then + echo "Key is valid (HTTP $http_code)" +else + echo "Key failed (HTTP $http_code)" + echo "$body" + exit 1 +fi diff --git a/yabai/.yabairc b/yabai/.yabairc index f69f275..517090c 100755 --- a/yabai/.yabairc +++ b/yabai/.yabairc @@ -49,6 +49,8 @@ yabai -m rule --add app="Raycast" manage=off yabai -m rule --add app="^Music$" manage=off yabai -m rule --add app="^Calculator$" manage=off yabai -m rule --add app="^Microsoft Teams$" manage=off +yabai -m rule --add app="Screen Studio" manage=off +yabai -m rule --add app="Screen Studio Beta" manage=off yabai -m rule --add app="CleanShot" manage=off echo "yabai configuration loaded.."