blob: 997d837fd3ac88408aa0bbaf48deca7b5c9f0f34 (
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 | awk '{ print $3 }' FS=' ')
echo "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}"
;;
esac
|