blob: f7c7691e03b8c184e14d303bc059a3217e5d9d4a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
|