# LibTmux.Query.Fields

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/src/LibTmux/Query/Fields.hs
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-query-fields/

Captured fields and relationships for [`LibTmux.Query`](/en/haskell/latest/reference/libtmux-query/).

Import this module qualified, for example as `F`. Row prefixes identify
 the source row in `F.paneActive` and `F.linkActive`.
 Tokens describe the tmux 3.3a baseline and never contact tmux. Byte-bearing
 names and paths, optional values and contextual relationships keep the
 meanings of [`LibTmux.Snapshot`](/en/haskell/latest/reference/libtmux-snapshot/).



```haskell
>>> LibTmux.Query.requirements (LibTmux.Query.matching (LibTmux.Query.eq paneActive True) LibTmux.Query.panes)
QueryRequirements {sourceName = "panes", fieldNames = ["pane.active"], relationshipNames = [], orderingFields = [], rowLimit = Nothing}
```

# What is on here

Its exports fall into these groups, in export-list order:

**Sessions**

[`sessionId`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionid/), [`sessionName`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionname/), [`sessionAttached`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionattached/), [`sessionGroup`](/en/haskell/latest/reference/libtmux-query-fields-v-sessiongroup/), [`sessionWindowLinks`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionwindowlinks/), [`sessionClients`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionclients/)

**Physical windows**

[`windowId`](/en/haskell/latest/reference/libtmux-query-fields-v-windowid/), [`windowName`](/en/haskell/latest/reference/libtmux-query-fields-v-windowname/), [`windowWidth`](/en/haskell/latest/reference/libtmux-query-fields-v-windowwidth/), [`windowHeight`](/en/haskell/latest/reference/libtmux-query-fields-v-windowheight/), [`windowLayout`](/en/haskell/latest/reference/libtmux-query-fields-v-windowlayout/), [`windowZoomed`](/en/haskell/latest/reference/libtmux-query-fields-v-windowzoomed/), [`windowPanes`](/en/haskell/latest/reference/libtmux-query-fields-v-windowpanes/), [`windowLinks`](/en/haskell/latest/reference/libtmux-query-fields-v-windowlinks/)

**Physical panes**

[`paneId`](/en/haskell/latest/reference/libtmux-query-fields-v-paneid/), [`paneWindowId`](/en/haskell/latest/reference/libtmux-query-fields-v-panewindowid/), [`paneIndex`](/en/haskell/latest/reference/libtmux-query-fields-v-paneindex/), [`paneWidth`](/en/haskell/latest/reference/libtmux-query-fields-v-panewidth/), [`paneHeight`](/en/haskell/latest/reference/libtmux-query-fields-v-paneheight/), [`paneActive`](/en/haskell/latest/reference/libtmux-query-fields-v-paneactive/), [`paneDead`](/en/haskell/latest/reference/libtmux-query-fields-v-panedead/), [`paneTitle`](/en/haskell/latest/reference/libtmux-query-fields-v-panetitle/), [`paneCurrentCommand`](/en/haskell/latest/reference/libtmux-query-fields-v-panecurrentcommand/), [`paneCurrentPath`](/en/haskell/latest/reference/libtmux-query-fields-v-panecurrentpath/), [`paneCursorX`](/en/haskell/latest/reference/libtmux-query-fields-v-panecursorx/), [`paneCursorY`](/en/haskell/latest/reference/libtmux-query-fields-v-panecursory/), [`paneModeCount`](/en/haskell/latest/reference/libtmux-query-fields-v-panemodecount/), [`paneMode`](/en/haskell/latest/reference/libtmux-query-fields-v-panemode/), [`paneWindow`](/en/haskell/latest/reference/libtmux-query-fields-v-panewindow/)

**Window links**

[`linkSessionId`](/en/haskell/latest/reference/libtmux-query-fields-v-linksessionid/), [`linkWindowId`](/en/haskell/latest/reference/libtmux-query-fields-v-linkwindowid/), [`linkIndex`](/en/haskell/latest/reference/libtmux-query-fields-v-linkindex/), [`linkActive`](/en/haskell/latest/reference/libtmux-query-fields-v-linkactive/), [`linkFlags`](/en/haskell/latest/reference/libtmux-query-fields-v-linkflags/), [`linkSession`](/en/haskell/latest/reference/libtmux-query-fields-v-linksession/), [`linkWindow`](/en/haskell/latest/reference/libtmux-query-fields-v-linkwindow/), [`linkPanes`](/en/haskell/latest/reference/libtmux-query-fields-v-linkpanes/)

**Pane occurrences**

[`occurrencePane`](/en/haskell/latest/reference/libtmux-query-fields-v-occurrencepane/), [`occurrenceLink`](/en/haskell/latest/reference/libtmux-query-fields-v-occurrencelink/)

**Clients**

[`clientName`](/en/haskell/latest/reference/libtmux-query-fields-v-clientname/), [`clientPid`](/en/haskell/latest/reference/libtmux-query-fields-v-clientpid/), [`clientTty`](/en/haskell/latest/reference/libtmux-query-fields-v-clienttty/), [`clientWidth`](/en/haskell/latest/reference/libtmux-query-fields-v-clientwidth/), [`clientHeight`](/en/haskell/latest/reference/libtmux-query-fields-v-clientheight/), [`clientAttachment`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachment/)

**Client attachments**

[`clientAttachmentSessionId`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentsessionid/), [`clientAttachmentWindowId`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentwindowid/), [`clientAttachmentWindowIndex`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentwindowindex/), [`clientAttachmentPaneId`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentpaneid/), [`clientAttachmentSession`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentsession/), [`clientAttachmentWindow`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentwindow/), [`clientAttachmentPane`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentpane/)

**Daemon metadata**

[`serverInfoPid`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfopid/), [`serverInfoStartedAt`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfostartedat/), [`serverInfoVersion`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfoversion/), [`serverInfoSocketPath`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfosocketpath/)

## Members

### Common operations

- [`clientAttachment`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachment/) (function): Optional captured selection, used with :obj:`optionalRelated <LibTmux.Query#v:optionalRelated>`. Absence fails
 that positive predicate and satisfies its negation.
- [`clientAttachmentPane`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentpane/) (function): Selected pane in its actual session/index context.
- [`clientHeight`](/en/haskell/latest/reference/libtmux-query-fields-v-clientheight/) (function): Tty height when tmux has started the terminal; absent for control clients.
- [`linkFlags`](/en/haskell/latest/reference/libtmux-query-fields-v-linkflags/) (function): Native window_flags for this appearance. Retains tmux's doubled `#` escaping.
- [`occurrencePane`](/en/haskell/latest/reference/libtmux-query-fields-v-occurrencepane/) (function): The physical pane observed through this occurrence, used with :obj:`related <LibTmux.Query#v:related>`.
- [`paneActive`](/en/haskell/latest/reference/libtmux-query-fields-v-paneactive/) (function): Whether this is the active pane of its physical window.
- [`serverInfoVersion`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfoversion/) (function): Parsed tmux release, compared using the library's version ordering.
- [`sessionWindowLinks`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionwindowlinks/) (function): Every window link owned by this session, retaining index and multiplicity.
- [`windowZoomed`](/en/haskell/latest/reference/libtmux-query-fields-v-windowzoomed/) (function): Whether a pane currently occupies the window through zoom.

### Other members

- [`clientAttachmentPaneId`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentpaneid/) (function): Native ID of the selected physical pane.
- [`clientAttachmentSession`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentsession/) (function): Selected session observation, used with :obj:`related <LibTmux.Query#v:related>`.
- [`clientAttachmentSessionId`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentsessionid/) (function): Native ID of the selected session.
- [`clientAttachmentWindow`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentwindow/) (function): Selected physical window observation.
- [`clientAttachmentWindowId`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentwindowid/) (function): Native ID of the selected physical window.
- [`clientAttachmentWindowIndex`](/en/haskell/latest/reference/libtmux-query-fields-v-clientattachmentwindowindex/) (function): Selected link index in the client's session.
- [`clientName`](/en/haskell/latest/reference/libtmux-query-fields-v-clientname/) (function): Lossless client name supplied by tmux.
- [`clientPid`](/en/haskell/latest/reference/libtmux-query-fields-v-clientpid/) (function): Positive operating-system process ID, for observation rather than signalling.
- [`clientTty`](/en/haskell/latest/reference/libtmux-query-fields-v-clienttty/) (function): Observed client tty, or [Nothing](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#v:Nothing) when tmux reports no tty.
- [`clientWidth`](/en/haskell/latest/reference/libtmux-query-fields-v-clientwidth/) (function): Reported unsigned tty width in cells. Control clients can report zero.
- [`linkActive`](/en/haskell/latest/reference/libtmux-query-fields-v-linkactive/) (function): Whether this link is selected in its session.
- [`linkIndex`](/en/haskell/latest/reference/libtmux-query-fields-v-linkindex/) (function): Window-link index within the session; reindexing can change it.
- [`linkPanes`](/en/haskell/latest/reference/libtmux-query-fields-v-linkpanes/) (function): Physical panes reached through this link, ordered by pane index.
- [`linkSession`](/en/haskell/latest/reference/libtmux-query-fields-v-linksession/) (function): Resolve the session in the supplied snapshot with :obj:`related <LibTmux.Query#v:related>`.
- [`linkSessionId`](/en/haskell/latest/reference/libtmux-query-fields-v-linksessionid/) (function): Native ID of the session that owns this observed link.
- [`linkWindow`](/en/haskell/latest/reference/libtmux-query-fields-v-linkwindow/) (function): Resolve the shared physical window in the supplied snapshot.
- [`linkWindowId`](/en/haskell/latest/reference/libtmux-query-fields-v-linkwindowid/) (function): Native ID of the shared physical window.
- [`occurrenceLink`](/en/haskell/latest/reference/libtmux-query-fields-v-occurrencelink/) (function): The observed session and window-index context of this appearance.
- [`paneCurrentCommand`](/en/haskell/latest/reference/libtmux-query-fields-v-panecurrentcommand/) (function): Foreground command name as lossless POSIX bytes, not a shell command line.
- [`paneCurrentPath`](/en/haskell/latest/reference/libtmux-query-fields-v-panecurrentpath/) (function): Observed current directory on the tmux endpoint, preserving POSIX bytes.
- [`paneCursorX`](/en/haskell/latest/reference/libtmux-query-fields-v-panecursorx/) (function): Zero-based base-screen column; may equal width when a wrap is pending.
- [`paneCursorY`](/en/haskell/latest/reference/libtmux-query-fields-v-panecursory/) (function): Zero-based base-screen row, independent of the current mode's cursor.
- [`paneDead`](/en/haskell/latest/reference/libtmux-query-fields-v-panedead/) (function): Whether tmux observed the pane's process as dead.
- [`paneHeight`](/en/haskell/latest/reference/libtmux-query-fields-v-paneheight/) (function): Positive height in cells, independent of window-link context.
- [`paneId`](/en/haskell/latest/reference/libtmux-query-fields-v-paneid/) (function): Native pane ID. Equality alone does not establish Server identity.
- [`paneIndex`](/en/haskell/latest/reference/libtmux-query-fields-v-paneindex/) (function): Pane index within its window, distinct from a window-link index.
- [`paneMode`](/en/haskell/latest/reference/libtmux-query-fields-v-panemode/) (function): Current mode name, or [Nothing](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#v:Nothing) when no mode is active.
- [`paneModeCount`](/en/haskell/latest/reference/libtmux-query-fields-v-panemodecount/) (function): Native pane mode-stack depth, including zero.
- [`paneTitle`](/en/haskell/latest/reference/libtmux-query-fields-v-panetitle/) (function): UTF-8 pane title. :obj:`contains <LibTmux.Query#v:contains>` performs exact Text substring matching.
- [`paneWidth`](/en/haskell/latest/reference/libtmux-query-fields-v-panewidth/) (function): Positive width in cells. Use :obj:`dimensionAtLeast <LibTmux.Query#v:dimensionAtLeast>` for an integer threshold.
- [`paneWindow`](/en/haskell/latest/reference/libtmux-query-fields-v-panewindow/) (function): Resolve the pane's physical window in the supplied snapshot with :obj:`related <LibTmux.Query#v:related>`.
- [`paneWindowId`](/en/haskell/latest/reference/libtmux-query-fields-v-panewindowid/) (function): Native ID of the pane's physical window; use :obj:`paneWindow <LibTmux.Query.Fields#v:paneWindow>` to navigate it.
- [`serverInfoPid`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfopid/) (function): Observed daemon process ID.
- [`serverInfoSocketPath`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfosocketpath/) (function): Reported socket path on the tmux endpoint, retaining POSIX bytes.
- [`serverInfoStartedAt`](/en/haskell/latest/reference/libtmux-query-fields-v-serverinfostartedat/) (function): Daemon start time in epoch seconds, as reported by tmux.
- [`sessionAttached`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionattached/) (function): Nonnegative count of attached clients as observed by tmux.
- [`sessionClients`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionclients/) (function): Captured clients attached to this session; an empty list is known absence.
- [`sessionGroup`](/en/haskell/latest/reference/libtmux-query-fields-v-sessiongroup/) (function): Lossless reported group label, or [Nothing](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#v:Nothing) for an ungrouped session.
- [`sessionId`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionid/) (function): Native session ID without a connection-generation guarantee.
- [`sessionName`](/en/haskell/latest/reference/libtmux-query-fields-v-sessionname/) (function): Captured UTF-8 session name. Equality does not normalize Unicode.
- [`windowHeight`](/en/haskell/latest/reference/libtmux-query-fields-v-windowheight/) (function): Positive physical window height in cells.
- [`windowId`](/en/haskell/latest/reference/libtmux-query-fields-v-windowid/) (function): Native physical window ID, independent of a session's link index.
- [`windowLayout`](/en/haskell/latest/reference/libtmux-query-fields-v-windowlayout/) (function): Native unzoomed layout encoding, possibly including pane selections.
 Treat it as opaque, release-dependent text.
- [`windowLinks`](/en/haskell/latest/reference/libtmux-query-fields-v-windowlinks/) (function): All contextual appearances of this window across captured sessions.
- [`windowName`](/en/haskell/latest/reference/libtmux-query-fields-v-windowname/) (function): Lossless window label. Equality and ordering compare its retained bytes.
- [`windowPanes`](/en/haskell/latest/reference/libtmux-query-fields-v-windowpanes/) (function): Physical panes in this window, ordered by pane index.
- [`windowWidth`](/en/haskell/latest/reference/libtmux-query-fields-v-windowwidth/) (function): Positive physical window width in cells.

## Guides

Pages that discuss `LibTmux.Query.Fields`.

- [API documentation](/en/haskell/latest/guides/api-documentation/)
