DTWSMGETCURRENTWORKSPACE(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– DtWsmGetCurrentWorkspace πŸ’–

okay bestie, welcome to the DtWsmGetCurrentWorkspace(library call) page β€” yes, that’s the manual name, and we’re being cute about it πŸ’…. This function is giving β€œask the workspace manager where we are” energy, and honestly? iconic.


🌸 NAME 🌸

DtWsmGetCurrentWorkspace β€” get the current workspace.


✨ SYNOPSIS ✨

       #include &<Dt/Wsm.h>
       int DtWsmGetCurrentWorkspace(
       Display *display,
       Window root,
       Atom *paWorkspace);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so DtWsmGetCurrentWorkspace works with the XCDE workspace manager, dtwm(1), and returns the name of the current workspace β€” converted to an X atom, no cap. 🫢

The arguments are lowkey simple, and I need you to know them:

  • display is the X display.
  • root is the root window of the screen of interest.
  • paWorkspace is the address of an atom to receive the current workspace identifier.

πŸ‘‘ RETURN VALUE πŸ‘‘

Upon successful completion, DtWsmGetCurrentWorkspace returns Success, and the atom identifying the current workspace is returned in paWorkspace; otherwise, it returns a value not equal to Success. periodt. πŸ’…


πŸ’€ APPLICATION USAGE πŸ’€

If DtWsmGetCurrentWorkspace is not successful, the most likely reason for failure is that the XCDE workspace manager, dtwm(1), is not running. like, that’s the likely culprit β€” not me making up extra lore, fr fr. 😭

vibe check: if this call flops, check whether dtwm(1) is actually running before spiraling.

πŸ”₯ SEE ALSO πŸ”₯


byeee bestie 🫢 the footer/source-version stamp says DtWsmGetCurrentWorkspace(library call), and the date? there’s literally no date line in the footer, so we’re not inventing one πŸ’…βœ¨

πŸ“¦ where this page comes from