Bug 465880 - Feature request to add additional text to lock screen and login screen - e.g., via the respective Clock.qml files
Summary: Feature request to add additional text to lock screen and login screen - e.g....
Status: RESOLVED INTENTIONAL
Alias: None
Product: kscreenlocker
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.27.0
Platform: Neon Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-16 23:29 UTC by Terry Forsythe
Modified: 2023-02-17 08:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Image of lock screen with requested feature. (490.55 KB, image/png)
2023-02-16 23:29 UTC, Terry Forsythe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Forsythe 2023-02-16 23:29:39 UTC
Created attachment 156333 [details]
Image of lock screen with requested feature.

SUMMARY
***
Feature request to add additional text to lock screen and login screen - e.g., via the respective Clock.qml files
***

IMPLEMENTATION:

1.  For the file /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/components/Clock.qml, add the following additional section:

    QQC3.Label {
        text: "{User Specified Text}"
        style: softwareRendering ? Text.Outline : Text.Normal
        styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
        font.pointSize: {User Specified Font Size}
        Layout.alignment: Qt.AlignHCenter
    }

2.  For the file /usr/share/sddm/themes/breeze/components/Clock.qml, add the following additional section:

    PlasmaComponents3.Label {
        text: "{User Specified Text}"
         style: softwareRendering ? Text.Outline : Text.Normal
        styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
        font.pointSize:  {User Specified Font Size}
        Layout.alignment: Qt.AlignHCenter
    }

3.  Provide GUI menu items in settings (e.q., in Workspace --> Startup and Shutdown --> Login Screen (SDDM) and in Workspace --> Workspace Behavior --> Screen Locking) for the user to enter the {User Specified Text} and {User Specified Font Size} into the respective Clock.qml files.

BACKGROUND - REASON FOR THE FEATURE REQUEST

I have Neon and Arch, both using KDE Plasma, on my computer.  Sometimes after being away from the computer for a while I forget which distribution I am in.  So, I modify the Clock.qml files to add text indicating the distribution.  However, sometimes Plasma updates overwrite the changes I made - this has happened multiple times.  I then have to go back and manually edit the Clock.qml files in both distributions to get the text back onto the lock screens and login screens.  

I can make the Clock.qml files immutable, and I believe this will prevent them from being overwritten with updates (I have not confirmed this will work, but just today did make the files immutable).  My concern is, however, that if a future update requires the Clock.qml files to be updated, leaving the files immutable may cause them to become inoperable.  

E.g., QQC3.Label used to be QQC2.Label, and PlasmaComponents3.Label used to be PlasmaComponents2.Label.  I'm not sure what will happen if in Plasma 6.0 these need to be changed to QQC4.Label and PlasmaComponents4.Label, or something else, or whether the qml syntax will change with Plasma 6 and require changes in the Clock.qml files.  Thus, I'm not confident making the Clock.qml files immutable is the correct approach.  Hence the reason for the feature request.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  KDE Neon and Arch/KDE
(available in About System)
KDE Plasma Version:  5.27.0
KDE Frameworks Version:  5.103.0
Qt Version:  5.15.8
Comment 1 David Redondo 2023-02-17 08:38:40 UTC
Something like this will not happen.

 I would advise you to fork the themes into personal themes.