Skip to content
Discussion options

You must be logged in to vote

Use Mango's IPC client, mmsg. The monitor JSON already contains layout_symbol and layout_index.

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 mmsg get all-monitors without jq first 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:

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 src/layout/layo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by azizsayfiddin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants