From 8287e45b62d0d310512574850bad4741c4b3a53d Mon Sep 17 00:00:00 2001 From: Michal Zielonka Date: Mon, 11 Oct 2021 23:11:30 +0200 Subject: add top for freebsd proc In FreeBSD /proc/pid/stat is missing we should use for top procstat library. --- src/Xmobar/Plugins/Monitors/Top/Common.hs | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/Xmobar/Plugins/Monitors/Top/Common.hs (limited to 'src/Xmobar/Plugins/Monitors/Top/Common.hs') diff --git a/src/Xmobar/Plugins/Monitors/Top/Common.hs b/src/Xmobar/Plugins/Monitors/Top/Common.hs new file mode 100644 index 0000000..74b6fdd --- /dev/null +++ b/src/Xmobar/Plugins/Monitors/Top/Common.hs @@ -0,0 +1,32 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Plugins.Monitors.Top.Common +-- Copyright : (c) 2010, 2011, 2012, 2013, 2014, 2018 Jose A Ortega Ruiz +-- License : BSD-style (see LICENSE) +-- +-- Maintainer : Jose A Ortega Ruiz +-- Stability : unstable +-- Portability : unportable +-- +-- Process activity and memory consumption monitors +-- +----------------------------------------------------------------------------- + +module Xmobar.Plugins.Monitors.Top.Common ( + MemInfo + , Pid + , TimeInfo + , TimeEntry + , Times + , TimesRef + ) where + +import Data.IORef (IORef) +import Data.Time.Clock (UTCTime) + +type MemInfo = (String, Float) +type Pid = Int +type TimeInfo = (String, Float) +type TimeEntry = (Pid, TimeInfo) +type Times = [TimeEntry] +type TimesRef = IORef (Times, UTCTime) -- cgit v1.2.3