diff options
Diffstat (limited to 'src/Single.hs')
-rw-r--r-- | src/Single.hs | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/Single.hs b/src/Single.hs index 44dd6f7..e7ecee6 100644 --- a/src/Single.hs +++ b/src/Single.hs @@ -2,10 +2,11 @@ import Xmobar import Config import Monitors -topProcL p = TopProc (p <~> args) 15 - where template = "<both1> <both2> <both3> <both4> " - ++ "· <mboth1> <mboth2> <mboth3> <mboth4>" - args = ["-t", template, "-w", "12", "-L" , "10", "-H", "80"] +topProcL p s = TopProc (p <~> args) 15 + where temp | s = "<both1> <both2> <both3> · <mboth1> <mboth2> <mboth3>" + | otherwise = "<both1> <both2> <both3> <both4> " + ++ "· <mboth1> <mboth2> <mboth3> <mboth4>" + args = ["-t", temp, "-w", "12", "-L" , "10", "-H", "80"] diskIOS p = DiskIO [("/", "<read> <write>")] (diskArgs p) 10 @@ -16,18 +17,18 @@ memory' = Memory args 20 where template = "<used> <available>" args = ["-t", template , "-p", "2", "-d", "1", "--", "--scale", "1024"] -master on off p = Volume "default" "Master" (args ++ ("--":ext)) 10 - where args = ["-t", "<status> <volume>"] - ext = ["-C", pForeground p, "-c", "sienna4", "-O", on, "-o", off] - config p = (baseConfig p) { - position = TopSize C 100 (defaultHeight - 2) - , textOffset = offset - , textOffsets = [offset - 1, offset - 1, offset + 2 , offset, offset + 1] - , bgColor = if pIsLight p then "gray94" else "black" - , alpha = 255 + position = TopSize C 100 24 + , bgColor = if pIsLight p then "#f0f0f0" else "black" + , alpha = 233 , border = FullB - , commands = [ Run (topProcL p) + , textOffsets = [] + , textOffset = 0 + , iconOffset = 0 + -- , font = "Source Code Pro, Noto Color Emoji Regular 9, Italic 9" + -- , font = "DejaVu Sans Mono, Noto Color Emoji 9, Regular 9" + , font = "Hack, Noto Color Emoji Regular 9, Light 9" + , commands = [ Run (topProcL p isXmonad) , Run (load p) , Run (iconBatt p) , Run (cpuBars p) @@ -40,26 +41,29 @@ config p = (baseConfig p) { , Run (dynNetwork p) , Run (vpnMark "wg-mullvad") , Run tun0 - , Run (master (dimi "\xf025") (dimi "\xf131") p) + , Run (masterVol p) , Run captureVol , Run laTime , Run localTime , Run (cpuFreq' p) - , Run (weather' wt "EGPH" p) + , Run (weather "EGPH" p) + -- , Run nmmail ] ++ extraCmds , template = trayT ++ " |batt0| " ++ "<action=`toggle-app.sh nm-applet`>" - ++ " |wg-mullvad||tun0||wlp164s0wi|" + ++ " <fc=#000000>|wg-mullvad||tun0||wlp164s0wi|</fc>" ++ "</action>" ++ " |dynnetwork| " ++ "<action=`toggle-app.sh pasystray`>" ++ " |default:Master| " ++ dimi "\xf130" ++ " |default:Capture|" ++ "</action>" - ++ " |EGPH| " + ++ " |EGPH|" + -- ++ fc "sienna4" " |mail|" + ++ " |kbd|" + ++ "{" ++ eLog p - ++ " {} " - ++ "|kbd|" + ++ "}" ++ " |multicpu|" ++ " |cpufreq|" ++ " |multicoretemp|" @@ -68,9 +72,7 @@ config p = (baseConfig p) { ++ dimi "\xf0a0" ++ "|diskio| |disku| " ++ " |datetime| " ++ " |laTime| " - } where dimi = fc "grey50" . fn 7 - offset = defaultHeight - 8 - wt = "<skyConditionS> <tempC>° <windKmh>" ++ fn 5 "🌫" ++ " <weather>" + } where dimi = fc "grey40" . fn 1 isXmonad = pWm p == Just "xmonad" trayT = if isXmonad then "|tray|" else "" eLog p = if isXmonad then "|XMonadLog|" else fc (pHigh p) "|elog|" |