summaryrefslogtreecommitdiff
path: root/launch_waybar.sh
blob: 3e1233eca955b3c7c32723b9915f969e81cf65b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

killall waybar

WC="$(crcparse WC)"
CALLED="${1:-$WC}"

if type "wlr-randr"; then
  for m in $(wlr-randr | grep -B5 'Enabled: yes' | sed '/^\s\s*/d;/^--$/d' | cut -d' ' -f1); do
    waybar -c "$XDG_CONFIG_HOME"/waybar/config-$CALLED-$m &
  done
else
  waybar
fi