mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
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);
|
||||
monitor.realWidth = monitor.width;
|
||||
monitor.realHeight = monitor.height;
|
||||
// monitor.width = gdkMonitor.get_geometry().width;
|
||||
// monitor.height = gdkMonitor.get_geometry().height;
|
||||
monitor.width = Math.ceil(monitor.realWidth / monitor.scale);
|
||||
monitor.height = Math.ceil(monitor.realHeight / monitor.scale);
|
||||
if (userOptions.monitors.scaleMethod.toLowerCase == "gdk") {
|
||||
monitor.width = gdkMonitor.get_geometry().width;
|
||||
monitor.height = gdkMonitor.get_geometry().height;
|
||||
}
|
||||
else { // == "division"
|
||||
monitor.width = Math.ceil(monitor.realWidth / monitor.scale);
|
||||
monitor.height = Math.ceil(monitor.realHeight / monitor.scale);
|
||||
}
|
||||
});
|
||||
console.log(monitors)
|
||||
}
|
||||
|
||||
@@ -55,6 +55,9 @@ let configOptions = {
|
||||
'color': 'rgba(113,227,32,0.9)',
|
||||
},
|
||||
},
|
||||
'monitors': {
|
||||
'scaleMethod': "division", // Either "division" [default] or "gdk"
|
||||
},
|
||||
'music': {
|
||||
'preferredPlayer': "plasma-browser-integration",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user