summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-03-28 13:42:06 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-03-28 13:42:06 +1100
commit611b6c046e10f780047d214e58ffbffcef0b96ad (patch)
treeee2ef32c3e1d20fd715423f7019b61ec5265a3a6 /src/services
parentsidebar: fix bluetooth device battery (diff)
downloadcaelestia-shell-611b6c046e10f780047d214e58ffbffcef0b96ad.tar.gz
caelestia-shell-611b6c046e10f780047d214e58ffbffcef0b96ad.tar.bz2
caelestia-shell-611b6c046e10f780047d214e58ffbffcef0b96ad.zip
monitors: fix ddc detection
Diffstat (limited to 'src/services')
-rw-r--r--src/services/monitors.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/monitors.ts b/src/services/monitors.ts
index 4cef256..6ae7ecb 100644
--- a/src/services/monitors.ts
+++ b/src/services/monitors.ts
@@ -55,7 +55,7 @@ export class Monitor extends GObject.Object {
.then(out => {
this.isDdc = out.split("\n\n").some(display => {
if (!/^Display \d+/.test(display)) return false;
- const lines = display.split("\n");
+ const lines = display.split("\n").map(l => l.trimStart());
if (lines.find(l => l.startsWith("Monitor:"))?.split(":")[3] !== monitor.serial) return false;
this.busNum = lines.find(l => l.startsWith("I2C bus:"))?.split("/dev/i2c-")[1];
return this.busNum !== undefined;