dotfiles/raycast-scripts/char-count.sh
DannyDannyDanny 463249961e fix(nixos): replace removed light option and harden char-count script
Restore flake checks by removing deprecated `programs.light` from sunken-ship and switching to brightnessctl guidance. Also clean up flake formatting and make the Raycast char-count script safer for empty input.

Made-with: Cursor
2026-03-24 12:58:40 +01:00

18 lines
471 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title char count
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "Text to count" }
# Documentation:
# @raycast.description counts chars in selected text
# @raycast.author DannyDannyDanny
# @raycast.authorURL https://raycast.com/DannyDannyDanny
printf '%s' "${1:-}" | wc -c | awk '{ print $1 }'