Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

[FEATURE]: Implement a tray item, like (or better than) in Pop Shell #23

Open
1 of 4 tasks
gikari opened this issue Sep 7, 2021 · 26 comments
Open
1 of 4 tasks
Labels
applet Things related to the Bismuth Applet enhancement New feature or request help wanted Extra attention is needed upstream Issue depends on the upsteam (in most cases KWin and Plasma)
Milestone

Comments

@gikari
Copy link
Member

gikari commented Sep 7, 2021

The tray should have the following features:

  • Quickly enabling/disabling tiling
  • Layout change
  • Keyboard shortcuts dialog
  • Toggle float for current window

A pop-up from the Pop Shell:
image

@gikari gikari added enhancement New feature or request help wanted Extra attention is needed labels Sep 7, 2021
@alxlg
Copy link

alxlg commented Sep 10, 2021

If possible (because opening a widget would make the window lose focus) I think it would be very useful a "toggle float for current window".

Ideally this button should be in the window titlebar but KWin has not an API for that :-/

@gikari gikari changed the title Implement tray item, like in Pop Shell Oct 11, 2021
@gikari gikari pinned this issue Oct 31, 2021
@gikari
Copy link
Member Author

gikari commented Nov 7, 2021

Plasma Applet implementation is blocked by this: https://bugs.kde.org/show_bug.cgi?id=445129

@gikari gikari added the upstream Issue depends on the upsteam (in most cases KWin and Plasma) label Nov 7, 2021
@ikajdan
Copy link
Contributor

ikajdan commented Nov 15, 2021

FYI, I have already started working on the applet's frontend:

@gikari
Copy link
Member Author

gikari commented Nov 15, 2021

@verahawk very nice! I actually have an idea on how to forward the requests to the KWin Script part. The QML C++ for DBus interaction plugin must be written and installed. It won't be universal for all KWin Scripts of course, like in the above bug report, but at least there is a solution.

One problem is, though, I am not sure if I have enough time right now to make it, so I may slow you down a bit. Although, we could have a frontend review. Something minimal should be OK for the first iteration.

@ikajdan
Copy link
Contributor

ikajdan commented Nov 16, 2021

No worries, I don't have too much time on my hands now either. So, no need to rush things.

@gikari
Copy link
Member Author

gikari commented Nov 17, 2021

@verahawk By the way, I've seen your screenshot in KDE VDG Room and I think, that the layout should be a little different. As we cannot change the width of the pop-up, we might put here a list of a layouts, for example, or something, that takes the whole width.

IMG_20211118_005048_457.jpg

As for the check boxes, I think that applet should only include one, that the users want to change quickly and often, such as toggle tiling. Other ones belong to the settings module. The few, that remain could go to the title area (see other plasma applets for examples)

@gikari
Copy link
Member Author

gikari commented Nov 17, 2021

Here is an example of checkboxes in a networks' applet.

Screenshot_20211118_015932

Also, we could use a space in the applet for the big layout overview. Where is Master located and how many windows it contains. How it is rotated etc. But this might be a bit harder to make for now.

@ikajdan
Copy link
Contributor

ikajdan commented Nov 17, 2021

Yeah, I have similar idea about live overview that would be drawn on the fly using QML's rectangles.

@gikari gikari changed the title [FEATURE]: Implement tray item, like in Pop Shell Nov 17, 2021
@gikari gikari added this to the 3.0 milestone Nov 17, 2021
@alxlg
Copy link

alxlg commented Nov 25, 2021

I think icons like these are really good:
immagine

but I think they would be better as big tiles like these ones:

immagine

and "Enable tiling" checkbox in the header like other plasmoids

@gikari
Copy link
Member Author

gikari commented Nov 25, 2021

but I think they would be better as big tiles like these ones:

Do you mean, that instead of the list, we could present layouts in a grid?

@alxlg
Copy link

alxlg commented Nov 25, 2021

Do you mean, that instead of the list, we could present layouts in a grid?

Yes because bigger icons are better, otherwise they are hard to recognize.

EDIT: like the this widget we have for multidisplay setups:

immagine


By the way for anyone looking for a workaround:

  1. Right click on desktop or Dolphin > create new link to app
  2. As exec command use one of the following

Toggle tiling for all windows:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "bismuth_toggle_float_layout"

Toggle tiling for current window:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "bismuth_toggle_window_floating"

Other shortcuts name can be found by typing in a terminal:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames

  1. Drag and drop the launcher to a Plasma panel
@ikajdan
Copy link
Contributor

ikajdan commented Nov 26, 2021

grid1

grid2

This on uses Kirigami.Card for the cards, however I am not sure if that's the best component to use. For example, there is no active or hover style available. We would have to create those manually. Maybe whatever is used for the tray pop-up list, would be better?

tray

@gikari
Copy link
Member Author

gikari commented Nov 26, 2021

This on uses Kirigami.Card for the cards, however, I am not sure if that's the best component to use. For example, there is no active or hover style available. We would have to create those manually. Maybe whatever is used for the tray pop-up list, would be better?

Given the size of cards, I think they may benefit from the button to edit a layout in the future (when layout editor is ready). I didn't see the implementation, but is it possible to make the cards use 4 columns with less spacing between them? Also, the background color seems to have too much contrast.

As for the styles - the color selector applet do have the hover outline, but I'm not sure how the selected one would look like.

In case of your last proposal, I think it's valuable too, if we put the edit action to the right click menu (is it possible?).
The highlight and selected styles could be brought from the Calendar applet.

Also, a couple of other notes:

  • Three lines (hamburger) menu shouldn't have the layout selection. This duplicates functionality and have a rather large list of layouts. This menu is better suited for the right-click menu of the applet, when it's minimized. For now, I think it should be removed, but for the later we might put some functionality in there.
  • In general the functionality, that is present in the mockups are sufficient for the first version: just a tiling toggle and the layout selector. I have the backend ready, but the interface between the applet and the script parts must be defined.
@ikajdan
Copy link
Contributor

ikajdan commented Nov 30, 2021

The latest iteration:

preview

Also, the background color seems to have too much contrast.

Yeah, those cards stand out too much. However, I believe that the only way to change the background, would be to create our own QML component.

if we put the edit action to the right click menu

We could just show on hover an icon-only button in the bottom corner of the card.

Three lines (hamburger) menu shouldn't have the layout selection.

That hamburger menu is automatically created based on the context menu entries, and I am not sure if it can be removed. I do agree that it is completely unnecessary, however we can probably leave it as it is.

@alxlg
Copy link

alxlg commented Dec 1, 2021

Yeah, those cards stand out too much. However, I believe that the only way to change the background, would be to create our own QML component.

What about using the button component like here:
immagine
?

@ikajdan
Copy link
Contributor

ikajdan commented Dec 1, 2021

I have considered that, however button component has some visual glitches (barely visible horizontal stripes), when the theme is set to Breeze Dark:

preview_buttons

I guess we should just create our own component...

@gikari
Copy link
Member Author

gikari commented Dec 1, 2021

I don't see the stripes on your screenshot. What do you mean?

@ikajdan
Copy link
Contributor

ikajdan commented Dec 1, 2021

Maybe it's my monitor, but by looking form certain angles I can see some barely noticeable stripes. It's probably the gradient, that somehow breaks with buttons of such large size.

0

@gikari
Copy link
Member Author

gikari commented Dec 1, 2021

Now I see - the background color is indeed not plain.

@alxlg
Copy link

alxlg commented Dec 2, 2021

@verahawk can you reproduce this in other plasmoids provided by default in Plasma? If yes that must be fixed by upstream

@ikajdan
Copy link
Contributor

ikajdan commented Dec 2, 2021

Yes, buttons from the Screen Layout applet have the same artifacts. Maybe it is related to Nvidia drivers or something? Anyway, you can change the color scheme to Breeze Dark, and check it for yourself.

To be honest, it's not that big issue, so we can use those buttons for now. I just need to fix some memory leak in the applet, and once it's done, I will create a PR.

@TCMOREIRA
Copy link

What's the current progress on this?

@ikajdan
Copy link
Contributor

ikajdan commented May 19, 2022

Frontend is done, however it needs some properties exposed to bind to.

applet

@krshrimali
Copy link

krshrimali commented Jun 20, 2022

Frontend is done, however it needs some properties exposed to bind to.

applet

Hey, @verahawk - Just curious if this is still being looked at? Also, will keyboard shortcuts be supported for this? Like toggling the "Enable Tiling Mode" option.

@ikajdan
Copy link
Contributor

ikajdan commented Jun 20, 2022

Hey, @verahawk - Just curious if this is still being looked at?

Yes, however as mentioned earlier, a work needs to be done in #335, and sadly I have no sufficient knowledge in that matter.

Also, will keyboard shortcuts be supported for this? Like toggling the "Enable Tiling Mode" option.

All settings controlled by the applet can be changed directly using shortcuts already provided by Bismuth. Also, there is a plan to add a separate tab which will contain all Bismuth shortcuts, so users can quickly look them up without diving into settings. I haven't tackled with it yet, though.

@krshrimali
Copy link

Hey, @verahawk - Just curious if this is still being looked at?

Yes, however as mentioned earlier, a work needs to be done in #335, and sadly I have no sufficient knowledge in that matter.

Also, will keyboard shortcuts be supported for this? Like toggling the "Enable Tiling Mode" option.

All settings controlled by the applet can be changed directly using shortcuts already provided by Bismuth. Also, there is a plan to add a separate tab which will contain all Bismuth shortcuts, so users can quickly look them up without diving into settings. I haven't tackled with it yet, though.

Thank you, @verahawk - this makes sense. I'll try to port some if possible, and hopefully we can come back to this once #335 is done! Appreciate your response.

@gikari gikari mentioned this issue Sep 13, 2022
19 tasks
@gikari gikari unpinned this issue Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
applet Things related to the Bismuth Applet enhancement New feature or request help wanted Extra attention is needed upstream Issue depends on the upsteam (in most cases KWin and Plasma)
5 participants