我正在尝试将XFCE时钟插件配置为使用自定义格式,但是
属性“/plugins/plugin-12/digital”在通道“xfce4-面板”中不存在。
$ xfconf-query -c xfce4-panel -p /plugins -lv | grep 'clock'
/plugins/plugin-12 clock$ xfconf-query -c xfce4-panel -p /plugins/plugin-12/digital-format -n '%T%n%Y-%m-%d'
Property "/plugins/plugin-12/digital-format" does not exist on channel "xfce4-panel".发布于 2022-03-20 05:45:32
xfconf-query文档很少,而且在参数顺序上很挑剔。您必须指定类型(-t字符串),-n或--create必须遵循-s (set)。
这样做是可行的:
$ xfconf-query -c xfce4-panel -p /plugins/plugin-12/digital-format -t "string" -s '%T%n%Y-%m-%d' -n学分:https://forum.xfce.org/viewtopic.php?id=8619
考虑以编程方式确定插件号:
$ plugin_name="$( xfconf-query -c xfce4-panel -p /plugins -lv | grep -E '/plugins/plugin-[0-9]+.*clock' | cut -d" " -f '1-1' )
$ xfconf-query -c xfce4-panel -p ${plugin_name}/digital-format -t "string" -s '%T%n%Y-%m-%d' -nhttps://unix.stackexchange.com/questions/696121
复制相似问题