In case it helps anyone I'm using this on Sway and with a Sway Greeter (sway+greetd+regreet)
Here's what I did.
Create a sway rule to disable fullscreen on the regreet app
for_window [app_id="regreet"] fullscreen disable;
exec /home/greeter/sway-keyboard.sh
exec "busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true"
And here's the /home/greeter/sway-keyboard.sh
-- you can hook this up to a waybar custom icon to invoke the keyboard manually as needed as-well.
#!/bin/bash
# WORKS -- GET KEYBOARD STATE
# https://source.puri.sm/Librem5/virtboard/-/merge_requests/18
# Output as JSON
# busctl --user get-property sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible -j | jq -r '.data'
# Required **
# ** SqueekBoard honors the gnome "screen-keyboard-enabled" setting.
# ** Either enable this through gnome-settings under accessibility or run:
# ** gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
# If any process containing "squeekboard" is RUNNING
# If "squeekboard" is showing
if [[ $(pgrep -f squeekboard) ]] && [[ $(busctl --user get-property sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible -j | jq -r '.data') == "true" ]]; then
# Set SqueekBoard to Visible
# https://source.puri.sm/Librem5/squeekboard/blob/master/README.md#running
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false
# Exit Script
exit
fi
# If any process containing "squeekboard" is RUNNING
# If "squeekboard" is NOT showing
if [[ $(pgrep -f squeekboard) ]] && [[ $(busctl --user get-property sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible -j | jq -r '.data') == "false" ]]; then
# Set SqueekBoard to Visible
# https://source.puri.sm/Librem5/squeekboard/blob/master/README.md#running
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
# Exit Script
exit
fi
# If anyprocess containing "squeekboard" is NOT RUNNING
if [[ ! $(pgrep -f squeekboard) ]]; then
# Launch SqueekBoard
# AS DARK THEME
env GTK_THEME=Adwaita:dark squeekboard
# Set SqueekBoard to Visible
# https://source.puri.sm/Librem5/squeekboard/blob/master/README.md#running
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
# Exit Script
exit
fi
Pinned Comments
electricprism commented on 2024-02-02 05:12 (UTC)
In case it helps anyone I'm using this on Sway and with a Sway Greeter (sway+greetd+regreet)
Here's what I did.
Create a sway rule to disable fullscreen on the regreet app
And here's the
/home/greeter/sway-keyboard.sh
-- you can hook this up to a waybar custom icon to invoke the keyboard manually as needed as-well.