Ok, so. This is going to be a long, exciting video.
Whenever I hear somebody saying “KDE is a Desktop Environment”, I am ALWAYS that annoying guy that replies “akchually, it’s KDE Plasma”. Because KDE is a community of people doing cool stuff, NOT just desktop environments, and I think it’s important to point that out.
What I did not expect is to see a main Plasma developer saying that they’re not fully comfortable with saying that, yes, KDE Plasma is a desktop environment; and the reasoning actually allowed me to see just how much power Plasma has… behind the scenes.
Let’s start with an example. Look at KDE Plasma (because you do use KDE Plasma, right? right?) though it would probably be better to temporarily call it KDE Plasma Desktop (as we also have other KDE Plasma products meant for other form-factors).
You will see a wallpapers, maybe folders and widgets on top of that wallpaper, a panel on the bottom side, widgets inside that panel, and so on. You might think that how all of these things work is quite an… implementation details; but it isn’t.
Now, take Plasma Mobile. It’s a completely different product, meant for different usecases. But… you do have some similarities. Well, you have a panel on the top with widgets inside of it. If you open quick settings, you have notifications - the same notifications you might see on the Desktop as well. If you change your volume, you see the volume thingy (yes, that IS its official name) and it’s the same one as the Desktop one.
What happened at the very early start of Plasma - if I understood it correctly, I wasn’t there - was the idea that Plasma had to be flexible to adapt to different form factors and devices. Even before Plasma Mobile there was a project called Plasma Active, with a very similar goal. So everything in Plasma was thought not as a Desktop Enviroment, but as a way of doing shells for different devices.
Or, as Aleix Pol said it during his above-mentioned Akademy talk, “Plasma is a UX for a number of devices, designed by us”.
Ok, ok, cool words, but what do they mean in practice? Well, I told you to give a look to KDE Plasma… Desktop, so now let’s actually break it down in its components. We have:
- The wallpaper - which is modular, there are various wallpaper services you can switch between. Different shells can handle wallpapers in a different way, with different defaults; as an example, a Plasma shell meant for e-ink devices (which, by the way, is in my to-do-before-mid-july-list) probably wants to have an always-white wallpaper, which is provided by the “org.kde.color” plugin.
Ok, what else on the desktop?
- The actual desktop with, e.g. files and folders. But, if we had a different device, like, a mobile phone, we’d probably want to have a different kind of desktop with something that looks like a phone home screen, right? So this component is modular too and it’s called a Containment… and you can switch between containments. KDE Plasma Desktop offers two out of the box, one without anything and one with folder view. KDE Plasma Mobile also offers a couple that both act like different home screens, but ideally third parties could do custom components similarly to custom Android home screens.
- You might not only have files on your desktop, but also widgets. You might notice that, even if you change containment, your widgets are left untouched. This is because there is something something under the containment that manages them. This component is called a View and it’s part of the shell you are using. We could simplify its job in: 1) take the Containment and allow the component to draw on the entire view. 2) draw the widgets on top of the Containment, and 3) offer a way to customize the widgets and the wallpaper regardless of the Containment you are using. So if you see that Plasma Desktop and Plasma Mobile have different interfaces to customize widgets… it’s because they are different shells. But if you do notice that they’re actually pretty similar… we’ll get to that.
- One thing that you have to notice it’s the same in Plasma Mobile and Plasma Desktop is the toolbox that appears when you long press the Containment. That’s called a toolbox and it’s its own modular component; shells will kindly ask to use a certain toolbox, and you can you different toolboxes depending on what you’re doing.
- Finally, what I could get into right now, but I won’t, is the panel. It has the same idea as the desktop: you have a view, offered by the shell, which then draws a Containment on top of it. I think you could have different kind of panels, but I haven’t looked into it much.
After all of this you might just say: but why!?!? All of this work, just to have more consistency between mobile and deskotp? Ab-so-lu-te-ly not. Ok, sit down, because you’re in for a ride.
- KDE also has BigScreen, which is KDE Plasma but meant for TVs. So, how does that work? Well, it’s, firstly, a custom containment. So, there is a shell, that loads the Bigscreen containment, which draws the homescreen you see. The style is completely consistent because it uses Plasma Styles, which can be used throughout devices, not just for Plasma Desktop. BigScreen also has a top panel, which - at some point in time, i don’t know how things work right now - was actually offered by Mycroft, the AI voice assistant thingy, and it included a Mycroft widget to do voice stuff.
- KDE also has Nano. And FINALLY. FINALLY. after, like two years of my youtube channel, I can explain to you what Plasma Nano is. Ok, so. Let’s say that you want to create a new shell for a new type of device, like TVs or e-ink devices. Why on earth would you start everything from scratch, right? What shells can do - and I think not just shell - is set a fallback. So all components not specified in my shell will be loaded from another one. And there’s often a bunch of things that are extremely similar throughout shells, like managing widgets, or displaying a wallpaper, or having a Desktop view that loads a containment. So, we have Plasma Nano. Which is a minimal shell which does things you most likely always want in any shell anyway, but just that. It also does a toolbox, so Plasma Bigscreen can - as an example - just do a custom containment and then use Plasma Nano shell and tell Plasma Nano “please use my containment”.
- Or, take another example entirely. Say, in an absolutely ipotetical scenario, that I was a KDE developer who was sent a PineNote, a e-ink device, to work on making sure KDE works nicely on it. That would never happen, but imagine. What I probably would supposed to do, after trying out Plasma Desktop and Plasma Mobile on it, is to considering making a shell specifically meant for e-ink devices. It’s an option. And how I would approach that is to make a containment which highlights the most useful apps in e-ink devices in e-ink friendly way (only black on white, no scrolling, etc) and then use Nano as a base.
- Hear me out, here’s an ever crazy-er example. Say that somebody came to be and paid me to bring Plasma to smart mirrors. That would never happen, but imagine. How I would do that, given that smart mirrors - as an example - have to use black as the background color and have big easy-to-use buttons on a homescreen, is to do a custom shell that: uses Plasma Nano, but has a custom containment to display the buttons, but I use a custom Plama Style theme to make sure it looks appropriate, and also use the “org.kde.color” plugin for the wallpaper, with black as the default color and no way to change it.
I think you can kindof see my excitement here, but hey, Plasma is so cool. And the coolest part is that it’s not over. I haven’t talked about styles much, and neither have I talked about widgets themselves; both of these allow Plasma to be even more modular and such given that I can just use the same wifi widget everywhere, just changing the Plasma Style, instead of copypasting the code. However, there’s a final yet pretty big component that allows everything work
Aaand, in true youtuber fashion, I will leave you hanging for a minute, because this video is not sponsored by anyone (not KDE) but it took time and money to make. And I’m trying my best, really. To be able to sustain this channel I have a monthly goal of seven hundred bucks, and it’s a hard-to-reach goal; I really need help to reach it in time.
The amount I have currently for April all comes from Patreons, who support me every month. They do get some benefits, like a private podcast about Linux News, some articles about my KDE involvement, and polls to decide content, and so on. Again, I’m trying my best to do good content and to help out KDE too, but I also need help.
So, what’s the last piece of the puzzle.
Look and Feel themes. They’re much more powerful than you might think. An example? they are able to change Containments. So, hear me out, ok? If I understood it correctly (…and that’s a big if), somebody could do a custom containment for KDE Plasma Desktop which - I don’t know - actually has some sort of tablet-like homescreen? After installing it, you could have two look and feel themes, and switching betwen the themes would also switch the Containment, between folders and this new homescreen.
But also, Look and Feel themes can ask for a specific shell. A shell… which has, like, the views inside of them. That can change… everything. Everything. I’m not sure if that’s gonna work if you just change the Look and Feel theme from, like, System Settings — but meh meh details.
But also, they can change layouts. Where widgets are places in the desktop and panels, how many panels you have, and where. And, of course, they can change… everything else as well, like the Plasma Style, the Application Style, Kwin settings, just everything. They can even implement a custom OSD, which is the dialog that appears when you change the volume or brightness.
I lied. It’s not called “volume thingy”, it’s actually called OSD. bleah
Of course, if you’re doing your own Look and Feel theme, you can also set a fallback, so you don’t have to implement all of these things, you can just say: hey, do like that, but only change this tiny winy thing, as well. That works.
Now, to close this video, I do want to highlight the fact that all of this is, in practice, much more more complex than it appears, and I do. not. fully. understand it. Just yesterday, I sent a private message to Aleix saying, hey, … how do you use Plasma Nano? Like, what’s the point? Now I think I kind-of get it. However, I might’ve said some incorrect things. If so, refer to your local KDE Plasma expect for more correct info. I don’t know.
But yeah, to the best of my knowledge, what Plasma does is completely unique. And it’s much more than just being a desktop environment.
from Hacker News https://ift.tt/h6zClFi
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.