1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-13 00:42:49 -05:00

feat: Complete core hyprland port

This commit is contained in:
purian23
2025-08-20 21:02:34 -04:00
parent 712b4986be
commit 88d4dad21d
4 changed files with 29 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ DankModal {
function executePowerAction(action) { function executePowerAction(action) {
switch (action) { switch (action) {
case "logout": case "logout":
NiriService.quit() CompositorService.logout()
break break
case "suspend": case "suspend":
Quickshell.execDetached(["systemctl", "suspend"]) Quickshell.execDetached(["systemctl", "suspend"])

View File

@@ -1187,7 +1187,7 @@ Item {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
logoutDialog.close() logoutDialog.close()
NiriService.quit() CompositorService.logout()
} }
} }
} }

View File

@@ -378,11 +378,28 @@ Item {
} }
StyledText { StyledText {
text: "(Hyprland Soon™)" text: "&"
font.pixelSize: Theme.fontSizeMedium font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceVariantText color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
StyledText {
text: `<a href="https://github.com/hyprwm/Hyprland" style="text-decoration:none; color:${Theme.primary};">hyprland</a>`
font.pixelSize: Theme.fontSizeMedium
linkColor: Theme.primary
textFormat: Text.RichText
color: Theme.surfaceVariantText
onLinkActivated: url => Qt.openUrlExternally(url)
anchors.verticalCenter: parent.verticalCenter
MouseArea {
anchors.fill: parent
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
acceptedButtons: Qt.NoButton
propagateComposedEvents: true
}
}
} }
StyledText { StyledText {

View File

@@ -6,6 +6,7 @@ import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
import Quickshell.Wayland import Quickshell.Wayland
import Quickshell.Hyprland
Singleton { Singleton {
id: root id: root
@@ -86,4 +87,12 @@ Singleton {
} }
} }
} }
function logout() {
if (isNiri) {
NiriService.quit()
return
}
Hyprland.dispatch("exit")
}
} }