diff --git a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal index 250a2d53..bfe56163 100644 --- a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal +++ b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal @@ -25,7 +25,6 @@ library hs-source-dirs: lib exposed-modules: XMonad.Layout.Reflect.Message - XMonad.Layout.ResizableTile.FixDescription Data.Char.Greek executable leanamonad diff --git a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs b/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs deleted file mode 100644 index 19153c17..00000000 --- a/nix/configurations/vanadium/home/xmonad/lib/XMonad/Layout/ResizableTile/FixDescription.hs +++ /dev/null @@ -1,23 +0,0 @@ -{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} - -module XMonad.Layout.ResizableTile.FixDescription - ( RTFixDescription(..) - ) where - -import XMonad -import qualified XMonad.StackSet as W -import XMonad.Layout.ResizableTile - -newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a } - deriving (Read, Show) - -instance LayoutClass RTFixDescription a where - runLayout (W.Workspace t l s) = - let ws' = W.Workspace t (unwrapRT l) s - in (fmap . fmap . fmap) RTFixDescription . runLayout ws' - - handleMessage (RTFixDescription l) = - (fmap . fmap) RTFixDescription . handleMessage l - - description (RTFixDescription l) = - description l <> " " <> show (_nmaster l) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index b56b81a9..76fe99af 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -19,7 +19,6 @@ import XMonad.Layout.Reflect import XMonad.Layout.Reflect.Message import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile -import XMonad.Layout.ResizableTile.FixDescription import XMonad.Layout.Spacing import qualified XMonad.StackSet as W import XMonad.Util.EZConfig @@ -64,10 +63,9 @@ main = `additionalKeys` keybinds myLayout = - let tallr = renamed [ KeepWordsRight 2 ] {- keep "ResizableTall n" -} + let tallr = renamed [ Replace "Tall" ] $ smartSpacingWithEdge 5 $ reflectMsg . reflectHoriz - $ RTFixDescription $ ResizableTall 1 (1/10) (3/7) [] mag = magnifyxy 1.05 1.3 (NoMaster 3) False in avoidStruts @@ -332,15 +330,21 @@ fullFloat = W.RationalRect 0 0 1 1 buttomRightFloat = W.RationalRect (1%2) (1%2) (1%2) (1%2) xmobarConfig :: StatusBarConfig -xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) +xmobarConfig = statusBarProp "xmobar -x 0" myPrettyPrinter where - myPrettyPrinter = - filterOutWsPP [scratchpadWorkspaceTag] - $ def - { ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . fmap toUpper - , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" - , ppSep = " | " - } + windowCount :: X Int + windowCount = gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset + + myPrettyPrinter :: X PP + myPrettyPrinter = do + wCount <- windowCount + pure + $ filterOutWsPP [scratchpadWorkspaceTag] + $ def + { ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . ( <> ":" <> show wCount) + , ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅" + , ppSep = " | " + } myScratchpads :: [NamedScratchpad] myScratchpads =