1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 05:52:50 -05:00

hypr: add disable output option

This commit is contained in:
bbedward
2025-12-28 23:15:43 -05:00
parent 2b0070c31a
commit f08e2ef5b8
3 changed files with 54 additions and 22 deletions

View File

@@ -205,6 +205,27 @@ Singleton {
const result = {};
const lines = content.split("\n");
for (const line of lines) {
const disableMatch = line.match(/^\s*monitor\s*=\s*([^,]+),\s*disable\s*$/);
if (disableMatch) {
const name = disableMatch[1].trim();
result[name] = {
"name": name,
"logical": {
"x": 0,
"y": 0,
"scale": 1.0,
"transform": "Normal"
},
"modes": [],
"current_mode": -1,
"vrr_enabled": false,
"vrr_supported": false,
"hyprlandSettings": {
"disabled": true
}
};
continue;
}
const match = line.match(/^\s*monitor\s*=\s*([^,]+),\s*(\d+)x(\d+)@([\d.]+),\s*(-?\d+)x(-?\d+),\s*([\d.]+)/);
if (!match)
continue;
@@ -842,6 +863,8 @@ Singleton {
for (const outputId in pendingHyprlandChanges) {
const changes = pendingHyprlandChanges[outputId];
if (changes.disabled !== undefined)
changeDescriptions.push(outputId + ": " + I18n.tr("Disabled") + " → " + (changes.disabled ? I18n.tr("Yes") : I18n.tr("No")));
if (changes.bitdepth !== undefined)
changeDescriptions.push(outputId + ": " + I18n.tr("Bit Depth") + " → " + changes.bitdepth);
if (changes.colorManagement !== undefined)