diff options
Diffstat (limited to '.config/waybar/scripts/layout.sh')
| -rwxr-xr-x | .config/waybar/scripts/layout.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.config/waybar/scripts/layout.sh b/.config/waybar/scripts/layout.sh index f7c7691..eef873a 100755 --- a/.config/waybar/scripts/layout.sh +++ b/.config/waybar/scripts/layout.sh @@ -1,14 +1,14 @@ #!/bin/sh # Get focused output -output="$(mmsg -g | grep "selmon 1" | awk '{print$1}')" +output="$(mmsg get all-monitors | jq -r '.monitors[] | select(.active == true) | .name')" case $1 in toggle) - mmsg -d switch_layout + mmsg dispatch switch_layout ;; *) - text=$(mmsg -g | grep " layout" | sort -t: -k2,2nr -r | awk '{ print $3 }' FS=' ') + text=$(mmsg get all-monitors | jq -r '.monitors[] | .layout_symbol') echo "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}" ;; esac |
