mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 11:47:09 -04:00
(xmobar): create separate files for top and bottom bars
This commit is contained in:
parent
2b2ac95be8
commit
98846e4012
24
.config/xmonad/xmobar-bottom.hs
Normal file
24
.config/xmonad/xmobar-bottom.hs
Normal file
|
@ -0,0 +1,24 @@
|
|||
import Xmobar
|
||||
|
||||
config :: Config
|
||||
config =
|
||||
defaultConfig
|
||||
{ font = "Terminus 8",
|
||||
textOffset = 0,
|
||||
bgColor = "#121212",
|
||||
fgColor = "#cccccc",
|
||||
position = Bottom,
|
||||
template = " %disk-root% %disk-home% <fc=#777777>|</fc> %local-ip% <fc=#777777>|</fc> %ssid% }{ %now-playing% <fc=#777777>|</fc> %volume% ",
|
||||
commands =
|
||||
[ Run XMonadLog,
|
||||
Run $ Com "monitors" ["local_ip"] "local-ip" 6000,
|
||||
Run $ Com "monitors" ["ssid"] "ssid" 6000,
|
||||
Run $ Com "monitors" ["disk", "/"] "disk-root" 6000,
|
||||
Run $ Com "monitors" ["disk", "/home"] "disk-home" 6000,
|
||||
Run $ PipeReader "/tmp/pipe-volume" "volume",
|
||||
Run $ PipeReader "/tmp/pipe-now-playing" "now-playing"
|
||||
]
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
main = xmobar config
|
24
.config/xmonad/xmobar-top.hs
Normal file
24
.config/xmonad/xmobar-top.hs
Normal file
|
@ -0,0 +1,24 @@
|
|||
import Xmobar
|
||||
|
||||
config :: Config
|
||||
config =
|
||||
defaultConfig
|
||||
{ font = "Terminus 8",
|
||||
textOffset = 0,
|
||||
bgColor = "#121212",
|
||||
fgColor = "#cccccc",
|
||||
position = Top,
|
||||
template = " %XMonadLog% }{ \57958 %cpu% <fc=#777777>|</fc> \61381 %memory% <fc=#777777>|</fc> %load% <fc=#777777>|</fc> %battery% <fc=#777777>|</fc> <fc=#f7e83b>%date%</fc> ",
|
||||
commands =
|
||||
[ Run XMonadLog,
|
||||
Run $ PipeReader "/tmp/pipe-volume" "volume",
|
||||
Run $ Com "monitors" ["battery"] "battery" 3600,
|
||||
Run $ Com "monitors" ["cpu"] "cpu" 50,
|
||||
Run $ Com "monitors" ["memory"] "memory" 50,
|
||||
Run $ Com "monitors" ["load"] "load" 100,
|
||||
Run $ Date "%m/%d/%Y %H:%M:%S" "date" 10
|
||||
]
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
main = xmobar config
|
|
@ -1,24 +0,0 @@
|
|||
import Xmobar
|
||||
|
||||
config :: Config
|
||||
config = defaultConfig
|
||||
{ font = "Terminus 8"
|
||||
, textOffset = 0
|
||||
, bgColor = "#121212"
|
||||
, fgColor = "#cccccc"
|
||||
, position = Top
|
||||
, template = " %XMonadLog% }{ %network% <fc=#777777>|</fc> VOL %volume% <fc=#777777>|</fc> %battery% <fc=#777777>|</fc> CPU %cpu% <fc=#777777>|</fc> RAM %memory% <fc=#777777>|</fc> %load% <fc=#777777>|</fc> <fc=#f7e83b>%date%</fc> "
|
||||
, commands =
|
||||
[ Run XMonadLog
|
||||
, Run $ Com "monitors" ["network"] "network" 6000
|
||||
, Run $ PipeReader "/tmp/pipe-volume" "volume"
|
||||
, Run $ Com "monitors" ["battery"] "battery" 3600
|
||||
, Run $ Com "monitors" ["cpu"] "cpu" 50
|
||||
, Run $ Com "monitors" ["memory"] "memory" 50
|
||||
, Run $ Com "monitors" ["load"] "load" 600
|
||||
, Run $ Date "%d/%m/%Y %H:%M:%S" "date" 10
|
||||
]
|
||||
}
|
||||
|
||||
main :: IO ()
|
||||
main = xmobar config
|
|
@ -16,8 +16,21 @@ executable xmonad
|
|||
default-language: GHC2021
|
||||
default-extensions: ImportQualifiedPost
|
||||
|
||||
executable xmobar
|
||||
main-is: xmobar.hs
|
||||
executable xmobar-top
|
||||
main-is: xmobar-top.hs
|
||||
ghc-options:
|
||||
-O2 -Wall -Wcompat -Wincomplete-record-updates
|
||||
-Wredundant-constraints -rtsopts -threaded -with-rtsopts=-N
|
||||
|
||||
build-depends:
|
||||
, base
|
||||
, xmobar >=0.48
|
||||
|
||||
default-language: GHC2021
|
||||
default-extensions: ImportQualifiedPost
|
||||
|
||||
executable xmobar-bottom
|
||||
main-is: xmobar-bottom.hs
|
||||
ghc-options:
|
||||
-O2 -Wall -Wcompat -Wincomplete-record-updates
|
||||
-Wredundant-constraints -rtsopts -threaded -with-rtsopts=-N
|
||||
|
|
Loading…
Reference in a new issue