diff options
| -rw-r--r-- | extras/HOME/.xmobarrc | 18 | ||||
| -rw-r--r-- | src/Rahm/Desktop/XMobarLog.hs | 9 |
2 files changed, 13 insertions, 14 deletions
diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 85e3cea..efd7865 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -1,13 +1,13 @@ Config { font = "xft:Monofur Nerd Font:size=12" , additionalFonts = [ - "xft:Monofur bold Nerd Font:style=bold:size=12", - "xft:Monofur bold Nerd Font:size=9", "xft:Monofur bold Nerd Font:style=bold:size=10", + "xft:Monofur bold Nerd Font:size=7", + "xft:Monofur bold Nerd Font:style=bold:size=8", "xft:Monofur Nerd Font:size=6", - "xft:Monofur bold Nerd Font:size=20", - "xft:Monofur Nerd Font:style=bold:size=10", - "xft:Noto Sans Mono CJK JP:style=bold:size=10" + "xft:Monofur bold Nerd Font:size=18", + "xft:Monofur Nerd Font:style=bold:size=8", + "xft:Noto Sans Mono CJK JP:style=bold:size=8" ] , borderColor = "black" , border = FullBM -1 @@ -30,12 +30,12 @@ Config , template = " %logo% <fc=#a0a0a0><fn=3>%uname%</fn></fc> \ \%UnsafeStdinReader%}{\ - \ %cpu% %memory% <fc=#404040>\ + \ %cpu% %memory% <fc=#404040>\ \<action=alacritty -t 'Floating Term' -e sh -c 'curl wttr.in ; read i'>\ - \%weather% \ + \%weather% \ \</action>\ - \</fc><fc=#a0a0a0>%media% </fc>\ - \%bluetooth% %bat%<fn=3><fc=#8888ff> %time%</fc></fn> " + \</fc><fc=#a0a0a0>%media% </fc>\ + \%bluetooth% %bat%<fn=3><fc=#8888ff> %time%</fc></fn> " , commands = [ Run UnsafeStdinReader, Run Date "%m/%d %H:%M:%S" "time" 10, diff --git a/src/Rahm/Desktop/XMobarLog.hs b/src/Rahm/Desktop/XMobarLog.hs index d1d131c..286c74b 100644 --- a/src/Rahm/Desktop/XMobarLog.hs +++ b/src/Rahm/Desktop/XMobarLog.hs @@ -1,7 +1,7 @@ module Rahm.Desktop.XMobarLog (XMobarLog, spawnXMobar, xMobarLogHook) where import Control.Arrow (second) -import Control.Monad (forM_) +import Control.Monad (forM_, unless) import Control.Monad.Writer (execWriter, tell) import Data.Char (isAsciiLower, isAsciiUpper, isDigit) import Data.List (sortBy) @@ -19,7 +19,7 @@ import qualified XMonad as X import XMonad.Util.NamedWindows (getName) import XMonad.Util.Run (spawnPipe) -data XMobarLog = XMobarLog Handle +newtype XMobarLog = XMobarLog Handle -- The log hook for XMobar. This is a custom log hook that does not use any -- of the Xmonad dynamic log libraries. @@ -64,9 +64,8 @@ xMobarLogHook (XMobarLog xmproc) = do tell " </fc></fn>" _ -> return () - if not (null theaters) - then tell "| " - else return () + unless (null theaters) $ + tell "| " forM_ wss $ \(t, ws) -> do case t of |