Konfiguration von xmobar neu laden

371
Matthias Braun

Ich verwende xmobar gerne mit xmonad als Fenstermanager.

Beim Ändern der Konfiguration von xmonad verwende ich mod+ q, um die neue Konfiguration wirksam zu machen.

Dies funktioniert gut für xmonad, aber ich habe festgestellt, dass xmobar seine Konfiguration nicht neu lädt.

Wie kann ich die xmobar-Konfiguration neu laden?


Meine aktuelle Konfiguration xmonad.hsist

import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import System.IO  main = do  xmproc <- spawnPipe "xmobar"  xmonad $ defaultConfig { manageHook = manageDocks <+> manageHook defaultConfig, layoutHook = avoidStruts $ layoutHook defaultConfig -- Without this, the xmonad pane would hide xmobar -- From https://unix.stackexchange.com/questions/288037/xmobar-does-not-appear-on-top-of-window-stack-when-xmonad-starts/303242, handleEventHook = handleEventHook defaultConfig <+> docksEventHook, logHook = dynamicLogWithPP xmobarPP { ppOutput = hPutStrLn xmproc, ppTitle = xmobarColor "green" "" . shorten 50 }, modMask = mod4Mask -- Rebind Mod to the Windows key, terminal = "urxvt", borderWidth = 1, normalBorderColor = "#edf9ee", focusedBorderColor = "dark green", focusFollowsMouse = False } `additionalKeys` [ -- Toggle xmobar using mod + b ((mod4Mask, xK_b), sendMessage ToggleStruts) -- Make a screenshot of the whole screen with the print key, ((0, xK_Print), spawn "import -window root screenshot_$(date +%F_%H-%M-%S).png") ] 

Dies ist die Konfiguration von .xmobarrc:

-- Configure the status bar for xmonad: https://wiki.archlinux.org/index.php/Xmobar Config { font = "-*-Fixed-Bold-R-Normal-*-15-*-*-*-*-*-*-*", borderColor = "black", border = TopB, bgColor = "blue", fgColor = "grey", position = TopW L 100, commands = [ Run MultiCpu ["-t","Cpu: <total0> <total1> <total2> <total3>","-L","30","-H","60","-h","#FFB6B0","-l","#CEFFAC","-n","#FFFFCC","-w","3"] 10, Run Memory ["-t","Mem: <usedratio>%"] 10, Run Battery ["-t","Bat: <left>% / <timeleft>","-L","30","-H","60","-h","green","-n","yellow","-l","red"] 10, Run Com "uname" ["-s","-r"] "" 36000, Run Date "%a %F %H:%M" "date" 10 ], sepChar = "%", alignSep = "}{", template = "%multicpu% | %memory% | %battery%}{<fc=#ee9a00>%date%</fc> | %uname% ", hideOnStart = False, persistent = True } 
0

1 Antwort auf die Frage

0
Matthias Braun

Da xmonad eine neu gestartete xmobar-Datei anzeigen wird, benutze ich sie

killall xmobar; xmobar & 

in meinem Terminal, um die Änderungen .xmobarrcwirksam zu machen .