From 7d6e83479719e04b77a8230a7ecf03e971cd5fc6 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 21 Nov 2022 20:20:46 -0700 Subject: Update to xmobar --- extras/HOME/.xmobarrc | 18 +++++++++--------- 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% %uname% \ \%UnsafeStdinReader%}{\ - \ %cpu% %memory% \ + \ %cpu% %memory% \ \\ - \%weather% \ + \%weather% \ \\ - \%media% \ - \%bluetooth% %bat% %time% " + \%media% \ + \%bluetooth% %bat% %time% " , 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 " " _ -> return () - if not (null theaters) - then tell "| " - else return () + unless (null theaters) $ + tell "| " forM_ wss $ \(t, ws) -> do case t of -- cgit