raboof / notion

Tiling tabbed window manager
https://notionwm.net/
GNU Lesser General Public License v2.1
268 stars 63 forks source link

float/tilling hybrid #278

Open kristopolous opened 4 years ago

kristopolous commented 4 years ago

Hi, this isn't a bug. I'm wondering if something is possible. I've been using notion for 5 years and I know I haven't unlocked all the power nor have I read every line of the documentation so please excuse me if this is obvious but I wasn't unable to find it.

I did a mockup here, it's all gimpshopped.. Essentially I'd like a hybrid system ... so I can essentially navigate around a tiling in the same way I do a tabbed group like so:

float

kristopolous commented 4 years ago

btw, if you're looking for user stories I have an interesting one ... this is another topic entirely

Before I get into the details let me tell you what happens:

I am in say, an emacs session full screen. I tap my foot on a USB foot pedal. Then I press the spacebar and my music stops. I press the 9 or 0 key and the volume changes. I press the "d" key and song information pops up on my screen, I haven't changed windows or application focus. I release the footpedal and all the keystrokes go back to emacs. It all happens invisibly and transparently without any cognitive overhead. Oh yeah, also, the computer playing the music is actually across the room, and this is all happening over the network.

notion is a crucial part of it. Here's how it works:

I have a USB foot pedal whose events I've remapped to keys I don't have on my keyboard (https://github.com/kristopolous/tools/blob/master/bin/footpad). Then I used xmodmap and put the trigger into a mod group.

Now I can use the foot pedal as a Jeff-Raskin style "quasi-mode" - similar to tmux's (which will play a roll soon) full mode. I press the foot pedal and then some keystrokes defined in my notion config (https://github.com/kristopolous/crappy-notion/blob/master/mod_mpv.lua) and the commands get proxied out to this control script (https://github.com/kristopolous/music-explorer/blob/master/tools/mpv-control) which issues commands (mostly through tmux's send-key) over the network to my media player which is running this script (https://github.com/kristopolous/music-explorer/blob/master/tools/mpv-once)

As a result I get full media player controls without switching tasks via the foot pedal. It's pretty amazing that it works.

xbindkeys could probably do it as well ... but this is also a pretty nice solution, mostly in that it already works.

raboof commented 4 years ago

that is pretty cool!

I don't think we currently support mixing tiling and floating in that way - it might be tricky to figure out how the keybindings should work in that case. It would be interesting, though!

kristopolous commented 4 years ago

Now that I know it's not currently possible i may look into it myself.

The bindings can probably be solved with propagation rules, precedence resolves ambiguity.

r00t- commented 3 years ago

ion could do this for a long time. you can attach a workspace into a frame, just like a client window, and nest them arbitrarily.

in your floating frame, simply open a lua query (Shift-Mod-J?) and run: _:attach_new(ioncore.getlayout("2x2")) the pre-defined layouts are in /etc/X11/notion/cfg_layouts.lua (or wherever your distro puts that.). i would use "full", but it's less impressive for the demonstration, and 2x2 exactly matches your mockup.

the keybinding problem is real, if two objects with overlapping bindings are nested, only one of them catches the keypress. the typical bindings are not suited to such complex layouts. i had special bindings sometimes, but i'm mostly a mouse user anyway.

only with the current version i don't know how to put a workspace of free-floating windows into a frame anymore, the option seems to have disappeared when the WIonWS and WFloatWS objects disappeared.

i made this screenshot in july 2006: back then the incantation was: _:attach_new({type="WIonWS"}) // or WFloatWS screenshot of ion3 with floating windows containing splits

raboof commented 3 years ago

Interesting, thanks for sharing!

Indeed this gets pretty close already: if i create an floating workspace (Shift+Mod+F9, name, "empty"), create a terminal window inside of that (Mod+Enter), and then invoke the command you shared (Shift+Mod+J _:attach_new(ioncore.getlayout("2x2"))) a second tab is added to the floating terminal window, with a 2x2 split inside of it.

I also noticed you can also insert a 2x2 split into the scratchpad (Mod+Space).

Unfortunately the keyboard navigation for switching between windows doesn't quite seem to work here. Might be tricky to figure out how that should work anyway...

kristopolous commented 1 year ago

You can do this with the lua prompt in another way with create_ws Here's a video I took demonstrating it

https://9ol.es/tmp/notion-issue-278.mkv