Switch an external monitor's input source (HDMI/DP/USB-C) via ddcutil. Requires ddcutil to be installed and working.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
EGO-X-004 warning
extensions should avoid synchronous file IO in shell code
Shell code should avoid synchronous file IO APIs like `GLib.file_get_contents()` and `Gio.File.load_contents()`.
ddcutil.js:115
GLib.file_get_contents(
`/sys/class/drm/${name}/status`)
EGO-A-004 warning
extension files should not contain excessive ungated console logging
File contains 9 ungated console.log/warn/error calls (threshold: 5).
ddcutil.js:64
console.log('[monitor-input-switch] cancelInFlight: force-exiting in-flight ddcutil subprocess')
ddcutil.js:79
console.log(`[monitor-input-switch] subprocess timeout after ${SUBPROCESS_TIMEOUT_MS}ms, killing: ${argv[0]}`)
ddcutil.js:98
console.log('[monitor-input-switch] sysfs pre-check: scanning /sys/class/drm')
ddcutil.js:105
console.log('[monitor-input-switch] sysfs pre-check: sysfs read failed, falling through to ddcutil')
ddcutil.js:118
console.log(`[monitor-input-switch] sysfs pre-check: found connected external display (${name})`)
ddcutil.js:124
console.log('[monitor-input-switch] sysfs pre-check: sysfs read failed, falling through to ddcutil')
ddcutil.js:129
console.log('[monitor-input-switch] sysfs pre-check: no external display connected')
ddcutil.js:138
console.log('[monitor-input-switch] ddcutil detect: starting')
ddcutil.js:145
console.log(`[monitor-input-switch] ddcutil detect: found ${count} monitor(s)`)
EGO-L-002 warning
objects created by extension should be destroyed in disable()
Objects assigned in `enable()` are missing matching `.destroy()` calls in `disable()` or its helper methods.
extension.js:31
this._itemsSection = new PopupMenu.PopupMenuSection()
EGO-L-005 warning
owned object references should be released in disable()
Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.
extension.js:31
this._itemsSection = new PopupMenu.PopupMenuSection()
As mentioned before, timeout should be removed before creating a new one and on destroy (line 77 `ddcutil.js`).
Also fix EGO-X-004 mentioned in Shexli