[Latte Dock] The end of an era (designing a Latte-Dock free alternative dr460nized setup)

Ok I got it. Don’t mind the DEFAULTS, but you can create various sections with different Horizontal numbers. Say one section for the most used 5 monitor rez or whatever. And then when the user changes rez, if that rez is listed in plasmashellrc it will use the values to set the panel. See for yourself:

[PlasmaViews][Panel 119][Defaults]
maxLength=1008
minLength=118
thickness=100

[PlasmaViews][Panel 119][Horizontal1920]
maxLength=1008
minLength=118
thickness=60

[PlasmaViews][Panel 119][Horizontal2599]
thickness=100

[PlasmaViews][Panel 119][Horizontal2607]
thickness=100

[PlasmaViews][Panel 119][Horizontal2608]
thickness=100

[PlasmaViews][Panel 119][Horizontal3840]
thickness=60

This is 2607 horizontal with above 100 thickness set:

This is 1920 horizontal with above 60 set:

It works, roughly the same eye size a bit bigger on 2607 rez, maybe 85 would be best but this is just an example to show how to use the plasmashellrc.

2 Likes

@dr460nf1r3 can you plz test those colors on your machine?
Make sure to click on AppLauncher and expand the SysTray with the small chevron. :slight_smile:

EDIT:
I'm not sure where to share a file and they're too big to fit here. ZippyShare seems crap so let's try on my personal GDrive.

Plz copy the files as your background.svgz in subfolder dialogs of the Theme and panel-background.svg in subfolder widgets of the Theme:

https://drive.google.com/drive/folders/1Bmil_DJgaEoQPsCxUN75V2MCNJ5GgFGp?usp=share_link

Both links are giving me 403, I’m not allowed to access the files it seems :stuck_out_tongue:

So I have found out about some very important things. Plasma scripting is definitely the way to go if every desktop resolution should be supported it seems :eyes:

So far, I was able to create the top bar & its settings using the layout.js file:

var plasma = getApiVersion(1)

//Create top panel
const panel = new Panel
panel.location = "top"
panel.alignment = "left"
panel.height = Math.round(gridUnit * 1.5);

var launcher = panel.addWidget("org.kde.plasma.kickoff")
launcher.currentConfigGroup = ["Configuration", "General"]
launcher.writeConfig("icon", "start-here-garudalinux")
launcher.writeConfig("lengthFirstMargin", 7)
launcher.currentConfigGroup = ["Configuration", "Shortcuts"]
launcher.writeConfig("global", "Alt+F1")

var title = panel.addWidget("org.kde.windowtitle")
title.currentConfigGroup = ["Configuration", "General"]
title.writeConfig("filterActivityInfo", false)
title.writeConfig("lengthFirstMargin", 7)
title.writeConfig("lengthMarginsLock", false)
title.writeConfig("placeHolder", "Dr460nized KDE")
title.writeConfig("showIcon", false)

var appmenu = panel.addWidget("org.kde.windowappmenu")
appmenu.currentConfigGroup = ["Configuration", "General"]
appmenu.writeConfig("fillWidth", true)
appmenu.writeConfig("toggleMaximizedOnDoubleClick", true)

panel.addWidget("org.kde.plasma.systemtray")

var clock = panel.addWidget("org.kde.plasma.digitalclock")
clock.currentConfigGroup = ["Configuration", "Appearance"]
clock.writeConfig("showDate", false)

This is actually a pretty neat way to provide presets without using .config files.
One thing I have not found about yet is how to get the geometry of the dock in place :thinking:

const dock = new Panel
dock.location = "bottom"
dock.alignment = "center"
dock.formfactor = 2
dock.immutability = 1
dock.height = Math.round(gridUnit * 3);

var tasks = dock.addWidget("org.kde.plasma.icontasks")
tasks.currentConfigGroup = ["Configuration", "General"]
tasks.writeConfig("fill", false)
tasks.writeConfig("maxStripes", 1)
tasks.writeConfig("showOnlyCurrentScreen", true)

This creates the dock but spans it to both sides of the screen. The length seems to be saved in plasmashellrc rather than the applets config file so I'm unsure how to configure this.

You can play around with this using the plasma-interactiveconsole command, which will open a window in which the scripts can be run.

2 Likes

Well I edited my above post, you can try my personal GDrive.

Although I believe a color on the panel may not be the way to go. It depends what you want to provide, what your vision is about the ISO:

1- You want to release an ISO that has a consistent Theme with its default wallpaper (Ghost in your case);
2- You want to release an ISO that has a variable Theme and would look good no matter the wallpaper the user chooses.

In the 1st option, I think my 1st attempt in the above GDrive link would suit better.

In the 2nd option, I see 2 options:

  • A neutral color (which is what you did in your ISO) that would look sometimes great, sometimes good, sometimes just ok, depending on the wallpaper;
  • True transparency is perfect here, like Latte, but for the reasons we know we have to let aside for now. I think I have an idea to somewhat work around this. I will play with that this week and provide you with more Theme files.

Yes, it’s stored in plasmashellrc.

I have 0 expertise on JS stuff but I am all ready to test once you find out and I have LOTS of screen rez I can test from, so it will be a good test I believe. :slight_smile:

I’ll whoogle that as well as layout.js to see what else I can learn on where to put the file and how to get it launched, etc.

2 Likes

A certain compatibility with a few wallpapers would be nice - t

hough the focus definitely lays on the ootb experience :slight_smile:

Looks quite good on Ghost :eyes:

Ehehe, turns out RTFM is always a good thing to do. You can set the values easily using a few keys mentioned in the API documentation.

https://develop.kde.org/docs/extend/plasma/scripting/api/

1 Like

Then I guess either color option (darker like Sweet vs blended within the Ghost paper my 1st test above) are equally valuable. Personally I would opt with blended with Ghost as it is straight ootb blended, but probably less compatible with a greater nb of papers than Sweet’s darker color. Darn true transparency that is unavailable.
I can spend a bit of time perfecting my 1st try and see if I come up with something better.

EDIT: Anyway everyone will have the same challenge (colors) with Plasma Panel, which is why I asked about what your focus is. Tnx for clarifying. :slight_smile:

LOLLL!! Ok so then I understand with the java scripting there is something nice you can do. I will opt out of manually setting rez values in plasmashellrc. :smiley:

1 Like

Here we have a global look-and-feel folder for the Dr460nized theme that can be put into ~/.local/share/plasma/look-and-feel/. It created the Panel layout very consistently for 1 screen full HD. Now it can be tested on another resolution :wink: Now the question is how to do this for every screen there is :eyes:

It needs to be applied via global settings.

image

I would love it if those colors could be the same (top bar / titlebar), since it would blend in better when using fullscreen just like before, something that would be possible?

The file which does the setup is located in the layouts folder of the global theme shared above (org.kde.plasma.desktop-layout.js). Its actually refreshing how little code it needs to completely set up the layout :smiley:

The code

var plasma = getApiVersion(1)

// Create top panel

const panel = new Panel

panel.location = "top"

panel.alignment = "left"

panel.height = Math.round(gridUnit * 1.5);

var launcher = panel.addWidget("org.kde.plasma.kickoff")

launcher.currentConfigGroup = ["General"]

launcher.writeConfig("icon", "distributor-logo-garuda")

launcher.writeConfig("lengthFirstMargin", 7)

launcher.currentConfigGroup = ["Shortcuts"]

launcher.writeConfig("global", "Alt+F1")

var title = panel.addWidget("org.kde.windowtitle")

title.currentConfigGroup = ["General"]

title.writeConfig("filterActivityInfo", false)

title.writeConfig("lengthFirstMargin", 7)

title.writeConfig("lengthMarginsLock", false)

title.writeConfig("placeHolder", "Dr460nized KDE 🔥")

title.writeConfig("showIcon", false)

var appmenu = panel.addWidget("org.kde.windowappmenu")

appmenu.currentConfigGroup = ["General"]

appmenu.writeConfig("fillWidth", true)

appmenu.writeConfig("toggleMaximizedOnDoubleClick", true)

panel.addWidget("org.kde.plasma.systemtray")

var clock = panel.addWidget("org.kde.plasma.digitalclock")

clock.currentConfigGroup = ["Appearance"]

clock.writeConfig("showDate", false)

var switcher = panel.addWidget("org.kde.plasma.userswitcher")

switcher.currentConfigGroup = ["General"]

switcher.writeConfig("showFace", true)

switcher.writeConfig("showName", false)

switcher.writeConfig("showTechnicalInfo", true)

// Create bottom panel

const dock = new Panel

dock.alignment = "center"

dock.height = Math.round(gridUnit * 2.8);

dock.hiding = "windowscover"

dock.location = "bottom"

dock.maximumLenth = 1000

dock.minimumLength = 250

var tasks = dock.addWidget("org.kde.plasma.icontasks")

tasks.currentConfigGroup = ["General"]

tasks.writeConfig("fill", false)

tasks.writeConfig("iconSpacing", 2)

tasks.writeConfig("launchers", "applications:garuda-welcome.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,preferred://browser,applications:org.kde.plasma-systemmonitor.desktop,applications:snapper-tools.desktop,applications:octopi.desktop")

tasks.writeConfig("maxStripes", 1)

tasks.writeConfig("showOnlyCurrentScreen", true)
2 Likes

That’s me! :smiley: I’ll start testing tonight.

You mean the color of the top bar vs the color of a full screen window?

Fullscreen = maximized window?
I didn’t test that yet, good point. It’s something rather important in Garuda as far as I have read threads on the forum.

Will definitely take a look.

2 Likes

Couldn’t wait and tested it on my father’s machine, where I am for the day. Thanks to my @ and @home linked snapshots, perfect for testing.

The portability is now a LOT better. In fact, my father’s machine uses 4K rez but downsized to 85% (his eyes are getting older, he’s a great candidate to test your JS loll), an odd final rez (3264x1836).
And the result was quite good for me. I prefer the top bar a little thicker but I’m sure it is the thickness you want it to me. The bottom dock has ported properly too, nice size for the eye.

Good job! :smiley:

But there’s still something wrong with the paper yet again, man. loll It just doesn’t pick-up Ghost, Plasma is stubborn. :smiley:

Could it be here?

[kscreenlockerrc][Greeter][Wallpaper][org.kde.image][General]
Image=file:///usr/share/wallpapers/garuda-wallpapers/Ghosts.jpg

[plasma-org.kde.plasma.desktop-appletsrc][General]
Image=file:///usr/share/wallpapers/garuda-wallpapers/Ghosts.jpg

Yes, the file does exist in that exact location on the machine and is named as in your code. :smiley:

Also your logout screen/buttons is awesome. :smiley: That’s new stuff right?

About the Sweet color of the topbar/dock backgrounds… meh… I don’t like it with Ghost, that’s for sure. I tried about 10 papers and it’s ok on some, meh on others… :frowning: But that’s my taste, although I am trying to keep colors consistent/blended. I will play with something different while I try to get the topbar and maximized window titlebar the same.

Perhaps an announcement on the forum might be a good way to get extra help with this. The announcement could explain that Latte is EOL and it’s future use is likely doubtful for Garuda. Therefore, we are experimenting with replacing Latte with standard KDE dock/panels. We could sollict for help from coders with js experience for this project. I would think being a forum member for at least 3 months would need to be a prerequisite to prevent fly by night users that tend to flake out after volunteering.

Long time experience with Linux and multiple programming languages would also be a good asset. This way perhaps we could kill 2 birds with one stone. Hopefully we could find someone capable of helping with the Latte dock replacement, and maybe also find a good candidate to join the project as a long term dev/maintainer. I assume they would need to be promoted to TL4 to carry out work collectively on the forum, so they would need to be trustworthy. Otherwise, all development on this would need to be carried out by PM’s with the prospective candidates.

Just a thought, but it might be time for this.

3 Likes

IT WORKS!

launcher

Oh I’m happy now, I just need to find the right color pattern, more fun to play around!

2 Likes

Sounds like it varies from app to app, see the different here using the same theme all 3 times.

System Settings work very well without changing anything:

Dolphin has more translucency so it’s lighter and will depend on what’s in the background:

Firedragon is the worst as the tabbar is black and since it’s not part of the titlebar, it remains when maximized:

I guess I misunderstood your explanation and screenshot.

1 Like

Too much purple :grin:

It does not harmonize with orange.
1 Like

True true, there are way too many different colors and too many apps using the same color (orange is one) so something more neutral may be better.

In the meantime I tried something else super quickly:
Screenshot_4

1 Like

As a default panel setting (somewhere). :smile:

I haven’t read all posts, so forgive me if you have checked this option:
Use the default layouts folder at plasma /usr/, and create a package that will provide a default panel, just like Latte was doing.

$ ls -1 /usr/share/plasma/layout-templates                                                                                                                                          
org.kde.plasma.desktop.appmenubar
org.kde.plasma.desktop.defaultPanel
org.kde.plasma.desktop.emptyPanel

I suppose you can use a custom name, like “Garuda default top panel”, “Garuda bottom dock panel”, etc.

Using skel, or HOME/.config is restricting IMHO, and ugly (to me) :person_shrugging:

2 Likes

To follow on Petsam’s response, maybe it is fixed now.

I now tested from a 1024x768 rez (yes, good ol’ 90s 14" monitor) up to 3840x2160 and the bar and dock sizes remain constant.
Location, geometry, position, also remain constant. I think you nailed it.

Default size of bar and dock is too small for me but other people’s comments will help on determining the “right size fits all” kind of thing.

2 Likes

This is actually the best solution! It should be doable for everyone to follow the instructions :eyes:

1 Like

Very cool to see, can't wait for a test version :grin:

Thanks for testing the other resolutions!

1 Like

Update: the garuda-dr460nized-next package contains the new layout presets. Those can be added to the desktop by right-clicking and selecting "Add new panel" -> "Garuda default dock/panel".

Edit: aaaaand here we go, an iso ready for testing :stuck_out_tongue: Glad it finally worked. Lemme know what needs tweaking! :slight_smile:

3 Likes