如何使用此配置将秒表推送到 xsetroot 设置的状态栏

问题描述

我的系统和配置

  • windows 管理器:dwm 来自无用工具
  • 状态栏:xsetroot
  • 配置文件
$ cat ~/.xinitrc

~/scripts/mystatus.sh &
sxhkd &
while true; do
    # Log stderror to a file
    dwm 2> ~/.dwm.log
    # No error logging
    #dwm >/dev/null 2>&1
done
$ cat ~/scripts/mystatus.sh

while true;do
  date="$(date +%a\ %d\ %b\ %H:%M:%s)"
  # newStatus=??????
  exec xsetroot -name "$date" &
  # change to something like that
  # exec xsetroot -name "$newSatus" &
  sleep 1
done
}
$ cat ~/.config/sxhkd/sxhkdrc
# Start chronometre,by cut script that run in background by `.xinitrc`
super + shift + c
    kill -9 $(ps -ef|awk  '/mystatus/{print $2}'|grep -v "awk"|awk 'NR==1')

#

当我按下 Supper+shift+c 时如何在状态栏中启动计时

我的意见是这样的:

[[ `cat file.txt`=~"start"]] && let newStatus=$newStatus+1
  • 出口状态
    不工作,因为 sxhdk 从 xinitrc 分叉而不是状态栏
  • ...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)