diff --git a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/SetMasterNTall.hs b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/SetMasterNTall.hs index a09af1d3..a08f7742 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/SetMasterNTall.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/SetMasterNTall.hs @@ -23,10 +23,8 @@ instance LayoutClass SetMasterNTall a where let ws' = W.Workspace t (unSetMasterNTall l) s in (fmap . fmap . fmap) SetMasterNTall . runLayout ws' - handleMessage (SetMasterNTall l@(ResizableTall n0 d f s)) mess - | Just (SetMasterN n) <- fromMessage mess = pure $ - if n0 /= n then Just $ SetMasterNTall $ ResizableTall n d f s - else Nothing + handleMessage (SetMasterNTall l@(ResizableTall _n0 d f s)) mess + | Just (SetMasterN n) <- fromMessage mess = pure $ Just $ SetMasterNTall $ ResizableTall n d f s | otherwise = (fmap . fmap) SetMasterNTall . handleMessage l $ mess description (SetMasterNTall l) = description l diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index f9cbd2bc..e5c8ad57 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -33,9 +33,9 @@ import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import Data.Char.Greek -import qualified Data.Map.Strict as M import Data.Ratio import Data.Semigroup +import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 @@ -209,21 +209,11 @@ setMasterNEventHandleHook :: Event -> X All setMasterNEventHandleHook ev = let adjustMasterCount :: X () adjustMasterCount = do - ws <- gets windowset - -- Remove the floating windows in the count - let s :: Maybe (W.Stack Window) - s = W.stack $ W.workspace $ W.current ws - - count :: Int - count = - length - $ filter (flip M.notMember (W.floating ws)) - $ W.integrate' s - - if count > 7 then sendMessage (SetMasterN 4) - else if count > 5 then sendMessage (SetMasterN 3) - else if count > 3 then sendMessage (SetMasterN 2) - else sendMessage (SetMasterN 1) + count <- gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset + if count <= 3 then sendMessage (SetMasterN 1) + else if count <= 5 then sendMessage (SetMasterN 2) + else if count <= 7 then sendMessage (SetMasterN 3) + else pure () in do case ev of MapRequestEvent{} -> adjustMasterCount diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 17ca3b84..024f0b25 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -76,20 +76,4 @@ services.mullvad-vpn.enable = true; hardware.bluetooth.enable = true; - - - # Printing and auto-discovery of Wi-Fi printers - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; - - services.printing = { - enable = true; - drivers = with pkgs; [ - cups-filters - cups-browsed - ]; - }; }