From fd13bb27628cd39c393fd898c1c9957ce44eff9f Mon Sep 17 00:00:00 2001 From: OlivierChiasson Date: Sun, 21 Jun 2026 17:57:26 -0300 Subject: [PATCH] Initial commit --- README.md | 5 ++++ WvkbdToggle.qml | 51 +++++++++++++++++++++++++++++++++++++++++ WvkbdToggleSettings.qml | 16 +++++++++++++ plugin.json | 13 +++++++++++ 4 files changed, 85 insertions(+) create mode 100644 README.md create mode 100644 WvkbdToggle.qml create mode 100644 WvkbdToggleSettings.qml create mode 100644 plugin.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..b302810 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# wvkbdToggle — DMS bar plugin + +Bar widget for [DankMaterialShell](https://github.com/AvengeMedia/DankMaterialShell): toggles the on-screen keyboard via `pkill -SIGRTMIN wvkbd-mobintl`. + +Requires `wvkbd` (e.g. `wvkbd-mobintl`) on PATH in the DMS session. diff --git a/WvkbdToggle.qml b/WvkbdToggle.qml new file mode 100644 index 0000000..4986df5 --- /dev/null +++ b/WvkbdToggle.qml @@ -0,0 +1,51 @@ +import QtQuick +import Quickshell +import qs.Common +import qs.Services +import qs.Widgets +import qs.Modules.Plugins + +PluginComponent { + id: root + + function toggleKeyboard() { + Quickshell.execDetached(["sh", "-c", "pkill -SIGRTMIN -x wvkbd-mobintl"]); + } + + pillClickAction: () => root.toggleKeyboard() + + horizontalBarPill: Component { + MouseArea { + implicitWidth: icon.implicitWidth + implicitHeight: icon.implicitHeight + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: root.toggleKeyboard() + + DankIcon { + id: icon + name: "keyboard" + size: Theme.iconSize + color: parent.containsMouse ? Theme.primary : Theme.surfaceText + } + } + } + + verticalBarPill: Component { + MouseArea { + implicitWidth: iconV.implicitWidth + implicitHeight: iconV.implicitHeight + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: root.toggleKeyboard() + + DankIcon { + id: iconV + name: "keyboard" + size: Theme.iconSize + color: parent.containsMouse ? Theme.primary : Theme.surfaceText + anchors.horizontalCenter: parent.horizontalCenter + } + } + } +} diff --git a/WvkbdToggleSettings.qml b/WvkbdToggleSettings.qml new file mode 100644 index 0000000..d7a2fed --- /dev/null +++ b/WvkbdToggleSettings.qml @@ -0,0 +1,16 @@ +import QtQuick +import qs.Common +import qs.Modules.Plugins + +PluginSettings { + id: root + pluginId: "wvkbdToggle" + + StyledText { + width: parent.width + text: "Click the keyboard icon in the bar to show or hide the on-screen keyboard (wvkbd)." + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceVariantText + wrapMode: Text.WordWrap + } +} diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..ee9220b --- /dev/null +++ b/plugin.json @@ -0,0 +1,13 @@ +{ + "id": "wvkbdToggle", + "name": "Virtual Keyboard Toggle", + "description": "Bar button to show/hide the wvkbd on-screen keyboard (for touch/tablet)", + "version": "1.0.0", + "author": "chiasson.cloud", + "type": "widget", + "capabilities": ["dankbar-widget"], + "component": "./WvkbdToggle.qml", + "settings": "./WvkbdToggleSettings.qml", + "icon": "keyboard", + "permissions": ["settings_read"] +}