diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-21 17:04:08 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-04-21 17:04:08 -0600 |
| commit | 8df47403a0f5ed1a3ef853e25868fa305b2f3a1b (patch) | |
| tree | 349db2c923963b719a76e967ecf1bda94a649c95 | |
| parent | 6bfec2037120cd5e3dbd46f7f911fbfb9b718daf (diff) | |
| download | rde-8df47403a0f5ed1a3ef853e25868fa305b2f3a1b.tar.gz rde-8df47403a0f5ed1a3ef853e25868fa305b2f3a1b.tar.bz2 rde-8df47403a0f5ed1a3ef853e25868fa305b2f3a1b.zip | |
Some changes to XMobar look and feel
| -rw-r--r-- | extras/HOME/.xmobarrc | 12 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Layout/Draw.hs | 24 | ||||
| -rw-r--r-- | src/Rahm/Desktop/XMobarLog.hs | 4 |
3 files changed, 23 insertions, 17 deletions
diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 25568bd..e5f9167 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -2,8 +2,8 @@ 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 Nerd Font:size=9", + "xft:Monofur bold Nerd Font:size=9", + "xft:Monofur bold Nerd Font:style=bold:size=10", "xft:Monofur Nerd Font:size=6", "xft:Monofur bold Nerd Font:size=20", "xft:Monofur Nerd Font:style=bold:size=10", @@ -30,17 +30,17 @@ 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%\ \</action>\ \</fc><fc=#a0a0a0>%media%</fc>\ - \%bluetooth%%bat%<fn=2><fc=#606060> %time%</fc></fn> " + \%bluetooth%%bat%<fn=3><fc=#8888ff> %time%</fc></fn> " , commands = [ Run UnsafeStdinReader, Run Date "%m/%d %H:%M:%S" "time" 10, Run Cpu [ - "-t", "<fn=3><fc=#000000><bar></fc></fn>", + "-t", "<fn=3><fc=#202020><bar></fc></fn>", "-L", "3", "-H", "50", "-b", "-", @@ -49,7 +49,7 @@ Config "--high", "#ff8888" ] 10, Run Memory [ - "-t", "<fn=3><fc=#000000><usedbar></fc></fn>", + "-t", "<fn=3><fc=#202020><usedbar></fc></fn>", "-L", "3", "-H", "50", "-b", "-", diff --git a/src/Rahm/Desktop/Layout/Draw.hs b/src/Rahm/Desktop/Layout/Draw.hs index aa4dba3..8380e98 100644 --- a/src/Rahm/Desktop/Layout/Draw.hs +++ b/src/Rahm/Desktop/Layout/Draw.hs @@ -130,23 +130,29 @@ drawXpm :: drawXpm (w, h) rects' shrinkAmt = execWriter $ do tell "/* XPM */\n" tell "static char *out[] = {\n" - tell $ printf "\"%d %d %d 1 \",\n" w h (length rects + 1) + tell $ printf "\"%d %d %d 1 \",\n" (w + 7) (h + 7) (length rects + 1) let zipRects = zip ['A' .. 'Z'] rects forM_ zipRects $ \(char, (color, _)) -> do tell $ printf "\"%c c %s\",\n" char color - tell "\"% c None\",\n" - - forM_ [0 .. h - 1] $ \y -> do - tell "\"" - forM_ [0 .. w - 1] $ \x -> + tell "\"% c #000000\",\n" + + forM_ [0..2] $ \_ -> do + tell "\"%%%" + forM_ [0 .. w] $ \_ -> tell "%" + tell "%%%\"\n" + forM_ [0 .. h] $ \y -> do + tell "\"%%%" + forM_ [0 .. w] $ \x -> (case find (matches x y) zipRects of Nothing -> tell "%" Just (chr, _) -> tell [chr]) - tell "\"" - when (y /= h - 1 - shrinkAmt) (tell ",") - tell "\n" + tell "%%%\"\n" + forM_ [0..2] $ \_ -> do + tell "\"%%%" + forM_ [0 .. w] $ \_ -> tell "%" + tell "%%%\"\n" tell "};\n" where diff --git a/src/Rahm/Desktop/XMobarLog.hs b/src/Rahm/Desktop/XMobarLog.hs index 637670e..d0dcc4f 100644 --- a/src/Rahm/Desktop/XMobarLog.hs +++ b/src/Rahm/Desktop/XMobarLog.hs @@ -46,7 +46,7 @@ xMobarLogHook (XMobarLog xmproc) = do hPutStrLn xmproc $ trunc 80 $ execWriter $ do tell " " tell layoutXpm - tell $ " " + tell $ " " forM_ wss $ \(t, ws) -> do case t of @@ -57,7 +57,7 @@ xMobarLogHook (XMobarLog xmproc) = do tell $ toAction $ S.tag ws tell " </fc></fn>" - tell $ " <fc=#a0a0a0><fn=3>" + tell $ " <fc=#ff8888><fn=3>" tell $ title tell $ "</fn></fc>" |