#!/bin/sh set -o pipefail while true; do swaymsg -t subscribe -m '["window"]' \ | stdbuf -oL jq --unbuffered -M -r '.container.name // empty' \ | stdbuf -oL cut -c -80 \ | stdbuf -oL sed -e 's/ *$//' done