xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
584 stars 274 forks source link

Add (un)fullscreen hooks and float-restoring toggleFullFloat action #768

Closed liskin closed 1 year ago

liskin commented 1 year ago

Description

X.H.EwmhDesktops: Add (un)fullscreen hooks

Fairly straightforward, just add two hooks for (un)fullscreening. There are multiple motivations for this:

This commit only adds the hooks. Neither of the motivations are dealt with yet, so the docs are a bit terse still.

Add X.A.ToggleFullFloat - state-remembering fullscreen hooks

CHANGES: Document X.A.ToggleFullFloat and setEwmhFullscreenHooks


Related: https://github.com/xmonad/xmonad-contrib/issues/456 Related: https://github.com/xmonad/xmonad-contrib/issues/394 Related: https://github.com/xmonad/xmonad-contrib/pull/626


The second motivation is still TODO: X.L.Fullscreen should be refactored to use this (probably in a separate PR because there's some legacy code I can't be arsed to actually try to use anytime soon).

Checklist

PRESFIL commented 1 year ago

Interesting. We wait XMonad.Actions.ToggleFullFloat to restore floating states of windows?

I remember X.L.PositionStoreFloat and X.H.PositionStoreHook which are both uses X.U.PositionStore. Does ToggleFullFloat also uses it?

liskin commented 1 year ago

We wait XMonad.Actions.ToggleFullFloat to restore floating states of windows?

Yeah, I'll get it finished and pushed here soon-ish.

I remember X.L.PositionStoreFloat and X.H.PositionStoreHook which are both uses X.U.PositionStore. Does ToggleFullFloat also uses it?

I'm aware of that one but didn't use it as a storage backend to avoid conflicts. Although I must admit I can't think of a specific example of how that conflict would actually behave in practice, off the top of my head.

(It's a bit unfortunate that this PositionStore* stuff is split into three modules. It kinda looks like it may be reused by other modules, but X.U.PositionStore is just an implementation detail of X.L.PositionStoreFloat.)

liskin commented 1 year ago

soon-ish™ :-)

Anyway, I've done the docs today and pushed it for review. Been running this for months with no trouble. Sorry for the wait.