尝试运行脚本时 Xmobar 正在“更新”

问题描述

我的问题是,当我为布局提供我一起破解的 C 脚本(可执行文件)的路径时,我的 Xmobar 说它正在“更新...”。我包含了 Run 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","--high","#98b7d1"
                             ] 10

        -- cpu activity monitor,Run MultiCpu       [ "--template","Cpu: <total0>%|<total1>%","50"         -- units: %,"85"         -- units: %,"#9e9e9e","#6f90c9","#6f90c9"
                             ] 10,Run StdinReader
        -- cpu core temperature monitor,Run CoreTemp       [ "--template","Temp: <core0>°C|<core1>°C","70"        -- units: °C,"80"        -- units: °C,"#ead581","#6f90c9"
                             ] 50
                          
        -- memory usage monitor,Run Memory         [ "--template","Mem: <usedratio>%","20"        -- units: %,"90"        -- units: %,"#f77647"
                             ] 10

        -- battery monitor,Run Battery        [ "--template","Batt: <acstatus>","10"        -- units: %,"80"        -- units: %,"#f77647","#dde298","#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 脚本。上面是问题:

enter image description here

解决方法

今天做了更多研究。这里的问题是 %% 算作“运行”某些东西的参数,但在它之上是应该定义它的地方。不是。

我刚刚将 %diskspace% 用于输出我的接收器卷的新脚本。它与 C 脚本的工作方式相同。

,

我看到你得到了答案 - 虽然我不明白。您应该使用 Run Com 来执行您的脚本。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...