[taffybar] Add battery display
This commit is contained in:
parent
1320c59a6c
commit
2341457723
@ -1,6 +1,7 @@
|
|||||||
import System.Taffybar
|
import System.Taffybar
|
||||||
|
|
||||||
import System.Taffybar.Systray
|
import System.Taffybar.Systray
|
||||||
|
import System.Taffybar.Battery
|
||||||
import System.Taffybar.TaffyPager
|
import System.Taffybar.TaffyPager
|
||||||
import System.Taffybar.SimpleClock
|
import System.Taffybar.SimpleClock
|
||||||
import System.Taffybar.MPRIS2
|
import System.Taffybar.MPRIS2
|
||||||
@ -27,14 +28,16 @@ main = do
|
|||||||
]
|
]
|
||||||
, graphLabel = Just "cpu"
|
, graphLabel = Just "cpu"
|
||||||
}
|
}
|
||||||
|
batteryCfg = defaultBatteryConfig
|
||||||
let clock = textClockNew Nothing "<span fgcolor='orange'>%a %b %_d %r</span>" 1
|
let clock = textClockNew Nothing "<span fgcolor='orange'>%a %b %_d %r</span>" 1
|
||||||
pager = taffyPagerNew defaultPagerConfig
|
pager = taffyPagerNew defaultPagerConfig
|
||||||
mpris = mpris2New
|
mpris = mpris2New
|
||||||
mem = pollingGraphNew memCfg 1 memCallback
|
mem = pollingGraphNew memCfg 1 memCallback
|
||||||
cpu = pollingGraphNew cpuCfg 0.5 cpuCallback
|
cpu = pollingGraphNew cpuCfg 0.5 cpuCallback
|
||||||
tray = systrayNew
|
tray = systrayNew
|
||||||
|
battery = batteryBarNew batteryCfg 30
|
||||||
defaultTaffybar defaultTaffybarConfig { startWidgets = [ pager ]
|
defaultTaffybar defaultTaffybarConfig { startWidgets = [ pager ]
|
||||||
, endWidgets = [ tray, clock, mem, cpu, mpris ]
|
, endWidgets = [ battery, tray, clock, mem, cpu, mpris ]
|
||||||
, monitorNumber = 1
|
, monitorNumber = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user