From 5a1f44c2db435786aff9aad6308ba11b2dc9d195 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Tue, 18 Oct 2022 21:26:58 +0200 Subject: [PATCH] Fullscreen bind & picom stuff --- picom/.config/picom/picom.conf | 1 + xmonad/.xmonad/xmonad.hs | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf index ee73456..964ef94 100644 --- a/picom/.config/picom/picom.conf +++ b/picom/.config/picom/picom.conf @@ -188,6 +188,7 @@ blur-background-exclude = [ #"window_type = 'dock'", "window_type = 'desktop'", "window_type = 'alacritty'", + "window_type = 'firefox'", "_GTK_FRAME_EXTENTS@:c" ]; diff --git a/xmonad/.xmonad/xmonad.hs b/xmonad/.xmonad/xmonad.hs index 09b4015..6eb43dd 100644 --- a/xmonad/.xmonad/xmonad.hs +++ b/xmonad/.xmonad/xmonad.hs @@ -18,6 +18,8 @@ import XMonad.Hooks.EwmhDesktops (ewmh) import XMonad.Hooks.InsertPosition import XMonad.Layout.Fullscreen (fullscreenSupport) import XMonad.Layout.IndependentScreens (withScreens) +import XMonad.Layout.NoBorders (noBorders) +import XMonad.Layout.ToggleLayouts (ToggleLayout(Toggle)) import qualified XMonad.StackSet as W import XMonad.Util.Run (spawnPipe) @@ -115,6 +117,8 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = , ((modm, xK_comma), sendMessage (IncMasterN 1)) -- Deincrement the number of windows in the master area , ((modm, xK_period), sendMessage (IncMasterN (-1))) + -- Toggle fullscreen + , ((modm .|. shiftMask, xK_f), toggleFull) -- Toggle the status bar gap -- Use this binding with avoidStruts from Hooks.ManageDocks. -- See also the statusBar function from Hooks.DynamicLog. @@ -170,14 +174,21 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = -- The available layouts. Note that each layout is separated by |||, -- which denotes layout choice. -- -myLayout = avoidStruts $ tiled ||| Mirror tiled ||| Full +toggleFull = + withFocused $ \wid -> do + floats <- gets (W.floating . windowset) + if M.member wid floats + then withFocused $ windows . W.sink + else withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1) + +myLayout = avoidStruts $ tiled ||| Mirror tiled ||| noBorders Full where -- default tiling algorithm partitions the screen into two panes tiled = Tall nmaster delta ratio -- The default number of windows in the master pane nmaster = 1 -- Default proportion of screen occupied by master pane - ratio = 29/50 + ratio = 29 / 50 -- Percent of screen to increment by when resizing panes delta = 3 / 100