From 4763811bbb9b5513603ab9892012def353777a57 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 5 Jan 2019 18:42:16 -0800 Subject: [PATCH] [taffybar] Config cleanup --- .../config/taffybar/imalison-taffybar.cabal | 4 ++-- dotfiles/config/taffybar/taffybar.hs | 23 ++++--------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/dotfiles/config/taffybar/imalison-taffybar.cabal b/dotfiles/config/taffybar/imalison-taffybar.cabal index e580e5b2..cb7b1342 100644 --- a/dotfiles/config/taffybar/imalison-taffybar.cabal +++ b/dotfiles/config/taffybar/imalison-taffybar.cabal @@ -14,8 +14,8 @@ executable imalison-taffybar hs-source-dirs: . main-is: taffybar.hs ghc-options: -threaded -rtsopts -with-rtsopts=-N - -- ghc-options: -threaded -debug -g - -- cpp-options: +RTS -DS + -- ghc-options: -threaded -g -rtsopts + ghc-prof-options: -fprof-auto build-depends: base , X11>=1.8 , bytestring diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 65b7f29c..6ecdc799 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE PackageImports #-} {-# LANGUAGE OverloadedStrings #-} module Main where @@ -100,10 +99,6 @@ logDebug = do workspacesLogger <- getLogger "System.Taffybar.Widget.Workspaces" saveGlobalLogger $ setLevel WARNING workspacesLogger --- github = do --- Right (token, _) <- passGet "github-token" --- githubNotificationsNew $ defaultGithubConfig $ Auth.OAuth $ BS.pack token - main = do homeDirectory <- getHomeDirectory -- logDebug @@ -116,14 +111,6 @@ main = do highContrastDirectory = "/" "usr" "share" "icons" "HighContrast" "256x256" inHighContrastDirectory file = highContrastDirectory file - getIconFileName w@WindowData {windowTitle = title, windowClass = klass} - -- | "URxvt" `isInfixOf` klass = Just "urxvt.png" - -- | "Termite" `isInfixOf` klass = Just "urxvt.png" - -- | "Kodi" `isInfixOf` klass = Just "kodi.png" - | "@gmail.com" `isInfixOf` title && - "chrome" `isInfixOf` klass && "Gmail" `isInfixOf` title = - Just "gmail.png" - | otherwise = Nothing myIcons = scaledWindowIconPixbufGetter $ getWindowIconPixbufFromChrome <|||> unscaledDefaultGetWindowIconPixbuf <|||> @@ -157,12 +144,11 @@ main = do , batteryIconNew , textClockNew Nothing "%a %b %_d %r" 1 , sniTrayNew - -- , github , cpu , mem , networkGraphNew netCfg Nothing - -- , networkMonitorNew defaultNetFormat Nothing >>= setMinWidth 200 - -- , fsMonitorNew 60 ["/dev/sdd2"] + -- , networkMonitorNew defaultNetFormat Nothing >>= setMinWidth 200 + -- , fsMonitorNew 60 ["/dev/sdd2"] , mpris2New ] , barPosition = Top @@ -170,9 +156,10 @@ main = do , barHeight = 45 } simpleTaffyConfig = baseConfig - -- { endWidgets = [] + { centerWidgets = map (>>= buildContentsBox) [] + -- , endWidgets = map (>>= buildContentsBox) [ sniTrayNew, mpris2New ] -- , startWidgets = [flip widgetSetClass "Workspaces" =<< workspaces] - -- } + } startTaffybar $ appendHook notifySystemD $ appendHook (void $ getHost False) $