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) {
switch (action) {
case "logout":
NiriService.quit()
CompositorService.logout()
break
case "suspend":
Quickshell.execDetached(["systemctl", "suspend"])

View File

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

View File

@@ -378,11 +378,28 @@ Item {
}
StyledText {
text: "(Hyprland Soon™)"
text: "&"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceVariantText
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 {

View File

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