安装 onboard
bash
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来隐藏键盘窗口
bash
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Hide
- 使用D-Bus方法Show来显示键盘窗口
bash
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show
- 使用D-Bus方法ToggleVisible来切换键盘窗口的可见性
bash
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible