Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ivan Malison 2021-08-14 03:18:42 -06:00
commit eb18e13bf2
8 changed files with 34 additions and 28 deletions

View File

@ -13,6 +13,9 @@
rec { rec {
devShell = pkgs.haskellPackages.shellFor { devShell = pkgs.haskellPackages.shellFor {
packages = p: [ p.imalison-taffybar p.taffybar ]; 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; defaultPackage = pkgs.haskellPackages.imalison-taffybar;
}) // { inherit overlay overlays; } ; }) // { inherit overlay overlays; } ;

View File

@ -8,12 +8,6 @@ final: prev: {
["taffybar.hs" "imalison-taffybar.cabal"] ["taffybar.hs" "imalison-taffybar.cabal"]
) )
{ }; { };
coinbase-pro = hself.callCabal2nix "coinbase-pro" (final.fetchFromGitHub {
owner = "IvanMalison";
repo = "coinbase-pro";
rev = "8ac93b7905150c8cbd6957102a730ecceb8b4dba";
sha256 = "0v0xw593xczvvalh24bz37v2zbfz92dhz71f04m08abgphqmjvxq";
}) { };
}); });
}); });
} }

@ -1 +1 @@
Subproject commit 054689aabb596a0c1eb59e10501a4cd2ca4dc8c7 Subproject commit eab3b26dee4158154644f1a7e0cd1e72249f048b

View File

@ -124,24 +124,29 @@ logDebug = do
-- enableLogger "System.Taffybar.WindowIcon" DEBUG -- enableLogger "System.Taffybar.WindowIcon" DEBUG
-- enableLogger "System.Taffybar.Widget.Generic.PollingLabel" DEBUG -- enableLogger "System.Taffybar.Widget.Generic.PollingLabel" DEBUG
cssFileByHostname = cssFilesByHostname =
[ ("uber-loaner", "uber-loaner.css") [ ("uber-loaner", ["uber-loaner.css"])
, ("imalison-home", "taffybar.css") , ("imalison-home", ["taffybar.css"])
, ("ivanm-dfinity-razer", "taffybar.css") , ("ivanm-dfinity-razer", ["taffybar.css"])
, ("ryzen-shine", "taffybar.css") , ("ryzen-shine", ["taffybar.css"])
] ]
main = do main = do
hostName <- getHostName hostName <- getHostName
homeDirectory <- getHomeDirectory homeDirectory <- getHomeDirectory
cssFilePath <- cssFiles <-
traverse (getUserConfigFile "taffybar") $ lookup hostName cssFileByHostname traverse (getUserConfigFile "taffybar") $ lookup hostName cssFilesByHostname
let myCPU = deocrateWithSetClassAndBoxes "cpu" $ pollingGraphNew cpuCfg 5 cpuCallback let myCPU = deocrateWithSetClassAndBoxes "cpu" $
myMem = deocrateWithSetClassAndBoxes "mem" $ pollingGraphNew memCfg 5 memCallback pollingGraphNew cpuCfg 5 cpuCallback
myNet = deocrateWithSetClassAndBoxes "net" $ networkGraphNew netCfg Nothing myMem = deocrateWithSetClassAndBoxes "mem" $
myLayout = deocrateWithSetClassAndBoxes "layout" $ layoutNew defaultLayoutConfig pollingGraphNew memCfg 5 memCallback
myWindows = deocrateWithSetClassAndBoxes "windows" $ windowsNew defaultWindowsConfig myNet = deocrateWithSetClassAndBoxes "net" $
networkGraphNew netCfg Nothing
myLayout = deocrateWithSetClassAndBoxes "layout" $
layoutNew defaultLayoutConfig
myWindows = deocrateWithSetClassAndBoxes "windows" $
windowsNew defaultWindowsConfig
myWorkspaces = myWorkspaces =
flip widgetSetClassGI "workspaces" =<< flip widgetSetClassGI "workspaces" =<<
workspacesNew defaultWorkspacesConfig workspacesNew defaultWorkspacesConfig
@ -197,7 +202,7 @@ main = do
, widgetSpacing = 0 , widgetSpacing = 0
, barPadding = 0 , barPadding = 0
, barHeight = 50 , barHeight = 50
, cssPath = cssFilePath , cssPaths = cssFiles
, startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329" , startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329"
} }
selectedConfig = selectedConfig =

View File

@ -1 +1 @@
packages: . packages: . xmonad-contrib/

View File

@ -19,7 +19,7 @@
in in
rec { rec {
devShell = pkgs.haskellPackages.shellFor { devShell = pkgs.haskellPackages.shellFor {
packages = p: [ p.imalison-xmonad ]; packages = p: [ p.imalison-xmonad p.xmonad-contrib ];
buildInputs = with pkgs.haskellPackages; [ buildInputs = with pkgs.haskellPackages; [
cabal-install haskell-language-server hlint ghcid ormolu implicit-hie cabal-install haskell-language-server hlint ghcid ormolu implicit-hie
]; ];

@ -1 +1 @@
Subproject commit d5522d69db9ae2a57b3a10056ea7e80aaddf123d Subproject commit 3509e91b15e71c934978258663513360c7ea2849

View File

@ -64,7 +64,7 @@ import XMonad.Hooks.TaffybarPagerHints
import XMonad.Hooks.WorkspaceHistory import XMonad.Hooks.WorkspaceHistory
import XMonad.Layout.Accordion import XMonad.Layout.Accordion
import XMonad.Layout.BoringWindows import XMonad.Layout.BoringWindows
import XMonad.Layout.ConditionalModifier import XMonad.Layout.ConditionalLayout
import XMonad.Layout.Cross import XMonad.Layout.Cross
import XMonad.Layout.Grid import XMonad.Layout.Grid
import XMonad.Layout.LayoutCombinators import XMonad.Layout.LayoutCombinators
@ -273,8 +273,12 @@ myStartup = do
data DisableOnTabbedCondition = DisableOnTabbedCondition deriving (Read, Show) data DisableOnTabbedCondition = DisableOnTabbedCondition deriving (Read, Show)
instance ModifierCondition DisableOnTabbedCondition where instance ModifierCondition DisableOnTabbedCondition where
shouldApply _ = do shouldApply _ workspaceId = fromMaybe True <$> final
not . isInfixOf "Tabbed" . description . W.layout <$> currentWorkspace 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 disableOnTabbed = ConditionalLayoutModifier DisableOnTabbedCondition
@ -411,7 +415,7 @@ layoutNames = [description layout | layout <- layoutList]
selectLayout = myDmenu layoutNames >>= (sendMessage . JumpToLayout) selectLayout = myDmenu layoutNames >>= (sendMessage . JumpToLayout)
myLayoutHook = myLayoutHook =
minimizeNoDescription . minimize .
boringAuto . boringAuto .
mkToggle1 AVOIDSTRUTS . mkToggle1 AVOIDSTRUTS .
mkToggle1 MIRROR . mkToggle1 MIRROR .
@ -491,7 +495,7 @@ myWindowAct c@WindowBringerConfig {menuCommand = cmd, menuArgs = args}
currentlyFullscreen <- isToggleActiveInCurrent NBFULL currentlyFullscreen <- isToggleActiveInCurrent NBFULL
let actualConfig let actualConfig
| fromMaybe False currentlyFullscreen = c | fromMaybe False currentlyFullscreen = c
| filterVisible = c {windowFilter = not . flip elem visible} | filterVisible = c { windowFilter = return . not . flip elem visible }
| otherwise = c | otherwise = c
ws <- M.toList <$> windowMap' actualConfig ws <- M.toList <$> windowMap' actualConfig
selection <- menuIndexArgs cmd args ws selection <- menuIndexArgs cmd args ws