mirror of
https://codeberg.org/frosty/xmonad.hs.git
synced 2024-09-19 03:36:45 -04:00
switch to single xmobar, simplify setup
This commit is contained in:
parent
5f157759c3
commit
f63123528c
|
@ -1,24 +0,0 @@
|
||||||
import Xmobar
|
|
||||||
|
|
||||||
config :: Config
|
|
||||||
config =
|
|
||||||
defaultConfig
|
|
||||||
{ font = "Terminus 8",
|
|
||||||
textOffset = 0,
|
|
||||||
bgColor = "#121212",
|
|
||||||
fgColor = "#cccccc",
|
|
||||||
position = Bottom,
|
|
||||||
template = " %disk-root% <fc=#777777>|</fc> %disk-home% <fc=#777777>|</fc> %status-redshift% <fc=#777777>|</fc> %status-udiskie% }{ %now-playing% <fc=#777777>|</fc> %volume% ",
|
|
||||||
commands =
|
|
||||||
[ Run XMonadLog,
|
|
||||||
Run $ Com "monitors" ["disk", "/"] "disk-root" 35000,
|
|
||||||
Run $ Com "monitors" ["disk", "/home"] "disk-home" 35000,
|
|
||||||
Run $ Com "monitors" ["service", "redshift"] "status-redshift" 6000,
|
|
||||||
Run $ Com "monitors" ["service", "udiskie"] "status-udiskie" 6000,
|
|
||||||
Run $ PipeReader "/tmp/pipe-now-playing" "now-playing",
|
|
||||||
Run $ PipeReader "/tmp/pipe-volume" "volume"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = xmobar config
|
|
|
@ -8,13 +8,14 @@ config =
|
||||||
bgColor = "#121212",
|
bgColor = "#121212",
|
||||||
fgColor = "#cccccc",
|
fgColor = "#cccccc",
|
||||||
position = Top,
|
position = Top,
|
||||||
template = " %XMonadLog% }{ \61381 %memory% <fc=#777777>|</fc> %load% <fc=#777777>|</fc> \62153 %cpu% <fc=#777777>|</fc> %battery% <fc=#777777>|</fc> <fc=#f7e83b>%date%</fc> ",
|
template = " %XMonadLog% }{ %volume% <fc=#777777>|</fc> %load% <fc=#777777>|</fc> %battery% <fc=#777777>|</fc> <fc=#f7e83b>%date%</fc> ",
|
||||||
commands =
|
commands =
|
||||||
[ Run XMonadLog,
|
[ Run XMonadLog,
|
||||||
Run $ Com "monitors" ["battery"] "battery" 1200,
|
Run $ Com "monitors" ["battery"] "battery" 1200,
|
||||||
Run $ Com "monitors" ["cpu"] "cpu" 100,
|
Run $ Com "monitors" ["cpu"] "cpu" 100,
|
||||||
Run $ Com "monitors" ["memory"] "memory" 100,
|
Run $ Com "monitors" ["memory"] "memory" 100,
|
||||||
Run $ Com "monitors" ["load"] "load" 100,
|
Run $ Com "monitors" ["load"] "load" 100,
|
||||||
|
Run $ PipeReader "/tmp/pipe-volume" "volume",
|
||||||
Run $ Date "%m/%d/%Y %-I:%M %p" "date" 600
|
Run $ Date "%m/%d/%Y %-I:%M %p" "date" 600
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -16,6 +16,19 @@ executable xmonad
|
||||||
default-language: GHC2021
|
default-language: GHC2021
|
||||||
default-extensions: ImportQualifiedPost
|
default-extensions: ImportQualifiedPost
|
||||||
|
|
||||||
|
executable xmobar
|
||||||
|
main-is: xmobar.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-top
|
executable xmobar-top
|
||||||
main-is: xmobar-top.hs
|
main-is: xmobar-top.hs
|
||||||
ghc-options:
|
ghc-options:
|
||||||
|
|
|
@ -26,8 +26,7 @@ import XMonad.Util.NamedScratchpad
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main =
|
main =
|
||||||
xmonad
|
xmonad
|
||||||
. withSB (statusBarProp "xmobar-bottom" $ pure myPP)
|
. withSB (statusBarProp "xmobar" $ pure myPP)
|
||||||
. withSB (statusBarProp "xmobar-top" $ pure myPP)
|
|
||||||
. toggleFullFloatEwmhFullscreen
|
. toggleFullFloatEwmhFullscreen
|
||||||
. ewmhFullscreen
|
. ewmhFullscreen
|
||||||
. ewmh
|
. ewmh
|
||||||
|
|
Loading…
Reference in a new issue