Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

horizontal thumbnail representation in overview #32

Closed
brianjmurrell opened this issue May 19, 2019 · 25 comments
Closed

horizontal thumbnail representation in overview #32

brianjmurrell opened this issue May 19, 2019 · 25 comments

Comments

@brianjmurrell
Copy link

There was a PR on the workspace-grid project to optionally put the workspace thumbnails horizontally at the bottom of the overview screen.

For certain layouts, this can actually be much better use of screen real estate.

I wonder if you'd consider implementing such a feature in the workspace-matrix extension.

@mzur
Copy link
Owner

mzur commented May 21, 2019

This sounds like an option for the 2D workspace list in the activities overview that is planned in #13. You are welcome to support the development there.

@brianjmurrell
Copy link
Author

#13 is now closed as following #50. Will #50 address this or should it be reopened?

@mzur
Copy link
Owner

mzur commented Sep 4, 2019

You can reopen this issue if you like. #50 at its current state won't address this. In addition to that, I'm reluctant to add more and more features to this extension since that means it will be harder to maintain. Feel free to contribute to #50. Once that's finished we can see how to move forward.

@brianjmurrell
Copy link
Author

brianjmurrell commented Sep 4, 2019

I don't seem to have any ability to reopen a closed issue.

That said, isn't a horizontal representation just a grid of 1 row by n columns (which #50 should be able to do, yes?) but displayed along the bottom of the overview instead of the side?

@mzur
Copy link
Owner

mzur commented Sep 4, 2019

isn't a horizontal representation just a grid of 1 row by n columns [...] but displayed along the bottom of the overview instead of the side?

Correct but #50 does not implement a switch to move the workspace list to the bottom so this issue is not addressed there. I'll reopen this issue for you.

@mzur mzur reopened this Sep 4, 2019
@brianjmurrell
Copy link
Author

does not implement a switch to move the workspace list to the bottom

Indeed, understood. My point was just that the "extra code" for that should be minimal. Just a toggle and different placement code (of the grid) based on the toggle.

@mzur
Copy link
Owner

mzur commented Sep 4, 2019

Feel free to contribute to #50. After that we can talk about extra code 😉

@brianjmurrell
Copy link
Author

I would but JS isn't one of the languages I am fluent in and neither is gnome-shell an environment I'm familiar with.

@ebeem
Copy link
Collaborator

ebeem commented Sep 6, 2019

so I checked this out, the PR you sent seems to not show the grid in a horizontal way, but rather, just displays the grid on the bottom of the screen. In other words, if you have 2 rows and 4 columns, it will look nice, but if you have 4 rows and 2 columns, it will look ugly.

the code that's used in the PR is very simple, anyone can try it out.
You need to paste this code in the GNOME Looking Glass
1- press alt+F2 and enter lg
2- paste the code below and press enter in the Looking Glass terminal

let controls = Main.overview._controls;
controls._group.remove_actor(controls._thumbnailsSlider.actor);

let bin_thumbnails = new St.Bin({
    child: controls._thumbnailsSlider.actor,
    x_align: St.Align.MIDDLE
});

Main.overview._overview.add(bin_thumbnails);

@brianjmurrell
Copy link
Author

Yeah, pasting that into Looking Glass does put the thumbnails on the bottom, but as you say, it looks ugly with the default 1 column and (in my case) 3 rows.

Would I need #50 to switch that to 1 row and 3 columns?

@ebeem
Copy link
Collaborator

ebeem commented Sep 8, 2019

maybe switching rows and columns can fix it, but the ultimate solution will probably be redesigning the overview or the switcher to handle grid/matrix workspaces. Otherwise, there will always be some scenarios where the grid/matrix can't fit the overview.

if we can improve the switcher to handle all the DnD, then we will probably not need the overview to handle workspaces anymore. Check this comment for more info #13 (comment)

@brianjmurrell
Copy link
Author

You need to paste this code in the GNOME Looking Glass
1- press alt+F2 and enter lg
2- paste the code below and press enter in the Looking Glass terminal

It's not bad:

2019-09-18_15-00

Clearly some significant space wastage in the display of my 3 columns X 1 row workspace configuration.

@brianjmurrell
Copy link
Author

Any thoughts on the excessive space usage?

Other than that, I'd not see why this solution couldn't be formalised into a knob for this extension.

@ebeem
Copy link
Collaborator

ebeem commented Nov 17, 2019

I think it still needs a lot of improvement before releasing it
if this is a must-feature to you, you can add it somewhere in the code for now.

@brianjmurrell
Copy link
Author

@ebeem Could you expand? Are you referring to the overly aggressive space use of the horizontal thumbnails or other stuff?

@ebeem
Copy link
Collaborator

ebeem commented Nov 18, 2019

yes, space utilization and layout management
we need to discuss a lot of issues before merging this piece of code into master, these couple of lines won't solve all cases which is going to produce more issues in the future.

For now, I see these problems in the provided solution.

1- The position of the thumbnails box must be set according to matrix shape.
if the number of rows is greater than the number of columns, then the default position of thumbnails box should be set (right). Only if the number of columns is greater than the number of rows, then we should place the thumbnails box at the bottom (a configurable option is needed to force thumbnails box position). I prefer we allow setting the position of thumbnails box to top/bottom/right/left of overview.

2- The thumbnails box's height should be shrunk to fit the workspaces without taking extra space (this problem exists in the extension right now, but it's the default GNOME behavior and it does not look so weird when placed on the right).

@brianjmurrell
Copy link
Author

@ebeem I disagree with point #1. I think the position of the box is more an artefact of the physical screen dimensions, not the workspace layout. But that is just my opinion, which differs to yours. That suggests to me that this is going to be subjective and probably just needs a user-toggle knob to let the user decide which he likes best.

I think your point number 2 is just re-iteration of my observation of the space usage/wastage, yes?

@ebeem
Copy link
Collaborator

ebeem commented Nov 18, 2019

yeah, the screen dimensions is probably another factor that we will have to consider before deciding the position of thumbnails box, I think we can just keep the default right position and allow users to change the behavior in preferences to top/right/bottom/left as you said.

yes, the observation is the same. Please feel free to add any other points or comments so we create a list of tasks for this feature in case someone is willing to contribute.

@brianjmurrell
Copy link
Author

In all honesty, my only (minor enough that I use it as is) issue is the extra space below my 3 horizontally configured workspaces in the thumbnails.

@JoeKays
Copy link

JoeKays commented Jan 25, 2020

So for everyone asking for a solution for only one row of horizontally configured workspaces here is my solution:

in OverviewOverride.js:

add the following import at the top:

const { St } = imports.gi;

add the following (note the 150 for the height of 1 single row)
in line 75 at the end of function _activateOverride():

let controls = Main.overview._controls;
controls._group.remove_actor(controls._thumbnailsSlider.actor);
this._bin_thumbnails = new St.Bin({
     child: controls._thumbnailsSlider.actor,
     x_align: St.Align.MIDDLE,
     height: 150
  });

Main.overview._overview.add(this._bin_thumbnails);

add the following
in line 83 at the end of function _deactivateOverride():

let controls = Main.overview._controls;
Main.overview._overview.remove_actor(this._bin_thumbnails);
this._bin_thumbnails.remove_actor(controls._thumbnailsSlider.actor);
controls._group.add(controls._thumbnailsSlider.actor);

I would be glad if anyone more familiar with gnome-shell extensions improved the code further and made it available through a commit or similar...

@JoeKays
Copy link

JoeKays commented Jan 25, 2020

Note: this doesn't seem to persist after standby.
If anyone knows a solution to this problem that'd be helpful!

@brianjmurrell
Copy link
Author

@JoeKays Suggestion works here. I noted that 150 was too small and increased it to 450. Better. There's still space wastage under the row of thumbnails at the bottom though.

Still better than the wastage on the side of a monitor in portrait orientation.

@ebeem
Copy link
Collaborator

ebeem commented Jan 26, 2020

@JoeKays figuring out how we can make it persists after suspend is not hard, I can look that up when I have some time. The height: 150 idea is great, but we need to somehow match it with the thumbnail height and number of rows we have, this will need to take care of spacing between thumbnails as well.

@brianjmurrell has a portrait-oriented monitor, this makes his thumbnail size totally different than what we usually get in normal cases.

so assuming the height of each thumbnail = 150
and spacing between thumbnails = 10
and number of rows = 3

(num_rows * thumbnail_height + (num_rows - 1) * spacing)
total height will be (3 * 150 + (3-1) * 10)

I think in most cases we will have num_rows = 1 for this case, which means we have a vertical layout, but I am suggesting we use this solution later to make the position of the workspace in overview option (right|left|top|bottom)

@brianjmurrell
Copy link
Author

@JoeKays hack in #32 (comment) doesn't seem to work on the latest version. It results in no workspace thumbnails, just thumbnails for the windows in the current workspace.

@mzur
Copy link
Owner

mzur commented Jul 31, 2020

I'll close this issue as we don't plan to implement such a feature here. Custom implementations can be maintained in a fork.

@mzur mzur closed this as completed Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants