[kde] [Bug 485146] New: kscreen-doctor output cannot be easily used in bash scripts anymore
Xwang
bugzilla_noreply at kde.org
Sat Apr 6 19:50:06 BST 2024
https://bugs.kde.org/show_bug.cgi?id=485146
Bug ID: 485146
Summary: kscreen-doctor output cannot be easily used in bash
scripts anymore
Classification: I don't know
Product: kde
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: xwaang1976 at gmail.com
Target Milestone: ---
SUMMARY
Kscreen-doctor -o output has changed in a way that makes it easier to read for
a human, but more difficult to integrate in bash scripts.
Before I was able to get the names of external and internal monitors using
these bash script lines:
TMP_EXT_MONITOR_NAME=$(kscreen-doctor -o | grep 'DisplayPort' | grep connected
| cut -d ' ' -f 3)
TMP_INT_MONITOR_NAME=$(kscreen-doctor -o | grep 'Panel' | grep connected | cut
-d ' ' -f 3)
echo "Internal monitor is: $TMP_INT_MONITOR_NAME"
echo "External monitor is: $TMP_EXT_MONITOR_NAME"
because each output information was in a single line.
Now the information of every monitor are split in multiple lines.
STEPS TO REPRODUCE
1. Execute the four bash script lines above
2. Read the displayed names
OBSERVED RESULT
It is not possible to read display names
EXPECTED RESULT
Before it was possible to read display names because all display nformations
where on the same line
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.2-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i5-1240U
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: Dell Inc.
Product Name: Latitude 9330
ADDITIONAL INFORMATION
Is it possible to add a command line option to obtain the previous output
format?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list