linux 上使用 D-Bus 控制Onboard
安装 onboard
sudo apt-get install onboard
# 安装 `acpid` 服务
sudo apt install acpid
# 启动`acpid`服务,并设置为开机自启
sudo systemctl enable --now acpid
# 自定义启动onboard
/usr/bin/onboard --not-show-in=GNOME,GNOME-Classic:GNOME --startup-delay=3.0 --layout=Compact --theme=Blackboard
- 使用D-Bus方法Hide来隐藏键盘窗口
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Hide
- 使用D-Bus方法Show来显示键盘窗口
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show
- 使用D-Bus方法ToggleVisible来切换键盘窗口的可见性
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible
原文地址:https://blog.csdn.net/qq_33343767/article/details/143432465
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!