diff options
| author | Justine Smithies <justine@smithies.me.uk> | 2026-06-13 13:05:51 +0100 |
|---|---|---|
| committer | Justine Smithies <justine@smithies.me.uk> | 2026-06-13 13:05:51 +0100 |
| commit | cbe745e93e530f5e1ef3b95c9724ad70b9c95a9f (patch) | |
| tree | 7555b797ea1affcdc9ffd47c7b5cb9136305851e | |
| parent | 2be648b5e7921aca0b4b6ea5a64ed1dad6c96fe9 (diff) | |
Updated to use new MangoWM IPC mmsg
| -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 |
