|
- #!/bin/bash
- # use ${execi 5 pacstatus 5} in .conkyrc to display pacman information.
- # the number given after pacstatus determines how many lines of history you would like shown
- pacman -V | grep Pacman | cut -d " " -f 20-
- echo
- echo "last cmd - " `cat ~/.bash_history | grep "pacman " | tail -n1`
- echo "last Sy - " `cat /var/log/pacman.log | grep sync | tail -n1 | cut -d "[" -f 2 | cut -d "]" -f -1`
- echo "last Su - " `cat /var/log/pacman.log | grep "full system" | tail -n1 | cut -d "[" -f 2 | cut -d "]" -f -1`
- echo
- echo "last "$1" installed"
- cat /var/log/pacman.log | grep installed | tail -n $1 | cut -d " " -f 4,5
- echo
- echo "last "$1" removed"
- cat /var/log/pacman.log | grep removed | tail -n $1 | cut -d " " -f 4,5
复制代码
原帖:http://bbs.archlinux.org/viewtopic.php?id=44023
使用方法:把上述文件保存为一个文件,加上可执行权限,chmod +x,在conky配置文件TEXT下面某处添加
- ${exec 上面文件路径}
- [url=http://www.linuxsir.cn/bbs/thread324021.html#5][color=blue]具体看这里[/color][/url]
复制代码
当然你可以选择里面任意一行命令,就可以实现部分你需要的功能了,比方我的: |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|