ENH reformat xmobar
This commit is contained in:
parent
f3ef72bbe3
commit
a61b046200
|
@ -1,5 +1,7 @@
|
||||||
import Xmobar.Screensaver
|
import Xmobar.Screensaver
|
||||||
|
|
||||||
|
import Data.List
|
||||||
|
|
||||||
import Xmobar
|
import Xmobar
|
||||||
import XMonad (getXMonadDir)
|
import XMonad (getXMonadDir)
|
||||||
|
|
||||||
|
@ -22,17 +24,21 @@ sep :: String
|
||||||
sep = wrapColor fgColor1 " : "
|
sep = wrapColor fgColor1 " : "
|
||||||
|
|
||||||
myTemplate :: String
|
myTemplate :: String
|
||||||
myTemplate = concat
|
myTemplate = formatTemplate left right
|
||||||
[ "%UnsafeStdinReader%"
|
where
|
||||||
, " }{ "
|
formatTemplate l r = intercalate sep l
|
||||||
, "%screensaver%"
|
++ " }{ "
|
||||||
, sep, "%wlp0s20f3wi%"
|
++ intercalate sep r
|
||||||
, sep, "%alsa:default:Master%"
|
++ " "
|
||||||
, sep, "%battery%"
|
left = [ "%UnsafeStdinReader%" ]
|
||||||
, sep, "%bright%"
|
right = [ "%wlp0s20f3wi%"
|
||||||
, sep, "%locks%"
|
, "%alsa:default:Master%"
|
||||||
, sep, "%date% "
|
, "%battery%"
|
||||||
]
|
, "%bright%"
|
||||||
|
, "%screensaver%"
|
||||||
|
, "%locks%"
|
||||||
|
, "%date%"
|
||||||
|
]
|
||||||
|
|
||||||
config :: String -> Config
|
config :: String -> Config
|
||||||
config confDir = defaultConfig {
|
config confDir = defaultConfig {
|
||||||
|
@ -107,7 +113,7 @@ config confDir = defaultConfig {
|
||||||
|
|
||||||
, Run $ Date "%Y-%m-%d %H:%M" "date" 10
|
, Run $ Date "%Y-%m-%d %H:%M" "date" 10
|
||||||
|
|
||||||
, Run $ Screensaver ("<fn=1>\xf108</fn>", fgColor0, fgColor1) 10
|
, Run $ Screensaver ("<fn=1>\xf254</fn>", fgColor0, fgColor1) 10
|
||||||
|
|
||||||
, Run UnsafeStdinReader
|
, Run UnsafeStdinReader
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue