mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-05 21:18:30 -04:00
@@ -542,7 +542,12 @@ Singleton {
|
||||
let width = 1920;
|
||||
let height = 1080;
|
||||
let refreshRate = 60;
|
||||
if (output.modes && output.current_mode !== undefined) {
|
||||
const configured = (output.configured_mode || "").match(/^(\d+)x(\d+)@([\d.]+)$/);
|
||||
if (configured) {
|
||||
width = parseInt(configured[1], 10);
|
||||
height = parseInt(configured[2], 10);
|
||||
refreshRate = Math.round(parseFloat(configured[3]));
|
||||
} else if (output.modes && output.current_mode !== undefined) {
|
||||
const mode = output.modes[output.current_mode];
|
||||
if (mode) {
|
||||
width = mode.width || 1920;
|
||||
|
||||
Reference in New Issue
Block a user