forked from Shinonome/dots-hyprland
fix wrong monitor size (#537)
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
const { Gdk } = imports.gi;
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { execAsync, exec } = Utils;
|
||||
|
||||
export let monitors;
|
||||
|
||||
// Mixes with Gdk monitor size cuz it reports monitor size scaled
|
||||
async function updateStuff() {
|
||||
monitors = JSON.parse(exec('hyprctl monitors -j'))
|
||||
const display = Gdk.Display.get_default();
|
||||
monitors.forEach((monitor, i) => {
|
||||
const gdkMonitor = display.get_monitor(i);
|
||||
monitor.width = gdkMonitor.get_geometry().width;
|
||||
monitor.height = gdkMonitor.get_geometry().height;
|
||||
});
|
||||
}
|
||||
|
||||
updateStuff().catch(print);
|
||||
|
||||
Reference in New Issue
Block a user