Skip to content

Commit

Permalink
feat(xmonad): fullscreen toggle disables xmobar
Browse files Browse the repository at this point in the history
Signed-off-by: saygo-png <[email protected]>
  • Loading branch information
saygo-png committed Jan 13, 2025
1 parent a70d827 commit 4e9e437
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 8 additions & 1 deletion resources/haskell/xmonad/lib/KeyBindings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import qualified WindowState as WS
import XMonad
import XMonad.Actions.Search
-- import XMonad.Hooks.StatusBar

import XMonad.Hooks.ManageDocks
import XMonad.Layout.Gaps
import qualified XMonad.Layout.Magnifier as Magnifier
import XMonad.Layout.MultiToggle
Expand All @@ -19,6 +21,11 @@ import XMonad.Util.Run
-- Key bindings. Add, modify or remove key bindings here.
-- mod1Mask = alt
-- shiftMask = shift
toggleFullscreenWithStruts :: X ()
toggleFullscreenWithStruts = do
sendMessage $ Toggle NBFULL
sendMessage ToggleStruts

myKeys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())
myKeys conf@(XConfig{XMonad.modMask = modm}) =
M.fromList $
Expand All @@ -37,7 +44,7 @@ myKeys conf@(XConfig{XMonad.modMask = modm}) =
-- Toggle floating window
((modm .|. shiftMask, xK_f), withFocused WS.toggleFloat),
-- Toggle fullscreen layout
((modm, xK_f), sendMessage $ Toggle NBFULL),
((modm, xK_f), toggleFullscreenWithStruts),
-- Audio keys
((0, xF86XK_AudioPlay), spawn "playerctl play-pause"),
((0, xF86XK_AudioPrev), spawn "playerctl previous"),
Expand Down
5 changes: 1 addition & 4 deletions resources/haskell/xmonad/lib/ManageHook.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ myManageHook =
composeOne
[ checkDock -?> doIgnore, -- equivalent to manageDocks
isDialog -?> doFloat,
-- isFullscreen -?> doFullFloat,
className =? "Gimp" -?> doFloat,
className =? "MPlayer" -?> doFloat,
return True -?> doF swapDown
]
-- <+> doF focusDown


<+> composeAll [isFullscreen --> doFullFloat]

0 comments on commit 4e9e437

Please sign in to comment.