Bismuth-Forge / bismuth

KDE Plasma add-on, that tiles your windows automatically and lets you manage them via keyboard, similarly to i3, Sway or dwm.
https://bismuth-forge.github.io/bismuth/
Other
2.41k stars 93 forks source link

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

Open gikari opened 3 years ago

gikari commented 3 years ago

The tray should have the following features:

A pop-up from the Pop Shell: image

alxlg commented 3 years ago

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 commented 2 years ago

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

ikajdan commented 2 years ago

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

gikari commented 2 years ago

@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 commented 2 years ago

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

gikari commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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

alxlg commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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:

ikajdan commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

ikajdan commented 2 years ago

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 commented 2 years ago

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

alxlg commented 2 years ago

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

ikajdan commented 2 years ago

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 commented 2 years ago

What's the current progress on this?

ikajdan commented 2 years ago

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

applet

krshrimali commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.