DrewNaylor / Retiled

An attempt at creating a "desktop" environment mainly for Linux phones and tablets that's similar in function to some parts of Microsoft's Windows Phone 8.x, primarily the Start screen, Search app, navigation bar, Action Center, and the status bar. Development is mainly being done using the PinePhone, so that'll be the main supported device.
https://codeberg.org/DrewNaylor/Retiled
Apache License 2.0
69 stars 3 forks source link

What if I just... forked/made a Look-and-Feel package for Plasma Mobile and just changed things to be what I need instead of trying to write my own compositor with Qt's help from the overview example? #182

Open DrewNaylor opened 1 year ago

DrewNaylor commented 1 year ago

I found where the new homescreen and the navbar are (both under /usr/share/plasma/plasmoids, I think), and they're just mainly QML files, so pretty easy to change. Oh, and I also found out that the Maliit keyboard has a QML file and that describes the font size for the suggestion bar, so I can also change that so it's larger and easier to read (but I need to figure out how to give the keyboard individual keys again, because at some point they went away and it's harder to use). There are a ton of UI elements that I didn't know were literally just plasmoids (even the status bar is a plasmoid), so that'll be helpful. Pro tip: look around that directory I wrote up there and in some of the directories above, and you'll even find stuff for the lockscreen (this is a note for me for later).

Just would need to ensure we can load and save the pinned tiles list the same way I'm doing now (manually, using Python, after leaving global edit mode if there are differences), because it actually works.

Another concern is ensuring Accent colors can be read, and that we can read the Live Tile updates as they come in when I work on that.

Something that could be a new issue is not having a way to switch launchers after choosing mine (based on the code I saw, opening the config dialog is in each launcher), so for now I was thinking about adding a "gear" button right under the currently-useless search button in the All Apps list, that way it's out of the way but still available. Eventually I want to have something in the Settings app instead to handle that, though.

For a while, there will still be the main Plasma Mobile apps installed (well, at least the ones that postmarketOS ships, anyway) as I won't have fully-featured replacements ready anytime soon, especially for Settings (may have to keep at least some of it there for a while, but maybe not; when I implement something in my Settings app, I'll remove it from the forked Plasma Settings app). My goal is to not break things and keep compatibility with Plasma Mobile, particularly as the project enters the Qt6 era.

I do recognize that I'd have to end up maintaining the entirety of Plasma Mobile in my fork, or at least, the parts I need (going to try to reduce dependencies on Kirigami where possible, as I personally don't like the design; I do understand that some people do, so I'll try to be careful to not break support). What would probably be ideal would be to cherry-pick fixes from mainline Plasma Mobile, as there will probably be instances where something is more performant or fixes a bug (potentially even security bugs) in components like Kwin. Of course, there will probably be changes I'll make to Kwin, so not everything will translate perfectly or at all.

What first gave me this idea was that the Linux tablet with glass on the back (sorry, I can't remember right now) apparently used a fork of Plasma Mobile for its UI, or something like that, and it looked way different to me, so I thought it was impressive how different Plasma Mobile can become.

DrewNaylor commented 1 year ago

Could probably use pyotherside to be able to use my Python stuff from the QML plasmoids, as it's a QML plugin like making a C++ one.

DrewNaylor commented 1 year ago

What I could do at first is just release a package that adds my components and (where manually switching is not available) replaces the built-in components like the navbar with my own version by placing files in the home directory (if that's possible). Otherwise, it would have to be a lot more changes. Not looking forward to needing to get a build environment to build the entirety of Plasma Mobile, particularly for ARM (may need to buy a small ARM computer to do my builds so I don't have to make my PinePhone do the work, if QEMU emulation is too slow).

DrewNaylor commented 1 year ago

Turns out Halcyon does use C++, so I may be able to just use it through the C++ side, or maybe it would still be easier/simpler/faster (for development) through PyOtherSide. Just need to have the QML import it.

DrewNaylor commented 1 year ago

This file contains the code that loads the Plasma Mobile navbar and statusbar, so I can take this along with its surrounding package and make a look-and-feel thing for Plasma Mobile: https://github.com/KDE/plasma-mobile/blob/master/shell/contents/layout.js

May be difficult to ensure everything is loaded, and I don't even know if you can switch the look-and-feel through the Plasma Mobile Settings app. Will try to figure out a way.

DrewNaylor commented 1 year ago

I may need to grab some of Lomiri/UBports' code for the notification shade if it implements "unrolling" itself like Windows Phone, as Plasma Mobile works like Android and iOS, and it may be difficult to change it to work that way.

DrewNaylor commented 1 year ago

Or, maybe an even better idea would be to support Plasma Mobile (with a Look-and-Feel package) and LayerShell (with wlroots?) simultaneously to allow for as much flexibility in use cases as reasonably possible. For example, RetiledStart's Tiles.qml would have two additional files importing it: one that handles integration in Plasma Mobile, and one for LayerShell for anyone that wants to use it outside Plasma Mobile, like on a desktop. Both files would feed it data in the way that it expects, and it would become some sort of agnostic due to not handling window stuff itself.