#!/bin/sh printf "{\"version\":1}\n" printf "[\n" while true do printf "[" printf "{\"full_text\":\"%s\"}," "$(makoctl list | jq -r '.data[][0].summary.data | select(type == "string")')" printf "{\"full_text\":\"%s\"}," "$(swaymsg -t get_inputs | jq -r '[.[] | select(.type == "keyboard")][0] | .xkb_active_layout_name')" printf "{\"full_text\":\"%s\"}," "$(cat /sys/class/power_supply/BAT0/capacity)" printf "{\"full_text\":\"%s\"}," "$(date +%c)" printf "]," sleep 0.1 done