1 2 3 4 5 6 7 8 9 10
#!/bin/sh WCLONG="$(crcparse WC)" WC="$(basename "$WCLONG")" OUTPUTS="$(wlr-randr | grep -B2 'Enabled: yes' | sed '/^\s\s*/d;/^--/d' | cut -d' ' -f1)" echo "$OUTPUTS" | while read i; do sed 's/%%DISPLAY%%/'$i'/' "$XDG_CONFIG_HOME"/waybar/config-$WC > "$XDG_CONFIG_HOME"/waybar/config-$WC-$i done