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

Tiling would be useful #116

Closed
jocutajar opened this issue Aug 18, 2021 · 23 comments
Closed

Tiling would be useful #116

jocutajar opened this issue Aug 18, 2021 · 23 comments
Assignees
Labels
enhancement New feature or request

Comments

@jocutajar
Copy link

Ahoj, I'm impressed :)

Already used to minimal Awesome wm, I really appreciate the tiling layouts (and the keyboard navigation, but you have an issue for that...). With tiling, vtm would blow my mind :D

I imagine I could use a simple shortcut to arrange the windows in a view into tiles so they fill the desktop area. It would be great to have a few layouts available or configurable.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Aug 18, 2021

I think it will be easy to implement. I have queued this up for implementation. Thank you!

@o-sdn-o o-sdn-o added the enhancement New feature or request label Aug 18, 2021
@o-sdn-o o-sdn-o self-assigned this Aug 18, 2021
@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Oct 31, 2021

I get something like this concept

Windows.Terminal.Dev.2021-11-01.03-12-18.1.mp4

Configurable using environment variable

VTM_TILE="h(v({ Term: \"htop\" }, h({ Term: \"man man\" }, { Term: \"bash\" })),{ Term: \"mc\" })"

@Nanoc-ice
Copy link

This would great, I like i!

@jocutajar
Copy link
Author

this concept

It looks very good! I guess you're currently splitting horizontally or vertically in halves. In Awesome WM there are pre-set layouts:
layouts

When a new window appears, it folds into the layout automatically, filling the space. Or when one is closed, the others take it's place. Most layouts also take a parameter so you can grow or shrink the most prominent part of the layout with a keystroke. You can also move the windows within the layout from one corner to another.

I hope it's not asking too much to mimic an existing solution :) please take it only as an inspiration from my side.

What would be the target use case for this new feature? I'm imagining monitoring screens running various forms of dashboards to be organized easily, efficient keyboard driven software development, k8s mission control centre...

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 1, 2021

I finished working on the UI layout prototype for this meta object. You can test and feel how it works on the demo server or build the dev/sdn branch.

Now I am implementing an environment variable parser to automatically generate the structure.

The following variable structure is suggested:

#example
VTM_PROFILE1="\"MenuName\", \"Title\", h1:1(v1:1({ \"bash -c htop\" }, h1:1({ \"bash -c man man\" }, { \"bash\" })),{ \"bash -c mc\" })"

VTM_PROFILE[n]="[2], [3], [4]"

  • [1] Some literal for alphabetical order
  • [2] Menu item caption
  • [3] Window title
  • [4] Layout/commands

Layout/command format:

[tag][ratio]([nested_object]...)
  • [ratio] Two integers N:M

  • [tag]:

    • h Horizontal split
    • v Vertical split

I will make format changes during implementation.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 1, 2021

It now has a movable splitter and support for broadcast input

Windows.Terminal.Dev.2021-11-01.22-23-10.mp4

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 2, 2021

What would be the target use case for this new feature? I'm imagining monitoring screens running various forms of dashboards to be organized easily, efficient keyboard driven software development, k8s mission control centre...

I am currently making a base object to form such structures. I play around with hand-built prototypes to get a better understanding of the use cases and how to store and generate such structures. It may be possible to make a generic scheme suitable for a large number of use cases. I will make it so that anyone can configure any number of required presets.

@jocutajar
Copy link
Author

broadcast input

Please explain, sounds interesting.

@jocutajar
Copy link
Author

it works on the demo server

Tried it, truly mind blown :) Showing it to a colleague, I've noticed the multi-user interaction... that's something rather novel :D No need for screen sharing any more.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 2, 2021

broadcast input

Please explain, sounds interesting.

You can make several windows active for input by left-clicking on them while holding Ctrl key. These windows will receive all input.

Windows.Terminal.Dev.2021-11-02.19-19-34.mp4

PS: This feature is disabled on the demo server. Only Ctrl+PgUp/Down and Esc available there.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 2, 2021

I suggest the following operations on panes

Menu toolbar
image

  • ▀█ toggle maximize/restore pane (inside the manager)
  • ══, vt/hz pane split
  • <~> swap two selected panes (with active focus), if it is not selected then swap the current with its neighbor
  • >|< set ratio to 1:1 for selected panes
  • × remove selected panes

Layout mechanics

  • reorganize panes/splits when
    • pane is destroyed
      • destroy tiling manager when the last pane is destroyed
    • add the new hx/vt split (add a new pane)
    • maximize (inside the manager) by double click on the pane header or using a menu toggle

This is not a complete list, since perhaps not everything that is needed is listed here, since I have never used tile window managers. Most likely there are some panes operations that cannot be performed using the operations listed above.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 2, 2021

Keyboard only scenario

  • Press hot-key (not defined yet, something like Alt+Space from Table of keyboard shortcuts or CUA) to activate window menu
    • Use arrow keys (left/right) to select operation
    • Press Enter/Space to execute selected operation
    • Hit Esc to cancel/deactivate menu

@jocutajar
Copy link
Author

I suggest the following operations on panes

  • :) Maximizing/restoring is certainly my most frequently used feature - META + M
  • Growing and shrinking a pane with META + H/L. Resetting to 1:1 or default would be nice.
  • Jumping with focus between panes META + J/K.
  • Then for moving panes around I like to press META and drag the pane to target location, effectively swapping them. There are also keyboard shortcuts for pushing panes around but I got used to the mouse in this case.
  • I think tearing a pane out of the layout or dropping one in would be needed so you could move it into another tiling layout or have it stand alone or take an existing stand alone window and drop it into the tiling manager window. This is quite specific to vtm as the layout is just a window in the space. Quite like what you'd do with a browser tab. In Awesome WM the equivalent would be moving a window between virtual desktops / tags (META+SHIFT+number).
  • Sometimes I need to hide/minimize a pane and restore it again META+N
  • For the case that a pane is minimized or while one pane is maximized, a list of the panes in a layout would help to restore/switch

Wow, it's really exciting to brainstorm with you and see how quickly you make progress :o) If it wasn't for the unknown waters of C++, I'd be tempted to start coding with you. Kudos.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 3, 2021

I made automatic generation of menu items based on VTM_PROFILE* environment variables.
Generation occurs when the server vtmd starts.

Usage example

VTM_PROFILE1='"Menu label 1", "Window Title 1", h2:1(v1:1("bash -c htop", "bash -c mc"), "bash")'
VTM_PROFILE2='"Menu label 2", "Window Title 2", h( v("bash -c htop", "bash -c mc"), "bash")'

I have updated the releases for Windows, Linux and macOS.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 7, 2021

I think that in the case of a keyboard only scenario, full-size menus are not needed, only slim ones are needed there. So I made a shrinkable menu. You can toggle the height by right clicking. Testing is available on the demo server.

Windows.Terminal.Dev.2021-11-07.17-29-03.mp4

@o-sdn-o

This comment has been minimized.

@o-sdn-o

This comment has been minimized.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Nov 19, 2021

Tile Tiling window manager is available for testing (mouse only edition)

This is an intermediate stage. I am now planning to add

  • List of panes on the right side outside the window (style like window titles)
  • Drag & Drop (pane is like a browser tab)
  • Keyboard support
  • Other things...

@o-sdn-o

This comment has been minimized.

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Dec 12, 2021

Drag & drop support

Windows.Terminal.Dev.2021-12-12.22-23-31.mp4

https://github.com/netxs-group/vtm/releases

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Dec 15, 2021

List of panes (at demo server and dev/sdn)

Windows.Terminal.Dev.2021-12-15.17-56-48.mp4

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Dec 22, 2021

Now you can cyclically swap any selected panes (use Ctrl to multiselect)

Windows.Terminal.Dev.2021-12-22.18-17-08.mp4

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Apr 21, 2023

I think I'm pretty much done with the tiling window manager. Keyboard support is a separate global story #86.

@o-sdn-o o-sdn-o closed this as completed Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants