From f65e04b882129d6ef7fee5871f7a531757dcc4f6 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 29 May 2018 21:03:19 -0700 Subject: [PATCH] [taffybar] WIP Caps theme --- dotfiles/config/taffybar/taffybar | 2 +- dotfiles/config/taffybar/taffybar.css | 21 ++++++++------------- dotfiles/config/taffybar/taffybar.hs | 12 ++++++------ 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index b20fd99f..35ef690d 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit b20fd99f934fbfdb5cfc021d01a0c4c4c189af29 +Subproject commit 35ef690d814270d1b571fa307b86f5d0ed3ae6da diff --git a/dotfiles/config/taffybar/taffybar.css b/dotfiles/config/taffybar/taffybar.css index 180dcbdc..f79291a4 100644 --- a/dotfiles/config/taffybar/taffybar.css +++ b/dotfiles/config/taffybar/taffybar.css @@ -18,24 +18,19 @@ } .taffy-box { - border-radius: 10px; - background-color: rgba(0.0, 0.0, 0.0, 0.3); + border-color: @white; + border-width: 5px; + border-style: solid; + border-radius: 5px; } .inner-pad { - padding-bottom: 5px; - padding-top: 5px; - padding-left: 2px; - padding-right: 2px; + padding: 0px; } .contents { - padding-bottom: 4px; - padding-top: 4px; - padding-right: 2px; - padding-left: 2px; + padding: 7px; transition: background-color .5s; - border-radius: 5px; } /* Workspaces styling */ @@ -43,11 +38,11 @@ .workspace-label { padding-right: 3px; padding-left: 2px; - font-size: 12pt; + font-size: 10pt; } .active .contents { - background-color: rgba(0.0, 0.0, 0.0, 0.5); + background-color: #e21d3b; } .visible .contents { diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 68b1e7d2..80af5511 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -1,4 +1,5 @@ {-# LANGUAGE PackageImports #-} +{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception.Base @@ -107,6 +108,7 @@ logDebug = do main = do homeDirectory <- getHomeDirectory -- logDebug + -- logM "What" WARNING "Why" -- enableLogger "System.Taffybar.Widget.Util" DEBUG -- enableLogger "System.Taffybar.Information.XDG.DesktopEntry" DEBUG -- enableLogger "System.Taffybar.WindowIcon" DEBUG @@ -118,16 +120,14 @@ main = do 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"r + -- | "Kodi" `isInfixOf` klass = Just "kodi.png" | "@gmail.com" `isInfixOf` title && "chrome" `isInfixOf` klass && "Gmail" `isInfixOf` title = Just "gmail.png" | otherwise = Nothing - myIcons = - addCustomIconsAndFallback - (fmap inResourcesDirectory . getIconFileName) - (inResourcesDirectory "exe-icon.png") - (getWindowIconPixbufFromClass <|||> getWindowIconPixbufFromEWMH) + myIcons = scaledWindowIconPixbufGetter $ + unscaledDefaultGetWindowIconPixbuf <|||> + (\size _ -> lift $ loadPixbufByName size "application-default-icon") cpu = pollingGraphNew cpuCfg 0.5 cpuCallback mem = pollingGraphNew memCfg 1 memCallback layout = layoutNew defaultLayoutConfig