From 5c242d4edf60a88dd630d9eb6824b7c091eb840c Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Wed, 15 Apr 2026 11:34:34 +0100 Subject: Initial commit for running mango ( Wayland ) on OpenBSD --- .config/waybar/scripts/layout.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .config/waybar/scripts/layout.sh (limited to '.config/waybar/scripts/layout.sh') diff --git a/.config/waybar/scripts/layout.sh b/.config/waybar/scripts/layout.sh new file mode 100755 index 0000000..f7c7691 --- /dev/null +++ b/.config/waybar/scripts/layout.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Get focused output +output="$(mmsg -g | grep "selmon 1" | awk '{print$1}')" + +case $1 in + toggle) + mmsg -d switch_layout + ;; + *) + text=$(mmsg -g | grep " layout" | sort -t: -k2,2nr -r | awk '{ print $3 }' FS=' ') + echo "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}" + ;; +esac -- cgit v1.2.3