summaryrefslogtreecommitdiff
path: root/gen_waybar_confs.sh
blob: 36befae4309ed89375fce31c3f8abc16ccc39e01 (plain)
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