summaryrefslogtreecommitdiffhomepage
path: root/src/TopC.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/TopC.hs')
-rw-r--r--src/TopC.hs32
1 files changed, 25 insertions, 7 deletions
diff --git a/src/TopC.hs b/src/TopC.hs
index fa75f75..a86c542 100644
--- a/src/TopC.hs
+++ b/src/TopC.hs
@@ -1,6 +1,23 @@
import Xmobar
import Config
import Monitors
+import Music (mpris)
+
+topProcL p = TopProc (p <~> ["-t" , "<both1> <mboth1>"
+ , "-w", "10", "-L" , "10", "-H", "80"]) 15
+diskIOL p = DiskIO [("nvme0n1p2", "<total>")] (diskArgs p) 10
+
+mpd = MPD [ "-W", "12", "-b", "░", "-f", "▒", "-t", " <remaining>"] 10
+
+autoMPD = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t"
+ , "<ppos>/<plength> \
+ \<fn=0><fc=darkolivegreen><title></fc></fn> \
+ \<fn=0><album></fn> \
+ \<fn=0><fc=dodgerblue4><artist></fc> \
+ \<fc=burlywood4><composer></fc> <date></fn>"]
+
+compMPD = concatMonitor " " mpd autoMPD
+music = toggleMonitor "/tmp/mpris.st" (mpris "spotify") compMPD
-- <fn=1> 💡 </fn>
config p = (baseConfig p) {
@@ -8,15 +25,14 @@ config p = (baseConfig p) {
, textOffset = defaultHeight - 8
, textOffsets = [defaultHeight - 9, defaultHeight - 9,
defaultHeight - 6, defaultHeight - 8]
- , iconOffset = 10
, border = BottomB
, alpha = 255
- , commands = [ Run (topProc' p)
+ , commands = [ Run (topProcL p)
+ , Run music
, Run (cpuBars p)
, Run memory
, Run (diskU p)
- , Run (diskIO p)
- -- , Run (coreTemp p)
+ , Run (diskIOL p)
, Run brightness'
, Run kbd
, Run (batt p)
@@ -36,9 +52,11 @@ config p = (baseConfig p) {
\ <action=`toggle-app.sh blueman-tray`></action>\
\<action=`toggle-app.sh pasystray`>|default:Master|\
\ |default:Capture|</action> |EGPH|\
- \ |mail| <fn=1>|kbd|</fn>{} \
- \ |top| |multicpu|\
- \ |diskio| |disku| |memory| \
+ \ |mail| <fn=1>|kbd|</fn>{}\
+ \ <action=`toggle-pipe.sh /tmp/mpris.st`>|" ++ (alias music) ++
+ "|</action>\
+ \ |multicpu| |top| |memory|\
+ \ |diskio| |disku| \
\ <fn=2>🕓 </fn>|datetime| |laTime| "
}