From b99a8a6833a1b38882b463fd72784cd6d6f91d9e Mon Sep 17 00:00:00 2001 From: Michal Zielonka Date: Thu, 7 Oct 2021 23:25:09 +0200 Subject: try to reorganize modules per os We should make better split os specify code for FreeBSD and Linux. Idea comes from @liskin. --- xmobar.cabal | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'xmobar.cabal') diff --git a/xmobar.cabal b/xmobar.cabal index e894f75..5011a94 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -150,17 +150,20 @@ library Xmobar.Plugins.NotmuchMail, Xmobar.Plugins.Monitors, Xmobar.Plugins.Monitors.Batt, + Xmobar.Plugins.Monitors.Batt.Common, Xmobar.Plugins.Monitors.Common.Output, Xmobar.Plugins.Monitors.Common.Parsers, Xmobar.Plugins.Monitors.Common.Files, Xmobar.Plugins.Monitors.CoreTemp, Xmobar.Plugins.Monitors.K10Temp, + Xmobar.Plugins.Monitors.Cpu.Common, Xmobar.Plugins.Monitors.CpuFreq, Xmobar.Plugins.Monitors.Disk, Xmobar.Plugins.Monitors.Mem, Xmobar.Plugins.Monitors.MultiCoreTemp, Xmobar.Plugins.Monitors.MultiCpu, Xmobar.Plugins.Monitors.Net, + Xmobar.Plugins.Monitors.Net.Common, Xmobar.Plugins.Monitors.Swap, Xmobar.Plugins.Monitors.Thermal, Xmobar.Plugins.Monitors.ThermalZone, @@ -292,7 +295,17 @@ library if os(freebsd) -- enables freebsd specific code build-depends: bsd-sysctl - cpp-options: -DFREEBSD + other-modules: Xmobar.Plugins.Monitors.Batt.FreeBSD, + Xmobar.Plugins.Monitors.Cpu.FreeBSD, + Xmobar.Plugins.Monitors.Mem.FreeBSD, + Xmobar.Plugins.Monitors.Net.FreeBSD, + Xmobar.Plugins.Monitors.Swap.FreeBSD + else + other-modules: Xmobar.Plugins.Monitors.Batt.Linux, + Xmobar.Plugins.Monitors.Cpu.Linux, + Xmobar.Plugins.Monitors.Mem.Linux, + Xmobar.Plugins.Monitors.Net.Linux, + Xmobar.Plugins.Monitors.Swap.Linux executable xmobar default-language: Haskell2010 @@ -353,6 +366,7 @@ test-suite XmobarTest Xmobar.Plugins.Monitors.Common.Output Xmobar.Plugins.Monitors.Common.Files Xmobar.Plugins.Monitors.Cpu + Xmobar.Plugins.Monitors.Cpu.Common Xmobar.Plugins.Monitors.CpuSpec Xmobar.Plugins.Monitors.Common.Run Xmobar.Run.Exec @@ -369,6 +383,13 @@ test-suite XmobarTest cpp-options: -DALSA + if os(freebsd) + -- enables freebsd specific code + build-depends: bsd-sysctl + other-modules: Xmobar.Plugins.Monitors.Cpu.FreeBSD + else + other-modules: Xmobar.Plugins.Monitors.Cpu.Linux + benchmark xmobarbench type: exitcode-stdio-1.0 main-is: main.hs -- cgit v1.2.3