Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X.H.ManageHelpers: isNotification predicate #877

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### New Modules

* `XMonad.Actions.Profiles`.

- Group workspaces by similarity. Usefull when one has lots
of workspaces and uses only a couple per unit of work.

Expand All @@ -19,9 +19,14 @@

- Fixed `checkKeymap` warning that all keybindings are duplicates.

* `XMonad.Hooks.ManageHelpers`

- Added `isNotification` predicate to check for windows with
`_NET_WM_WINDOW_TYPE` property of `_NET_WM_WINDOW_TYPE_NOTIFICATION`.

### Other changes

## 0.18.0 (February 3, 20
## 0.18.0 (February 3, 2024)

### Breaking Changes

Expand Down
10 changes: 10 additions & 0 deletions XMonad/Hooks/ManageHelpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module XMonad.Hooks.ManageHelpers (
isFullscreen,
isMinimized,
isDialog,
isNotification,
pid,
desktop,
transientTo,
Expand Down Expand Up @@ -191,9 +192,18 @@ isMinimized :: Query Bool
isMinimized = isInProperty "_NET_WM_STATE" "_NET_WM_STATE_HIDDEN"

-- | A predicate to check whether a window is a dialog.
--
-- See <https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html#idm46485863906176>.
isDialog :: Query Bool
isDialog = isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_DIALOG"

-- | A predicate to check whether a window is a notification.
--
-- See <https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html#idm46485863906176>.
isNotification :: Query Bool
isNotification =
isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_NOTIFICATION"

-- | This function returns 'Just' the @_NET_WM_PID@ property for a
-- particular window if set, 'Nothing' otherwise.
--
Expand Down
Loading