summaryrefslogtreecommitdiffhomepage
path: root/xmobar.cabal
diff options
context:
space:
mode:
authorMichal Zielonka <michal.zielonka.8001@gmail.com>2021-10-07 23:25:09 +0200
committerMichal Zielonka <michal.zielonka.8001@gmail.com>2021-10-08 11:11:11 +0200
commitb99a8a6833a1b38882b463fd72784cd6d6f91d9e (patch)
tree9537dcfe5eff2108937bf9a2160a5f15a7a266e5 /xmobar.cabal
parenta845465fec735d9818a61d078337653b5293da5c (diff)
downloadxmobar-b99a8a6833a1b38882b463fd72784cd6d6f91d9e.tar.gz
xmobar-b99a8a6833a1b38882b463fd72784cd6d6f91d9e.tar.bz2
try to reorganize modules per os
We should make better split os specify code for FreeBSD and Linux. Idea comes from @liskin.
Diffstat (limited to 'xmobar.cabal')
-rw-r--r--xmobar.cabal23
1 files changed, 22 insertions, 1 deletions
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