[taffybar] Better MPRIS hiding

This commit is contained in:
Ivan Malison 2021-08-09 03:34:43 -06:00
parent 82f0dbc1e4
commit a7f548d230
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -161,7 +161,7 @@ main = do
textClockNewWith textClockNewWith
defaultClockConfig defaultClockConfig
{ clockUpdateStrategy = RoundedTargetInterval 60 0.0 { clockUpdateStrategy = RoundedTargetInterval 60 0.0
, clockFormatString = "%a %b %_d, %I:%M %p" , clockFormatString = "%a %b %_d, 🕑%I:%M %p"
} }
myICP = deocrateWithSetClassAndBoxes "icp" $ cryptoPriceLabelWithIcon @"ICP-USD" myICP = deocrateWithSetClassAndBoxes "icp" $ cryptoPriceLabelWithIcon @"ICP-USD"
myBTC = deocrateWithSetClassAndBoxes "btc" $ cryptoPriceLabelWithIcon @"BTC-USD" myBTC = deocrateWithSetClassAndBoxes "btc" $ cryptoPriceLabelWithIcon @"BTC-USD"
@ -170,7 +170,13 @@ main = do
sniTrayNewFromParams defaultTrayParams { trayLeftClickAction = PopupMenu sniTrayNewFromParams defaultTrayParams { trayLeftClickAction = PopupMenu
, trayRightClickAction = Activate , trayRightClickAction = Activate
} }
myMpris = deocrateWithSetClassAndBoxes "mpris" mpris2New myMpris = mpris2NewWithConfig
MPRIS2Config { mprisWidgetWrapper = deocrateWithSetClassAndBoxes "mpris" . return
, updatePlayerWidget =
simplePlayerWidget
defaultPlayerConfig
{ setNowPlayingLabel = playingText 10 10 }
}
myBatteryIcon = deocrateWithSetClassAndBoxes "battery-icon" batteryIconNew myBatteryIcon = deocrateWithSetClassAndBoxes "battery-icon" batteryIconNew
myBatteryText = myBatteryText =
deocrateWithSetClassAndBoxes "battery-text" $ textBatteryNew "$percentage$%" deocrateWithSetClassAndBoxes "battery-text" $ textBatteryNew "$percentage$%"
@ -197,8 +203,9 @@ main = do
{ startWidgets = [myWorkspaces, myLayout, myWindows] { startWidgets = [myWorkspaces, myLayout, myWindows]
, endWidgets = fullEndWidgets , endWidgets = fullEndWidgets
, barPosition = Top , barPosition = Top
, widgetSpacing = 0
, barPadding = 0 , barPadding = 0
, barHeight = 50 , barHeight = 60
, cssPath = cssFilePath , cssPath = cssFilePath
, startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329" , startupHook = void $ setCMCAPIKey "f9e66366-9d42-4c6e-8d40-4194a0aaa329"
} }
@ -211,7 +218,7 @@ main = do
, baseConfig { endWidgets = fullEndWidgets, barHeight = 42 } , baseConfig { endWidgets = fullEndWidgets, barHeight = 42 }
) )
, ( "ryzen-shine" , ( "ryzen-shine"
, baseConfig { endWidgets = fullEndWidgets, barHeight = 45 } , baseConfig { endWidgets = fullEndWidgets, barHeight = 50 }
) )
, ( "ivanm-dfinity-razer" , ( "ivanm-dfinity-razer"
, baseConfig { endWidgets = shortLaptopEndWidgets, barHeight = 42 } , baseConfig { endWidgets = shortLaptopEndWidgets, barHeight = 42 }