add readme + missing files

This commit is contained in:
umorist 2026-03-08 03:58:37 +03:00
parent cf12c943f7
commit b8f9c92138
3 changed files with 116 additions and 0 deletions

11
README.md Normal file
View file

@ -0,0 +1,11 @@
# 🐾 MeowRelay plasmoid
Almost fully ported MeowRelay configurator to native kde plasmoid
![Plasmoid](https://git.meowfox.net/MeowRelay/kde-widget/src/branch/main/screenshots/screenshot.png)
## Installation
```
git clone https://git.meowfox.net/MeowRelay/kde-widget.git && mv -f ./kde-widget/com.umorist47.meowrelaygui $HOME/.local/share/plasma/plasmoids && rm -r kde-widget
```

View file

@ -0,0 +1,105 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import org.kde.kirigami as Kirigami
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components as PlasmaComponents
import org.kde.plasma.extras as PlasmaExtras
import org.kde.plasma.plasmoid
Item{
Layout.minimumWidth: govnoLayout.implicitWidth
Layout.minimumHeight: Kirigami.Units.iconSizes.medium
Layout.maximumWidth: govnoLayout.implicitWidth
Layout.maximumHeight: Layout.minimumHeight
Layout.preferredWidth: govnoLayout.implicitWidth
Layout.preferredHeight: Layout.minimumHeight
MouseArea {
id: mouseArea
//property bool wasExpanded
Accessible.name: Plasmoid.title
Accessible.role: Accessible.Button
//Accessible.description: desc
//onPressed: wasExpanded = root.expanded
//onClicked: root.expanded = !wasExpanded
onClicked: Plasmoid.activated();
Keys.onPressed: {
switch (event.key) {
case Qt.Key_Space:
case Qt.Key_Enter:
case Qt.Key_Return:
case Qt.Key_Select:
Plasmoid.activated();
break;
}
}
// иконки не будет без этой залупы
anchors.fill: parent
anchors.leftMargin: 0
activeFocusOnTab: true
hoverEnabled: true
Component {
id: meowIconComponent
Kirigami.Icon {
Layout.preferredWidth: Kirigami.Units.gridUnit * 1.5
Layout.preferredHeight: Kirigami.Units.gridUnit * 1.5
Layout.alignment: Qt.AlignVCenter
source: Qt.resolvedUrl("../images/dogfood.svg")
isMask: true
active: mouseArea.containsMouse
}
}
Component {
id: genericLabelComponent
Label {
property string labelText: "yaebalrot"
text: labelText === "yaebalrot" ? "" : labelText
color: text === "error" ? "red" : Kirigami.Theme.textColor
font.pointSize: Kirigami.Theme.mediumFont.pointSize
verticalAlignment: Text.AlignVCenter
}
}
property var configArray: Plasmoid.configuration.ExtraLayout === true ? Plasmoid.configuration.StringLayoutPlacement.split(" ") : ["meow_icon"]
RowLayout {
id: govnoLayout
anchors.fill: parent
spacing: Kirigami.Units.smallSpacing
Repeater {
model: mouseArea.configArray
Loader {
id: govnoebanoe
// Logic to choose WHICH component to spawn
sourceComponent: (modelData === "meow_icon") ? meowIconComponent : genericLabelComponent
// Logic to pass DATA to that component
Binding {
target: govnoebanoe.item // The Label we just created
property: "labelText" // The property on the Label
value: root[modelData] // The live variable in root
when: govnoebanoe.status === Loader.Ready && modelData !== "meow_icon"
}
Layout.fillHeight: true
}
}
}
// Kirigami.Icon {
// anchors.fill: parent
// source: Qt.resolvedUrl("../images/dogfood.svg")
// isMask: true
// active: mouseArea.containsMouse
// }
}
}

BIN
screenshots/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB