How to get current layout #1212
Answered
by
yhay81
azizsayfiddin
asked this question in
Q&A
Replies: 1 comment
|
Use Mango's IPC client, For the currently active monitor: mmsg get all-monitors | jq -r '.monitors[] | select(.active) | .layout_symbol'For a specific output: mmsg get monitor eDP-1 | jq -r '.layout_symbol'Run For a status bar that should update when the layout changes, use the watch form: mmsg watch all-monitors |
jq --unbuffered -r '.monitors[] | select(.active) | .layout_symbol'At the moment IPC exposes the layout symbol/index, not the layout's textual config name. The built-in symbols map to layouts in |
0 replies
Answer selected by
azizsayfiddin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use Mango's IPC client,
mmsg. The monitor JSON already containslayout_symbolandlayout_index.For the currently active monitor:
For a specific output:
Run
mmsg get all-monitorswithoutjqfirst if you want to see all available fields/output names.For a status bar that should update when the layout changes, use the watch form:
At the moment IPC exposes the layout symbol/index, not the layout's textual config name. The built-in symbols map to layouts in
src/layout/layo…