mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
ags: config option for monitor get scaled size method (#424)
This commit is contained in:
parent
3f18c4bc9d
commit
52f39e3a01
2 changed files with 11 additions and 4 deletions
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue