KDE Widgets

I’m asking for kde widgets for some time. cant wait so i hacked it together.
Here a previous screenshot of my desktop with out any added personal info.

HOW TO:
1st use the default webbrowser plasmoid to login to your home assistant environment.
drag drop the webbrowser inplace. Login (check the keep loged in box) and optimally set your theme.

If you are done you can remove this widget.

In home assistant create an card for your laptop widget. I recommend a sub panel (single card)
I use the hacs kiosk (GitHub - NemesisRE/kiosk-mode: 🙈 Hides the Home Assistant header and/or sidebar) to remove all info except the card.

Now the hacking starts.

cd /usr/share/plasma/plasmoids/
sudo cp -r org.kde.plasma.webbrowser org.kde.plasma.ha1 
cd org.kde.plasma.ha1

edit the content of metadata.json

sudo -e metadata.json 
"Id": "org.kde.plasma.ha1",
"Name": "HA browser1",

remove the whole 1st RowLayout inside ColumnLayout of the main.qml (this removes the nav bar)

sudo -e contents/ui/main.qml 

Set your full url to the created home assistant panel

 sudo -e contents/config/main.xml 
 <entry name="url" type="String">
        <default>https://homeassitant/lovelace-systems/mylaptop-1?kiosk</default>
    </entry>

Thats it you can drag drop the widget into place.

For additional widgets you can copy your previous card and edit main.xml and metadata.json

1 Like

I used the transparent blue theme to make it more nice.

I love this, how did you get your background to be transparent though?
I applied the transparent blue theme but it has the original theme bcg,
sorry if this is a stupid question its my first time applying a theme

I copied parts of the background and used them for the panel background.
You need one theme per panel.

You could read the readme on the theme gitlab. But for documentation.
If you want to use encoded background use this site

https://www.base64-image.de/

lovelace-background: 'center / cover no-repeat fixed url('data:image/png;base64,YOURLONGSTRING)'

or else

lovelace-background: 'center / cover no-repeat fixed url("/local/background.png")' 
# OR
# lovelace-background: 'center / cover no-repeat fixed url("http://www.reportingday.com/wp-content/uploads/2018/06/Cat-Sleeping-Pics.jpg")' 

Your are copying directories, so you need to add -r

I really like your approach, nice!

I will add some screenshots to clarify some of your steps.
After the shown changes i am getting an error
file:///usr/share/plasma/plasmoids/org.kde.plasma.ha1/contents/ui/main.qml:83:5: Syntax error

edit: after restarting the error resolved itself, so reloading something inside kde seems to be needed

image

I only need -r when using the command mv. I never use cp -r.

but you got it working nice.

I try to get some help making it a real plasmoid but no luck so far.

my latest version.
The lower left has buttons. I set the theme of that widget as the main theme in the profile. So it is shown in all sub panels.

someone made a real plasmoid for plasma6

o yeah.

i made a youtube show off video https://youtu.be/Fy-VloPz8do?si=soLU6Up0o6Vz3Ipf

1 Like

I’m trying to replicate this so I can have a plasmoid pop up on my task bar, but it keeps losing the login every time I turn the PC on. Were you able to get around that?

I dont know. it uses the QT browser. (you have the keep login checked)