diff --git a/dotfiles/config/taffybar/flake.nix b/dotfiles/config/taffybar/flake.nix index 2b8dcb2b..b615ae0d 100644 --- a/dotfiles/config/taffybar/flake.nix +++ b/dotfiles/config/taffybar/flake.nix @@ -13,6 +13,9 @@ rec { devShell = pkgs.haskellPackages.shellFor { packages = p: [ p.imalison-taffybar p.taffybar ]; + nativeBuildInputs = with pkgs.haskellPackages; [ + cabal-install hlint ghcid ormolu implicit-hie haskell-language-server + ]; }; defaultPackage = pkgs.haskellPackages.imalison-taffybar; }) // { inherit overlay overlays; } ; diff --git a/dotfiles/config/taffybar/overlay.nix b/dotfiles/config/taffybar/overlay.nix index 3de900f3..5076b770 100644 --- a/dotfiles/config/taffybar/overlay.nix +++ b/dotfiles/config/taffybar/overlay.nix @@ -8,12 +8,6 @@ final: prev: { ["taffybar.hs" "imalison-taffybar.cabal"] ) { }; - coinbase-pro = hself.callCabal2nix "coinbase-pro" (final.fetchFromGitHub { - owner = "IvanMalison"; - repo = "coinbase-pro"; - rev = "8ac93b7905150c8cbd6957102a730ecceb8b4dba"; - sha256 = "0v0xw593xczvvalh24bz37v2zbfz92dhz71f04m08abgphqmjvxq"; - }) { }; }); }); } diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index 054689aa..eab3b26d 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit 054689aabb596a0c1eb59e10501a4cd2ca4dc8c7 +Subproject commit eab3b26dee4158154644f1a7e0cd1e72249f048b diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 2f97d9ff..918b4f51 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -124,24 +124,29 @@ logDebug = do -- enableLogger "System.Taffybar.WindowIcon" DEBUG -- enableLogger "System.Taffybar.Widget.Generic.PollingLabel" DEBUG -cssFileByHostname = - [ ("uber-loaner", "uber-loaner.css") - , ("imalison-home", "taffybar.css") - , ("ivanm-dfinity-razer", "taffybar.css") - , ("ryzen-shine", "taffybar.css") +cssFilesByHostname = + [ ("uber-loaner", ["uber-loaner.css"]) + , ("imalison-home", ["taffybar.css"]) + , ("ivanm-dfinity-razer", ["taffybar.css"]) + , ("ryzen-shine", ["taffybar.css"]) ] main = do hostName <- getHostName homeDirectory <- getHomeDirectory - cssFilePath <- - traverse (getUserConfigFile "taffybar") $ lookup hostName cssFileByHostname + cssFiles <- + traverse (getUserConfigFile "taffybar") $ lookup hostName cssFilesByHostname - let myCPU = deocrateWithSetClassAndBoxes "cpu" $ pollingGraphNew cpuCfg 5 cpuCallback - myMem = deocrateWithSetClassAndBoxes "mem" $ pollingGraphNew memCfg 5 memCallback - myNet = deocrateWithSetClassAndBoxes "net" $ networkGraphNew netCfg Nothing - myLayout = deocrateWithSetClassAndBoxes "layout" $ layoutNew defaultLayoutConfig - myWindows = deocrateWithSetClassAndBoxes "windows" $ windowsNew defaultWindowsConfig + let myCPU = deocrateWithSetClassAndBoxes "cpu" $ + pollingGraphNew cpuCfg 5 cpuCallback + myMem = deocrateWithSetClassAndBoxes "mem" $ + pollingGraphNew memCfg 5 memCallback + myNet = deocrateWithSetClassAndBoxes "net" $ + networkGraphNew netCfg Nothing + myLayout = deocrateWithSetClassAndBoxes "layout" $ + layoutNew defaultLayoutConfig + myWindows = deocrateWithSetClassAndBoxes "windows" $ + windowsNew defaultWindowsConfig myWorkspaces = flip widgetSetClassGI "workspaces" =<< workspacesNew defaultWorkspacesConfig @@ -197,7 +202,7 @@ main = do , widgetSpacing = 0 , barPadding = 0 , barHeight = 50 - , cssPath = cssFilePath + , cssPaths = cssFiles , startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329" } selectedConfig = diff --git a/dotfiles/config/xmonad/cabal.project b/dotfiles/config/xmonad/cabal.project index e6fdbadb..a1d313b8 100644 --- a/dotfiles/config/xmonad/cabal.project +++ b/dotfiles/config/xmonad/cabal.project @@ -1 +1 @@ -packages: . +packages: . xmonad-contrib/ diff --git a/dotfiles/config/xmonad/flake.nix b/dotfiles/config/xmonad/flake.nix index 18bd063d..36a8a798 100644 --- a/dotfiles/config/xmonad/flake.nix +++ b/dotfiles/config/xmonad/flake.nix @@ -19,7 +19,7 @@ in rec { devShell = pkgs.haskellPackages.shellFor { - packages = p: [ p.imalison-xmonad ]; + packages = p: [ p.imalison-xmonad p.xmonad-contrib ]; buildInputs = with pkgs.haskellPackages; [ cabal-install haskell-language-server hlint ghcid ormolu implicit-hie ]; diff --git a/dotfiles/config/xmonad/xmonad-contrib b/dotfiles/config/xmonad/xmonad-contrib index d5522d69..3509e91b 160000 --- a/dotfiles/config/xmonad/xmonad-contrib +++ b/dotfiles/config/xmonad/xmonad-contrib @@ -1 +1 @@ -Subproject commit d5522d69db9ae2a57b3a10056ea7e80aaddf123d +Subproject commit 3509e91b15e71c934978258663513360c7ea2849 diff --git a/dotfiles/config/xmonad/xmonad.hs b/dotfiles/config/xmonad/xmonad.hs index d10bb588..8ce40170 100644 --- a/dotfiles/config/xmonad/xmonad.hs +++ b/dotfiles/config/xmonad/xmonad.hs @@ -64,7 +64,7 @@ import XMonad.Hooks.TaffybarPagerHints import XMonad.Hooks.WorkspaceHistory import XMonad.Layout.Accordion import XMonad.Layout.BoringWindows -import XMonad.Layout.ConditionalModifier +import XMonad.Layout.ConditionalLayout import XMonad.Layout.Cross import XMonad.Layout.Grid import XMonad.Layout.LayoutCombinators @@ -273,8 +273,12 @@ myStartup = do data DisableOnTabbedCondition = DisableOnTabbedCondition deriving (Read, Show) instance ModifierCondition DisableOnTabbedCondition where - shouldApply _ = do - not . isInfixOf "Tabbed" . description . W.layout <$> currentWorkspace + shouldApply _ workspaceId = fromMaybe True <$> final + where allWorkspaces = withWindowSet $ return . W.workspaces + relevantWorkspace = find idMatches <$> allWorkspaces + idMatches ws = W.tag ws == workspaceId + final = fmap (not . isInfixOf "Tabbed" . description . W.layout) <$> + relevantWorkspace disableOnTabbed = ConditionalLayoutModifier DisableOnTabbedCondition @@ -411,7 +415,7 @@ layoutNames = [description layout | layout <- layoutList] selectLayout = myDmenu layoutNames >>= (sendMessage . JumpToLayout) myLayoutHook = - minimizeNoDescription . + minimize . boringAuto . mkToggle1 AVOIDSTRUTS . mkToggle1 MIRROR . @@ -491,7 +495,7 @@ myWindowAct c@WindowBringerConfig {menuCommand = cmd, menuArgs = args} currentlyFullscreen <- isToggleActiveInCurrent NBFULL let actualConfig | fromMaybe False currentlyFullscreen = c - | filterVisible = c {windowFilter = not . flip elem visible} + | filterVisible = c { windowFilter = return . not . flip elem visible } | otherwise = c ws <- M.toList <$> windowMap' actualConfig selection <- menuIndexArgs cmd args ws