Add fullscreenSupportBorder (#476)

Add fullscreenSupportBorder for autohiding window borders
This commit is contained in:
Joan MIlev 2021-03-17 10:50:16 +02:00 committed by GitHub
parent be963c0e93
commit d9a7f4388a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -140,6 +140,11 @@
### Bug Fixes and Minor Changes ### Bug Fixes and Minor Changes
* `XMonad.Layout.Fullscreen`
Add fullscreenSupportBorder which uses smartBorders to remove window borders
when the window is fullscreen.
* `XMonad.Config.Mate` * `XMonad.Config.Mate`
- Split out the logout dialog and add a shutdown dialog. The default behavior - Split out the logout dialog and add a shutdown dialog. The default behavior
@ -814,6 +819,9 @@
The fullscreen layouts will now not render any window that is totally The fullscreen layouts will now not render any window that is totally
obscured by fullscreen windows. obscured by fullscreen windows.
Add fullscreenSupportBorder which uses smartBorders to remove window borders
when the window is fullscreen.
* `XMonad.Layout.Gaps` * `XMonad.Layout.Gaps`
Extended the sendMessage interface with `ModifyGaps` to allow arbitrary Extended the sendMessage interface with `ModifyGaps` to allow arbitrary

View File

@ -16,6 +16,7 @@ module XMonad.Layout.Fullscreen
( -- * Usage: ( -- * Usage:
-- $usage -- $usage
fullscreenSupport fullscreenSupport
,fullscreenSupportBorder
,fullscreenFull ,fullscreenFull
,fullscreenFocus ,fullscreenFocus
,fullscreenFullRect ,fullscreenFullRect
@ -32,6 +33,7 @@ module XMonad.Layout.Fullscreen
import XMonad import XMonad
import XMonad.Layout.LayoutModifier import XMonad.Layout.LayoutModifier
import XMonad.Layout.NoBorders (SmartBorder, smartBorders)
import XMonad.Hooks.EwmhDesktops (fullscreenStartup) import XMonad.Hooks.EwmhDesktops (fullscreenStartup)
import XMonad.Hooks.ManageHelpers (isFullscreen) import XMonad.Hooks.ManageHelpers (isFullscreen)
import XMonad.Util.WindowProperties import XMonad.Util.WindowProperties
@ -82,6 +84,21 @@ fullscreenSupport c = c {
startupHook = startupHook c <+> fullscreenStartup startupHook = startupHook c <+> fullscreenStartup
} }
-- | fullscreenSupport with smartBorders support so the border doesn't
-- show when the window is fullscreen
--
-- > main = xmonad
-- > $ fullscreenSupportBorder
-- > $ def { ... }
fullscreenSupportBorder :: LayoutClass l Window =>
XConfig l -> XConfig (ModifiedLayout FullscreenFull
(ModifiedLayout SmartBorder (ModifiedLayout FullscreenFull l)))
fullscreenSupportBorder c =
fullscreenSupport c { layoutHook = smartBorders
$ fullscreenFull
$ layoutHook c
}
-- | Messages that control the fullscreen state of the window. -- | Messages that control the fullscreen state of the window.
-- AddFullscreen and RemoveFullscreen are sent to all layouts -- AddFullscreen and RemoveFullscreen are sent to all layouts
-- when a window wants or no longer wants to be fullscreen. -- when a window wants or no longer wants to be fullscreen.