Ubuntu22隐藏鼠标的指针(cursor)
目标:一段时间鼠标没有移动,则隐藏游标(cursor)
1.安装unclutter-xfixes(unclutter的修复版)
$ sudo apt-get update
$ sudo apt-get install unclutter-xfixes
2.启动unclutter-xfixes(一般启动)
# 5秒钟没有移动鼠标,则cursor消失
$ unclutter --timeout 5
3.启动unclutter-xfixes(启动之后,在后台运行)
# 5秒钟没有移动鼠标,则cursor消失
# 下图所示,unclutter进程id是6832
$ unclutter -b --timeout 5
# 如果要关闭unclutter,可使用kill命令
$ kill 6832
4.启动unclutter-xfixes(开机启动unclutter,并让它在后台运行)
# 在文件~/.bashrc写入下面的shell命令
# 表示开机启动,并且鼠标10秒未移动,则cursor消失
$ unclutter -b --timeout 10
5.参考资料
- 1.unclutter-xfixes的Github地址:https://github.com/Airblader/unclutter-xfixes
- 2.unclutter手册:man unclutter(在终端中执行)
- 3.ps命令手册:man ps(在终端中执行)
- 4.kill命令手册:man kill(在终端中执行)
- 5.参考博客:https://ostechnix.com/auto-hide-mouse-pointer-using-unclutter-after-a-certain-time/