We can improve XMonad configuration, by removing extensive use of conky. Everytime I look at XMonad dotfiles, conky is used as a feed to dzen2 in statusbar. I can understand the need of using conky-dzen tier from portability between WM perpective. But portability have its drawback.
Removing Conky Dependency between XMonad and Dzen2
Conky is completely unnecessary,
and you can replace conky with simple
while sleep do bash script.
The second issue with conky is total control of color for theming. There is no way that xmonad configuration could alter colors inside conky. All colors should be in haskell variables, not as a constant inside the conky, nor inside bash script.
So here we are, the result os porting bunch of conkys and bash-scripts, and bundle it inside just one haskell script.
+ WM: XMonad
+ Compositor: Compton
+ Statusbar: Dzen2 without Conky
+ Terminal: Termite
+ Viewer: VIM (Vi IMproved)
Let’s compare this code, and see how our code transformed.
That one right side console box contain haskell script for conkyless statusbar.
Those two left side console boxes contain conky and bash script.
There always a challenge.
If you think that the script above is not easy to be read.
Yes, It is.
As you can see, each line is a bash command inside haskell. So the next step is to make the sleep loop as a native haskell script.
And pipe the native IO process to dzen2.
Well. As a haskell n00b. I must admit still don’t know how to do it.