Xmobar 在尝试 运行 脚本时是 "Updating"
Xmobar is "Updating" when attempting to run script
我的问题是,当我为布局提供我一起破解的 C 脚本(可执行文件)的路径时,我的 Xmobar 说它正在“更新...”。我包括了 运行 Stdinreader,这对这个问题没有任何影响。
我的印象是,如果脚本可以输出到终端,它也可以输出到 Xmobar。此 C 脚本负责根据指定的条件将报价打印到终端。我不需要脚本本身的帮助(尽管它很匆忙并且可以更好地构建)。我只想知道:
这是与 Xmobar 和 C 不兼容的问题吗?或者,我是不是忘了做一些让任务栏输出正确内容的事情?
我的 Xmobar 配置是:
Config {
--this is an edited dotfile from the example shown from the Archlinux wiki for the xmobarrc file. This is a good starting point (and may also serve as a regular status bar *as in my case it does)
--This is not my original work from scratch; these are merely my edits for my personal taste. For instance, I removed the Weather module and heavily edited the colors
-- appearance
font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "#020616"
, fgColor = "#9e9e9e"
, position = Top
, border = BottomB
, borderColor = "#020616"
-- behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands =
[ Run Weather "RJTT" [ "--template", "<skyCondition> | <fc=#4682B4><tempC></fc>°C | <fc=#4682B4><rh></fc>% | <fc=#4682B4><pressure></fc>hPa"
] 36000 --edits: Weather ia omitted from my layout
-- network activity monitor (dynamic interface resolution)
, Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
, "--Low" , "1000" -- units: B/s
, "--High" , "5000" -- units: B/s
, "--low" , "#98b7d1"
, "--normal" , "#98b7d1"
, "--high" , "#98b7d1"
] 10
-- cpu activity monitor
, Run MultiCpu [ "--template" , "Cpu: <total0>%|<total1>%"
, "--Low" , "50" -- units: %
, "--High" , "85" -- units: %
, "--low" , "#9e9e9e"
, "--normal" , "#6f90c9"
, "--high" , "#6f90c9"
] 10
, Run StdinReader
-- cpu core temperature monitor
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C"
, "--Low" , "70" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , "#9e9e9e"
, "--normal" , "#ead581"
, "--high" , "#6f90c9"
] 50
-- memory usage monitor
, Run Memory [ "--template" ,"Mem: <usedratio>%"
, "--Low" , "20" -- units: %
, "--High" , "90" -- units: %
, "--low" , "#9e9e9e"
, "--normal" , "#ead581"
, "--high" , "#f77647"
] 10
-- battery monitor
, Run Battery [ "--template" , "Batt: <acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "#f77647"
, "--normal" , "#dde298"
, "--high" , "#b8e298"
, "--" -- battery specific options
-- discharging status
, "-o" , " <left>% <fc=#efaf5b> (<timeleft>) </fc>"
-- AC "on" status
, "-O" , "<fc=#dd5d6c>Currently Charging</fc>"
-- charged status
, "-i" , "<fc=#60e9ff>Fully Charged</fc>"
] 50
-- time and date indicator
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#C8E86A>%F (%a) %r</fc>" "date" 10
]
}
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "Current User: <fc=#f77647> %whoami% </fc>| <fc=#787773> %~/scripting/taskbarquote% </fc> }{| <fc=#98b7d1> %dynnetwork% </fc>| %date% | %battery% ||%multicpu% | %coretemp% | %memory% "
谢谢。
这将是 C 脚本。上面是问题:
今天做了更多研究。这里的问题是 %% 算作“运行”的参数,但在它上面是它应该被定义的地方。不是。
我刚刚将 %diskspace% 用于输出我的接收器卷的新脚本。它与 C 脚本的工作方式相同。
我看到你得到了答案 - 虽然我不明白。你应该使用的是 运行 Com 来执行你的脚本。
我的问题是,当我为布局提供我一起破解的 C 脚本(可执行文件)的路径时,我的 Xmobar 说它正在“更新...”。我包括了 运行 Stdinreader,这对这个问题没有任何影响。
我的印象是,如果脚本可以输出到终端,它也可以输出到 Xmobar。此 C 脚本负责根据指定的条件将报价打印到终端。我不需要脚本本身的帮助(尽管它很匆忙并且可以更好地构建)。我只想知道:
这是与 Xmobar 和 C 不兼容的问题吗?或者,我是不是忘了做一些让任务栏输出正确内容的事情?
我的 Xmobar 配置是:
Config {
--this is an edited dotfile from the example shown from the Archlinux wiki for the xmobarrc file. This is a good starting point (and may also serve as a regular status bar *as in my case it does)
--This is not my original work from scratch; these are merely my edits for my personal taste. For instance, I removed the Weather module and heavily edited the colors
-- appearance
font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "#020616"
, fgColor = "#9e9e9e"
, position = Top
, border = BottomB
, borderColor = "#020616"
-- behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands =
[ Run Weather "RJTT" [ "--template", "<skyCondition> | <fc=#4682B4><tempC></fc>°C | <fc=#4682B4><rh></fc>% | <fc=#4682B4><pressure></fc>hPa"
] 36000 --edits: Weather ia omitted from my layout
-- network activity monitor (dynamic interface resolution)
, Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
, "--Low" , "1000" -- units: B/s
, "--High" , "5000" -- units: B/s
, "--low" , "#98b7d1"
, "--normal" , "#98b7d1"
, "--high" , "#98b7d1"
] 10
-- cpu activity monitor
, Run MultiCpu [ "--template" , "Cpu: <total0>%|<total1>%"
, "--Low" , "50" -- units: %
, "--High" , "85" -- units: %
, "--low" , "#9e9e9e"
, "--normal" , "#6f90c9"
, "--high" , "#6f90c9"
] 10
, Run StdinReader
-- cpu core temperature monitor
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C"
, "--Low" , "70" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , "#9e9e9e"
, "--normal" , "#ead581"
, "--high" , "#6f90c9"
] 50
-- memory usage monitor
, Run Memory [ "--template" ,"Mem: <usedratio>%"
, "--Low" , "20" -- units: %
, "--High" , "90" -- units: %
, "--low" , "#9e9e9e"
, "--normal" , "#ead581"
, "--high" , "#f77647"
] 10
-- battery monitor
, Run Battery [ "--template" , "Batt: <acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "#f77647"
, "--normal" , "#dde298"
, "--high" , "#b8e298"
, "--" -- battery specific options
-- discharging status
, "-o" , " <left>% <fc=#efaf5b> (<timeleft>) </fc>"
-- AC "on" status
, "-O" , "<fc=#dd5d6c>Currently Charging</fc>"
-- charged status
, "-i" , "<fc=#60e9ff>Fully Charged</fc>"
] 50
-- time and date indicator
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#C8E86A>%F (%a) %r</fc>" "date" 10
]
}
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "Current User: <fc=#f77647> %whoami% </fc>| <fc=#787773> %~/scripting/taskbarquote% </fc> }{| <fc=#98b7d1> %dynnetwork% </fc>| %date% | %battery% ||%multicpu% | %coretemp% | %memory% "
谢谢。
这将是 C 脚本。上面是问题:
今天做了更多研究。这里的问题是 %% 算作“运行”的参数,但在它上面是它应该被定义的地方。不是。
我刚刚将 %diskspace% 用于输出我的接收器卷的新脚本。它与 C 脚本的工作方式相同。
我看到你得到了答案 - 虽然我不明白。你应该使用的是 运行 Com 来执行你的脚本。