diff options
author | Michal Zielonka <michal.zielonka.8001@gmail.com> | 2021-10-08 14:42:51 +0200 |
---|---|---|
committer | Michal Zielonka <michal.zielonka.8001@gmail.com> | 2021-10-08 15:44:01 +0200 |
commit | 3d469771a549062be70f4e316680dac00a68d1d2 (patch) | |
tree | 8e0683da0f40d74fd224873e4df062db30fc41f5 /src/Xmobar/Plugins/Monitors/Uptime/Linux.hs | |
parent | b99a8a6833a1b38882b463fd72784cd6d6f91d9e (diff) | |
download | xmobar-3d469771a549062be70f4e316680dac00a68d1d2.tar.gz xmobar-3d469771a549062be70f4e316680dac00a68d1d2.tar.bz2 |
try to add build action for freebsd + uptime plugin split
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Uptime/Linux.hs')
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Uptime/Linux.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Uptime/Linux.hs b/src/Xmobar/Plugins/Monitors/Uptime/Linux.hs new file mode 100644 index 0000000..46ba1a1 --- /dev/null +++ b/src/Xmobar/Plugins/Monitors/Uptime/Linux.hs @@ -0,0 +1,24 @@ +------------------------------------------------------------------------------ +-- | +-- Module : Plugins.Monitors.Uptime.Linux +-- Copyright : (c) 2010 Jose Antonio Ortega Ruiz +-- License : BSD3-style (see LICENSE) +-- +-- Maintainer : jao@gnu.org +-- Stability : unstable +-- Portability : unportable +-- Created: Sun Dec 12, 2010 20:26 +-- +-- +-- Uptime +-- +------------------------------------------------------------------------------ + + +module Xmobar.Plugins.Monitors.Uptime.Linux (readUptime) where + +import qualified Data.ByteString.Lazy.Char8 as B + +readUptime :: IO Float +readUptime = + fmap (read . B.unpack . head . B.words) (B.readFile "/proc/uptime") |