Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions mimeapp-gui/BarWidget.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Quickshell
import qs.Commons
import qs.Widgets

NIconButton {
id: root

property var pluginApi: null
property ShellScreen screen
property string widgetId: ""
property string section: ""

readonly property string screenName: screen?.name ?? ""

baseSize: Style.getCapsuleHeightForScreen(screenName)
applyUiScale: false
customRadius: Style.radiusL
icon: "file-text"
tooltipText: pluginApi?.tr("bar.tooltip") || "MIME App Defaults"
Comment thread
Mathew-D marked this conversation as resolved.
Outdated

onClicked: {
pluginApi?.openPanel(root.screen, root)
}
}
29 changes: 29 additions & 0 deletions mimeapp-gui/Main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import QtQuick
import Quickshell
import Quickshell.Io

Item {
id: root

property var pluginApi: null

IpcHandler {
target: "plugin:mimeapp-gui"

function open() {
if (root.pluginApi) {
root.pluginApi.withCurrentScreen(screen => {
root.pluginApi.openPanel(screen)
})
}
}

function toggle() {
Comment thread
Mathew-D marked this conversation as resolved.
Outdated
if (root.pluginApi) {
root.pluginApi.withCurrentScreen(screen => {
root.pluginApi.togglePanel(screen)
})
}
}
}
}
Loading
Loading