forked from Shinonome/dots-hyprland
ags: config option for monitor get scaled size method (#424)
This commit is contained in:
@@ -12,10 +12,14 @@ async function updateStuff() {
|
|||||||
const gdkMonitor = display.get_monitor(i);
|
const gdkMonitor = display.get_monitor(i);
|
||||||
monitor.realWidth = monitor.width;
|
monitor.realWidth = monitor.width;
|
||||||
monitor.realHeight = monitor.height;
|
monitor.realHeight = monitor.height;
|
||||||
// monitor.width = gdkMonitor.get_geometry().width;
|
if (userOptions.monitors.scaleMethod.toLowerCase == "gdk") {
|
||||||
// monitor.height = gdkMonitor.get_geometry().height;
|
monitor.width = gdkMonitor.get_geometry().width;
|
||||||
monitor.width = Math.ceil(monitor.realWidth / monitor.scale);
|
monitor.height = gdkMonitor.get_geometry().height;
|
||||||
monitor.height = Math.ceil(monitor.realHeight / monitor.scale);
|
}
|
||||||
|
else { // == "division"
|
||||||
|
monitor.width = Math.ceil(monitor.realWidth / monitor.scale);
|
||||||
|
monitor.height = Math.ceil(monitor.realHeight / monitor.scale);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log(monitors)
|
console.log(monitors)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ let configOptions = {
|
|||||||
'color': 'rgba(113,227,32,0.9)',
|
'color': 'rgba(113,227,32,0.9)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'monitors': {
|
||||||
|
'scaleMethod': "division", // Either "division" [default] or "gdk"
|
||||||
|
},
|
||||||
'music': {
|
'music': {
|
||||||
'preferredPlayer': "plasma-browser-integration",
|
'preferredPlayer': "plasma-browser-integration",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user