diff options
author | jao <jao@gnu.org> | 2020-09-22 18:41:01 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-09-22 18:41:01 +0100 |
commit | 23610c5e372d1ca21fe235284553a33edb433588 (patch) | |
tree | abb62a87267a4d8d84adb20eb021051f452c5910 /src | |
parent | e95069d45ca286be558279bef7e6803c3db0cd4d (diff) | |
download | xmobar-config-23610c5e372d1ca21fe235284553a33edb433588.tar.gz xmobar-config-23610c5e372d1ca21fe235284553a33edb433588.tar.bz2 |
simpler top bar for exwm (music on emacs)
Diffstat (limited to 'src')
-rw-r--r-- | src/TopC.hs | 38 | ||||
-rw-r--r-- | src/lib/Monitors.hs | 5 | ||||
-rw-r--r-- | src/lib/Music.hs | 4 |
3 files changed, 29 insertions, 18 deletions
diff --git a/src/TopC.hs b/src/TopC.hs index 3e5748a..3fa6c51 100644 --- a/src/TopC.hs +++ b/src/TopC.hs @@ -4,19 +4,25 @@ import Monitors import Music (mpris, gpmd, mpdt) topProcL p = TopProc (p <~> ["-t" - , "<both1> <both2> <both3> <mboth1> <mboth2> <mboth3>" - , "-w", "10", "-L" , "10", "-H", "80"]) 15 + , "<both1> <both2> <both3> <both4>" + ++ " · <mboth1> <mboth2> <mboth3> <mboth4>" + , "-w", "12", "-L" , "10", "-H", "80"]) 15 diskIOL p = DiskIO [("/", "<totalbipat>"), ("/home", "<totalbipat>")] (diskArgs p) 10 mpd = MPD [ "-W", "12", "-b", "░", "-f", "▒", "-t", " <remaining>"] 10 + + autoMPD light = AutoMPD [ "-T", "110", "-E", "…", "-W", "10", "-t" , - " <remaining> " ++ mpdt light] + fc "grey40" (fni "\xf001") ++ + " <lapsed>/<length> <ppos>/<plength>" -- ++ mpdt light + ] pollMPD light = MPD [ "-T", "120", "-W", "10", "-E", "…", "-t", tm, "--", "-p", "6600"] 20 - where tm = " <remaining> " ++ mpdt light + where tm = fc "grey40" (fni "\xf001") ++ " <remaining> " ++ "<ppos>/<plength>" + -- ++ mpdt light -- mprisName = "MellowPlayer3" mprisName = "spotifyd" @@ -25,7 +31,8 @@ musicPipe = PipeReader "/tmp/music" "musicpipe" musicMPRIS p = mpris p mprisName 180 -- music light = toggleMonitor "/tmp/mpris.st" musicPipe (pollMPD light) -music p = toggleMonitor "/tmp/mpris.st" (musicMPRIS p) (pollMPD (pIsLight p)) +-- music p = toggleMonitor "/tmp/mpris.st" (pollMPD (pIsLight p)) (musicMPRIS p) +music = pollMPD . pIsLight -- <fn=1> 💡 </fn> config p = (baseConfig p) { @@ -44,7 +51,7 @@ config p = (baseConfig p) { , Run memory , Run (diskU p) , Run (diskIOL p) --- , Run brightness' + , Run brightness' , Run kbd , Run (miniBatt p) , Run (wireless p "wlp1s0") @@ -53,29 +60,30 @@ config p = (baseConfig p) { , Run w -- LEGE, LEBL, KCV0 , Run (masterVol p) , Run captureVol --- , Run laTime + , Run laTime , Run localTime ] , template = " " ++ "|batt0| " --- ++ "|bright| " + ++ fni "\xf185" ++ " |bright| " ++ "<action=`toggle-app.sh nm-applet`>|proton0||wlp1s0wi|</action> " ++ "|dynnetwork| " ++ "<action=`toggle-app.sh pasystray`>|default:Master| \ \|default:Capture|</action> " - ++ "<action=`toggle-pipe.sh /tmp/mpris.st`>" ++ ma ++ "</action>" - ++ " |kbd|" + ++ ma + ++ " |EGPH| " ++ " {} " -- ++ "|mail|" + ++ " |kbd| " ++ "|multicpu| " ++ "|multicoretemp| " ++ " |top| " - ++ "|memory| " - ++ fc "grey60" "|diskio|" ++ " |disku| " - ++ " |EGPH| " - ++ fni "\xf017 " ++ "|datetime| " + ++ fni "\xf080" ++ " |memory| " + ++ fni "\xf0a0" ++ fc "grey60" " |diskio|" ++ " |disku| " + ++ fni "\xf017" ++ " |datetime| " + ++ "|laTime| " } where m = music p - ma = fc "grey40" (fni "\xf001 ") ++ "|" ++ alias m ++ "|" + ma = " |" ++ alias m ++ "| " w = (weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p) main :: IO () diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs index 99cd1ce..864088a 100644 --- a/src/lib/Monitors.hs +++ b/src/lib/Monitors.hs @@ -49,7 +49,7 @@ topProc' p = TopProc (p <~> ["-t" , "<mboth1> <mboth2> <mboth3> \ , "-w", "10", "-L" , "10", "-H", "80"]) 15 wireless p n = Wireless n (p >~< ["-t" , fc (pLow p) (fni "\xf1eb " ++ "<essid>") - -- <quality> + -- <quality>\xf09e , "-W", "5", "-M", "15" , "-m", "3" , "-L", "20", "-H", "80"]) 20 @@ -174,7 +174,10 @@ mail p = MailX [ ("I", "jao/inbox", pHigh p) masterVol p = Volume "default" "Master" ["-t", "<status> <volume>" + -- "<status> " ++ fni "<volumebar>" ++ " <volume>" + -- , "-W", "0", "-f", "\xf026\xf026\xf027\xf027\xf028\xf028\xf028" , "--", "-C", pForeground p, "-c", "sienna4" + -- , "-O", "" , "-O", fni "\xf025" -- "\xf130" -- fn 2 "🎧" , "-o", fn 4 "🔇" ] 10 diff --git a/src/lib/Music.hs b/src/lib/Music.hs index 39682bf..13a52a2 100644 --- a/src/lib/Music.hs +++ b/src/lib/Music.hs @@ -3,12 +3,12 @@ module Music where import Xmobar import Monitors import qualified Bottom -import Config (defaultHeight, pIsLight, pHigh, fc) +import Config (defaultHeight, pIsLight, pHigh, fc, fni) import GMPDP (GMPDP(..)) mpris p client width = Mpris2 client - ["-t", "<tracknumber> <title> " ++ fc (pHigh p) "<artist>" + ["-t", fni "\xf1bc" ++ " <tracknumber> <title> " ++ fc (pHigh p) "<artist>" ++ " <album> <length> <composer>" , "-T", show width, "-E", "…", "-M", "100", "-x", ""] 40 |