Skip to content

feat(squeekboard-toggle): add availability detection, hover icons, and settings#545

Merged
ItsLemmy merged 7 commits intonoctalia-dev:mainfrom
blackteaextract:sqt
Apr 5, 2026
Merged

feat(squeekboard-toggle): add availability detection, hover icons, and settings#545
ItsLemmy merged 7 commits intonoctalia-dev:mainfrom
blackteaextract:sqt

Conversation

@blackteaextract
Copy link
Copy Markdown
Contributor

@blackteaextract blackteaextract commented Apr 1, 2026

Summary

  • Squeekboard availability detection — checks whether sm.puri.OSK0 is present on the D-Bus session at startup (via busctl) and monitors it live (via dbus-monitor); widget reflects unavailability with an error icon, color, and tooltip
  • Hover icons — icon previews the action on hover (show/hide), adapting to bar position; can be disabled in settings
  • Settings UI — new Settings.qml with two toggles (hide widget when unavailable, disable hover icon) and a manual recheck button
  • Monitor resiliencedconf watch and dbus-monitor processes auto-restart on unexpected exit

Preview:

preview

What changed vs 1.0.0

Main.qml

  • Added pluginApi property (required for future IPC / settings access)
  • Added gsettingsOk and squeekboardOk flags, combined into available
  • Added squeekboardChecker (one-shot busctl call) for initial availability check
  • Added squeekboardMonitor (dbus-monitor) for live NameOwnerChanged events on sm.puri.OSK0
  • stateMonitor now auto-restarts on exit and re-runs stateChecker on restart
  • Added recheckState() function for manual re-sync from settings

BarWidget.qml

  • Reads available from mainInstance and gates click/color/icon on it
  • Dynamic icon: error state → current state → hover preview (direction-aware for bottom bars)
  • Tooltip keys extended: tooltip.noGsettings, tooltip.noSqueekboard
  • hideWhenUnavailable and disableHoverIcon settings wired up

Settings.qml (new)

  • NToggle for hide-when-unavailable
  • NToggle for disable-hover-icon
  • Recheck state button with 1.5 s confirmation feedback

i18n/

  • Added tooltip.noGsettings, tooltip.noSqueekboard
  • Added settings.hideWhenUnavailable.*, settings.disableHoverIcon.*, settings.recheck.*
  • All 18 language files updated

manifest.json

  • Version bumped 1.0.01.1.0
  • Added settings entry point
  • Added defaultSettings for hideWhenUnavailable and disableHoverIcon

How to test

  • Load the plugin and confirm the widget shows the current keyboard state
  • Click the widget — keyboard should toggle; icon and tooltip update
  • With Squeekboard running: hover over widget — hover icon should appear (unless bar is vertical)
  • Stop Squeekboard (pkill sqkeekboard) — widget should switch to error state without reloading the shell
  • Start Squeekboard again — widget should recover automatically
  • Open settings: toggle "Hide when unavailable", stop Squeekboard — widget should disappear
  • Open settings: toggle "Disable hover icon" — hover icon should stop appearing
  • Open settings: click "Recheck state" — button shows confirmation for 1.5 s
  • Verify settings persist across shell restarts

Copy link
Copy Markdown
Collaborator

@spiros132 spiros132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small feedback about the PR :)

Comment thread squeekboard-toggle/Main.qml Outdated
Copy link
Copy Markdown
Collaborator

@spiros132 spiros132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@ItsLemmy

@ItsLemmy ItsLemmy merged commit 16e2ffa into noctalia-dev:main Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants