From 00be078bc69c3c576d87600ed051e616603d5ac8 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 14 Aug 2021 02:14:25 -0600 Subject: [PATCH] [taffybar] Multiple cssPaths --- dotfiles/config/taffybar/overlay.nix | 6 ------ dotfiles/config/taffybar/taffybar | 2 +- dotfiles/config/taffybar/taffybar.hs | 31 ++++++++++++++++------------ 3 files changed, 19 insertions(+), 20 deletions(-) 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 8593d163..dbf85568 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 @@ -205,7 +210,7 @@ main = do , widgetSpacing = 0 , barPadding = 0 , barHeight = 60 - , cssPath = cssFilePath + , cssPaths = cssFiles , startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329" } selectedConfig =