summaryrefslogtreecommitdiffstats
path: root/app/Sensor.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Sensor.hs')
-rw-r--r--app/Sensor.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/Sensor.hs b/app/Sensor.hs
index 2dcf6c0..0c05519 100644
--- a/app/Sensor.hs
+++ b/app/Sensor.hs
@@ -230,8 +230,15 @@ instance (S.MonadSensor m) => S.Aggregate m Snd Float where
where
parse = liftIO do (/ 153) . read <$> [sh|pamixer --get-volume|]
-snd :: (S.MonadSensor m) => S.Sensor m () Float
-snd = S.sensor Snd
+snd :: (S.MonadSensor m) => S.Sensor m () String
+snd = do
+ value <- S.sensor Snd
+ return
+ ( if
+ | 0.4 < value -> "\xf028"
+ | 0.0 < value -> "\xf027"
+ | otherwise -> "\xf026"
+ )
data DiskStat = DiskStat deriving (Show)