From 58d93203806dbe561e1fa66e07e6fbd7e6ae858c Mon Sep 17 00:00:00 2001 From: Amolith Date: Fri, 6 Feb 2026 12:57:49 -0700 Subject: [PATCH] feat(polybar): add voxtype XDG state logging - Respect XDG_STATE_HOME for log file location - Create state directory before launching voxtype - Redirect voxtype output to log file instead of discarding - Remove opx wrapper from voxtype launch command --- dot_config/polybar/executable_voxtype-polybar.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dot_config/polybar/executable_voxtype-polybar.sh b/dot_config/polybar/executable_voxtype-polybar.sh index b73d2d5db83f8676cb37cb5b1a5aaf0d3e556e92..c66158b2fcc2c10b202ee339f49174efd383c411 100644 --- a/dot_config/polybar/executable_voxtype-polybar.sh +++ b/dot_config/polybar/executable_voxtype-polybar.sh @@ -10,6 +10,10 @@ # color_primary - accent/alert color (used for recording) # color_secondary - secondary accent (used for transcribing) +# Respect XDG_STATE_HOME for log location +state_dir="${XDG_STATE_HOME:-$HOME/.local/state}/voxtype" +log_file="$state_dir/voxtype.log" + output=$(voxtype status --format json 2>/dev/null) if [[ -z "$output" ]]; then @@ -22,7 +26,8 @@ alt=$(echo "$output" | jq -r '.alt // "idle"') # Handle toggle action if [[ "$1" == "toggle" ]]; then if [[ "$alt" == "stopped" ]]; then - setsid fish -c "opx voxtype" >/dev/null 2>&1 & + mkdir -p "$state_dir" + setsid fish -c "voxtype" >>"$log_file" 2>&1 & else voxtype record toggle fi