Initial commit
This commit is contained in:
@@ -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.
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -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"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user