मैं खुशी से अपने विंडो मैनेजर के रूप में xmonad के साथ xmobar का उपयोग कर रहा हूं ।
जब xmonad का कॉन्फ़िगरेशन बदल रहा है, मैं नए कॉन्फ़िगरेशन को प्रभावी बनाने के लिए mod+ qका उपयोग करता हूं ।
यह xmonad के लिए ठीक काम करता है, लेकिन मैंने देखा कि xmobar अपने कॉन्फ़िगरेशन को फिर से लोड नहीं करता है।
मैं xmobar के कॉन्फ़िगरेशन को कैसे पुनः लोड कर सकता हूं?
में मेरा वर्तमान विन्यास xmonad.hs
है
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")
]
यह विन्यास है .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
}