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

Splitscreen and options on window menu <Enhancement> #74

Closed
cheapy opened this issue Dec 14, 2021 · 19 comments
Closed

Splitscreen and options on window menu <Enhancement> #74

cheapy opened this issue Dec 14, 2021 · 19 comments

Comments

@cheapy
Copy link

cheapy commented Dec 14, 2021

A user asked to be able to split the screen (ie resize and move current window) to fill half the screen using the mouse, rather than the keyboard to do it. Others chimed in that the current keyboard shortcuts are difficult and wanted me to ask you for something usable via mouse.

Perhaps a "Splitscreen" option could go on the window menu, maybe between Move and Size, since it does both, and it could be a pulldown menu with a Half screen section with 5 options, for Left, Right, Top, Bottom and Center. It could also have a Quarter screen section with 5 options for Top Left, Top Right, Bottom Left, Bottom Right, and Center.

As always, thanks for a great program. This has always been my favorite window manager. Efficient workflows are a thing of timeless beauty, that pay back every day.

PS: This could also be done with "Quarterscreen" and "Halfscreen" options separate instead of calling it "Splitscreen". That would be easy for people to understand, less ambiguous than "Splitscreen" which was the wording used by the requester.

@gijsbers
Copy link
Contributor

The problem statement is far too unclear to be useful.

  1. What is "split the screen"?
  2. Using the mouse instead of the keyboard? So they can already do it with the keyboard? What exactly?
  3. But they want to be able to do everything with the mouse?
  4. Are "current keyboard shortcuts difficult"? Which ones are? Which ones aren't?
  5. Can't they redefine their own keyboard shortcuts? Why not?
  6. "Something usable with the mouse"? There are more than 80 keyboard shortcuts. And all, or most, or some (but which ones) of them should become available via the mouse?
  7. You want user definable window context menus? Then we get something like:
  8. Separate roll-up and roll-down keys bbidulock/icewm#584 (comment)

@cheapy
Copy link
Author

cheapy commented Dec 15, 2021

I'm sorry for upsetting you. It was not my intention. It is difficult to describe what something should look and act like with words. I added the options I suggested to the main menu in the big pic. I used the menu options to arrange the windows in a grid of half and quadrant sized windows. This is not a great solution, but the user can quickly/easily click a selection from the menu to move and resize the current window into either a particular quadrant or half of the screen. The second, smaller pic is of the right click title bar menu that I was hoping to add the options to.

Another person suggested asking if you could implement a title bar menu entry that only showed up if a certain script was present, and then ran that script if selected- example: ~/.icewm/window-script.sh We could then run a nice little program to allow the user to point out where to put the window, and resize/move it there for them instead of adding options to the main menu.
screenshot-2021Dec14_174305
screenshot-2021Dec14_174930

@cheapy
Copy link
Author

cheapy commented Dec 15, 2021

PS: Maybe a better term for the action of resizing and moving a window into a half or quadrant of the screen is to "Tile" that window. That would make sense on the menu. It would be easy and nicer if we had icons with a rectangle showing what the results would look like. I doubt it would be worth the effort to do it graphically. I hope this makes more sense, now.

screenshot-2021Dec15_073749

@gijsbers
Copy link
Contributor

Good. Now I understand it a bit better, I hope. So you propose either to add your Tile menu with the Half Screen and Quarter Screen below the Move and Size entries. Or you propose that if a certain menu file exists in the configuration directory, to add that menu in the window title bar context menu? Let's say between the Layer and MoveTo entries.

@Code7R
Copy link
Contributor

Code7R commented Dec 15, 2021

Yeh, this "split screen mode" is a Windows 10 feature which assists users of wide screens on placing their windows. For a short while, the windows behave like there is a virtual border in the mid, this virtual border can actually be moved, but I rarely use that feature.

What is really useful is windows placement by button. Like, push Win-Left (or Win-Right) and the window is moved not to the next workspace but to the next HALF of the current workspace (unless it's in the right/left halff already).

So, for example, Win-Right moves the windows to the right half of the screen and maximimizes it there, and at the same time there is an assistant which shows a number of windows (similar to Quick-Switch shown in that half) where $USER can pick the window which who wants to be maximized in the left half.

@cheapy
Copy link
Author

cheapy commented Dec 16, 2021

I would guess that adding the built in Tile menu would be more work for you as the IceWM Devs would need to create the code for each of those Tile menu options, etc.

The custom Titlebar menu option would shift the contents burden to us, and leave a custom option available for others to use in other ways. If you say it should be a script to run, that will be fine. We would need to know the required name of the script program and how it will know the text to use as a label, as we would want to feed it different values depending on the local language. We already have created a script that could be run to allow the user to tell it what to do with the window and then resize/move it.

Do you have a preference which option should be chosen? I've asked the antiX Devs the same question. I think either option should work for the Tile submenu in my example.

PS: Something I noticed, with the code I wrote (which could be used in the custom option), is that it should be tested to ensure the existing Maximize options still work. It will be frustrating for users if those options stop working.

@gijsbers
Copy link
Contributor

gijsbers commented Dec 16, 2021

An important criteria is which option best supports internationalization and localization.
Does antiX support that, or is it English only? And with respect to these two options?

@cheapy
Copy link
Author

cheapy commented Dec 16, 2021

antiX is translated into many languages. Localization should be kept as normal as possible to minimize additional effort.

I have created a set of icons to make it easy even without words...
screenshot-2021Dec16_071821
wingrid-options
wingrid-maximize
wingrid-center
wingrid-right
wingrid-left
wingrid-top
wingrid-bottom
wingrid-bottomright
wingrid-bottomleft
wingrid-topleft
wingrid-topright

@cheapy
Copy link
Author

cheapy commented Dec 16, 2021

I think it would be best built into IceWM adding sub menu "Tile" or "Tiling" under Move and Size on the Window Titlebar menu with the options and (if you like), the icons I provided. Then it would be available on all distros. I've been using it a few days now from the menu, and even from there it's very handy, getting used many times per day, and others are adding it to their menus and using it as well.

If it can't be built in similar to above, then please could you give us a hook to add a custom menu option on that menu so we can run our own script to add the enhancement for antiX users, adding that to antiX's IceWM and WinGrid packages.

gijsbers added a commit to bbidulock/icewm that referenced this issue Dec 16, 2021
@gijsbers
Copy link
Contributor

Can you try this?

@cheapy
Copy link
Author

cheapy commented Dec 16, 2021 via email

@cheapy
Copy link
Author

cheapy commented Dec 17, 2021

I compiled it and tested all of the Tile submenu options including using new windows, old windows, windows without titlebars (via right click on Taskbar), your horizontal and vertical tile options, and re-tiling manually ones tiled automatically.

All worked perfectly, thanks!

It was a GOOD day. Thanks very much.

@gijsbers
Copy link
Contributor

Good. Can we consider your remarks about key bindings? Do they need to become easier? In what way?

@cheapy
Copy link
Author

cheapy commented Dec 17, 2021

No, its not YOUR keybindings that are a problem, in general, it was just the NUMBER of keybindings in total I think overwhelm beginners.

We should find a way to generate and then on demand display a keyboard and keybindings graphically as a popup to make it easier to learn what is available, on what keys, and what they do. I don't see that as an IceWM problem, and to me, IceWM having the flexibility to make keys do so many things is a great advantage from a standpoint of getting normal tasks done efficiently. But alas, the newbies can't even find the keys it seems.

Anyway, these tiling options will help a lot making it easy for them to use a tiling methodology where appropriate without needing to remember as many keys.

Thanks again for helping, and providing these features in an excellent way.

@cheapy cheapy closed this as completed Dec 17, 2021
@blur131
Copy link

blur131 commented Feb 17, 2022

Is there a way to map the new window placement options in the "tile" menu to keyboard bindings? I checked in the new "preferences" file and found nothing. Ie instead of clicking Tile>"left half" a user defined shortcut could be used instead. That would really make the new "Tile" feature useful.

@cheapy
Copy link
Author

cheapy commented Feb 17, 2022

You could use xdotool and feed it the keystrokes. Create one for Left Half, and assign it to a key sequence in your keys file:
Alt+Space - window menu
y - Layer menu
Left - back to window menu
Down - to Tile menu
Right - to top of Tile menu
Enter for Left half option

@blur131
Copy link

blur131 commented Feb 18, 2022 via email

@gijsbers
Copy link
Contributor

That would be a new feature. For the keybindings also consider #84.

@blur131
Copy link

blur131 commented Feb 18, 2022

Thank you! That opened my eyes up to icesh. I see now that the possibilities are endless.

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 15, 2022
Changelog:
===========
-Permit percentages to have comma's in icesh.
-Keep accurate track of window changes in workspace buttons for
  PagerShowPreview.  Only redraw affected workspace buttons, which reduces
  the total number of workspace button redraws, especially for larges
  number of workspace buttons.
-Add key bindings for single window tiling operations for issues
  bbidulock/icewm#335, ice-wm/icewm#74 and ice-wm/icewm#84.
-Complete -e option.
-WindowMaker dock apps are supported.
-Support more HTML entities in icehelp.
-Remove dependency on asciidoc and prefer markdown format for the manual.
-Prevent warnings.
-Also install markdown.
-Try srcdir.
-Cleanup test and prefer markdown manual.
-Cleanup key grabs.
-Drop obsolete wmOccupyAll().
-Accept either markdown or asciidoc to generate manual html with CMake.
-Add markdown and icesh.
-Automatically detect and prevent race conditions in icesh relating to
  moving and sizing windows for issue openembedded#335. Improve the accuracy of the
  "sizeto" command in icesh for issue openembedded#335. Add "extents" command to
  icesh. Add "workarea" command to icesh.
-Get rid of the frameContext.
-Prefer findClient in two cases: unmap notify and recv ping.
-Merge remote-tracking branch 'upstream/icewm-1-4-BRANCH' into
  icewm-1-4-BRANCH
-Merge branch 'icewm-1-4-BRANCH'

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 15, 2022
Changelog:
===========
-Permit percentages to have comma's in icesh.
-Keep accurate track of window changes in workspace buttons for
  PagerShowPreview.  Only redraw affected workspace buttons, which reduces
  the total number of workspace button redraws, especially for larges
  number of workspace buttons.
-Add key bindings for single window tiling operations for issues
  bbidulock/icewm#335, ice-wm/icewm#74 and ice-wm/icewm#84.
-Complete -e option.
-WindowMaker dock apps are supported.
-Support more HTML entities in icehelp.
-Remove dependency on asciidoc and prefer markdown format for the manual.
-Prevent warnings.
-Also install markdown.
-Try srcdir.
-Cleanup test and prefer markdown manual.
-Cleanup key grabs.
-Drop obsolete wmOccupyAll().
-Accept either markdown or asciidoc to generate manual html with CMake.
-Add markdown and icesh.
-Automatically detect and prevent race conditions in icesh relating to
  moving and sizing windows for issue openembedded#335. Improve the accuracy of the
  "sizeto" command in icesh for issue openembedded#335. Add "extents" command to
  icesh. Add "workarea" command to icesh.
-Get rid of the frameContext.
-Prefer findClient in two cases: unmap notify and recv ping.
-Merge remote-tracking branch 'upstream/icewm-1-4-BRANCH' into
  icewm-1-4-BRANCH
-Merge branch 'icewm-1-4-BRANCH'

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Changelog:
===========
-Permit percentages to have comma's in icesh.
-Keep accurate track of window changes in workspace buttons for
  PagerShowPreview.  Only redraw affected workspace buttons, which reduces
  the total number of workspace button redraws, especially for larges
  number of workspace buttons.
-Add key bindings for single window tiling operations for issues
  bbidulock/icewm#335, ice-wm/icewm#74 and ice-wm/icewm#84.
-Complete -e option.
-WindowMaker dock apps are supported.
-Support more HTML entities in icehelp.
-Remove dependency on asciidoc and prefer markdown format for the manual.
-Prevent warnings.
-Also install markdown.
-Try srcdir.
-Cleanup test and prefer markdown manual.
-Cleanup key grabs.
-Drop obsolete wmOccupyAll().
-Accept either markdown or asciidoc to generate manual html with CMake.
-Add markdown and icesh.
-Automatically detect and prevent race conditions in icesh relating to
  moving and sizing windows for issue #335. Improve the accuracy of the
  "sizeto" command in icesh for issue #335. Add "extents" command to
  icesh. Add "workarea" command to icesh.
-Get rid of the frameContext.
-Prefer findClient in two cases: unmap notify and recv ping.
-Merge remote-tracking branch 'upstream/icewm-1-4-BRANCH' into
  icewm-1-4-BRANCH
-Merge branch 'icewm-1-4-BRANCH'

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Changelog:
===========
-Permit percentages to have comma's in icesh.
-Keep accurate track of window changes in workspace buttons for
  PagerShowPreview.  Only redraw affected workspace buttons, which reduces
  the total number of workspace button redraws, especially for larges
  number of workspace buttons.
-Add key bindings for single window tiling operations for issues
  bbidulock/icewm#335, ice-wm/icewm#74 and ice-wm/icewm#84.
-Complete -e option.
-WindowMaker dock apps are supported.
-Support more HTML entities in icehelp.
-Remove dependency on asciidoc and prefer markdown format for the manual.
-Prevent warnings.
-Also install markdown.
-Try srcdir.
-Cleanup test and prefer markdown manual.
-Cleanup key grabs.
-Drop obsolete wmOccupyAll().
-Accept either markdown or asciidoc to generate manual html with CMake.
-Add markdown and icesh.
-Automatically detect and prevent race conditions in icesh relating to
  moving and sizing windows for issue #335. Improve the accuracy of the
  "sizeto" command in icesh for issue #335. Add "extents" command to
  icesh. Add "workarea" command to icesh.
-Get rid of the frameContext.
-Prefer findClient in two cases: unmap notify and recv ping.
-Merge remote-tracking branch 'upstream/icewm-1-4-BRANCH' into
  icewm-1-4-BRANCH
-Merge branch 'icewm-1-4-BRANCH'

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
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