Hyprland 0.57 removed hyprctl keyword and name-style dispatches, and hyprglass 1.1 dropped its layer namespace options. Move workspace, window, logout, glass and Game Mode calls to hl.dsp and hyprctl eval. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.0 KiB
QML
32 lines
1.0 KiB
QML
pragma Singleton
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Hyprland
|
|
|
|
// glassMxrph stand-in: glassMxrph runs on Hyprland.
|
|
Singleton {
|
|
readonly property bool isHyprland: true
|
|
readonly property bool isNiri: false
|
|
readonly property bool isSway: false
|
|
readonly property bool isMango: false
|
|
readonly property bool isLabwc: false
|
|
readonly property bool overviewActive: false
|
|
readonly property var workspaces: Hyprland.workspaces.values.map(w => ({
|
|
"id": w.id,
|
|
"idx": w.id,
|
|
"name": w.name,
|
|
"output": w.monitor ? w.monitor.name : "",
|
|
"isFocused": w.focused,
|
|
"isActive": w.active,
|
|
"isUrgent": w.urgent,
|
|
"isOccupied": w.toplevels.values.length > 0
|
|
}))
|
|
function getDisplayScale(screenName) {
|
|
const s = Quickshell.screens.find(x => x.name === screenName);
|
|
return s ? s.devicePixelRatio : 1;
|
|
}
|
|
function switchToWorkspace(workspace) {
|
|
Hyprland.dispatch("hl.dsp.focus({ workspace = '" + (workspace && workspace.id !== undefined ? workspace.id : workspace) + "' })");
|
|
}
|
|
}
|