You are not logged in.

#1 2012-12-09 22:10:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

ScrollWM - floating WM with scrolling workspace (and tiling!)

I present Yet-Another-TinyWM-based-WM: scrollWM on github, Scrollwm-git in AUR

ScrollWM was based on an idea from a post in another thread.  Gullible Jones asked about WMs other than FVWM that could have a large virtual desktop through which one could scroll smoothly (rather than discrete desktops to be switched between).  I thought it sounded like a fun idea, and so I gave it a shot.  The result: ScrollWM.

ScrollWM has developed in it's own unique direction though and in just a couple over-caffenated days it has gained much functionality which is described below with reference to the default bindings.  All bindings can be configured for mouse or keyboard (these are even interchangeable) through config.h.

Current Features
- Moving/Scrolling.
    - Mod4+Button1 drag to move a window.
    - Mod4+Alt+Button1 drag to scroll the virtual desktop.
- Zooming.
    - Mod4+Button4/5 (scroll wheel) to zoom the focused window in or out.
    - Mod4+Alt+Button4/5 to zoom the whole desktop in or out.
- Resizing.
    - Mod4+Button3 drag to resize a window.
- Maximizing.
    - Mod4+Button2 to fullscreen a window.
- Tiling.
    - Mod4+Alt+Button3 to cycle between tiling modes (rstack, bstack, and ttwm-style)
    - Mod4+Alt+Button2 to tile to a specified mode (rstack by default)
- Taging.
    - Mod4+(#) to select a tag (1-9)
    - Mod4+Alt+(#) to toggle the focused window's "membership" in the current tag
- Hiding / Sticking.
    - Mod4+h to hide the current tag.
    - Mod4+s to "sticky" the current tag.  Sticky tags do not zoom or scroll.
    - Mod4+n to remove hidden/sticky flags from the current tag (n=normal).
- Focus Cycling.
    - Mod4+Tab to cycle between all windows currently visible in the viewport.
    - Mod4+Alt+Tab to cycle between all windows in the current tag.
    - Mod4+Shift+Tab to cycle between *all* windows globally.
- Launching.
    - Customizable launchers: defaults include urxvt (Mod4+Enter), dmenu (Mod4+p), and luakit (Mod4+w)

The status bar shows the tags with an underline for the selected tag, and colors for tag 'flags'.  There is an 'icon' highlighting where there are windows relative to the current viewport (so you don't lose or forget about windows off screen).  Then, of course, the focused window title which is also followed by the tags it is a member of.

Tiling note: ScrollWM is not really a tiling window manager.  If you want to see my tiling WM, check out TTWM.  ScrollWM is and always will be a floating WM.  The tiling functions simply move windows into a tiled layout.  There is no dynamic tiling or adjusting for when windows are added or closed.  To retile the windows you must call the tiling function again.

Future goals:
- Bring in the rectabar stdin reader for user customized information display on the right side of the status bar (ttwm users should be familiar with this).
- Expand tiling modes to be able to tile subsets of windows (same subsets as for window cycling).
- Fix the below listed, and any future bugs.

Known bugs:
- Programs such as firefox that depend on window managers setting the window size on startup show up too small.
    - The solution is known (full ICCM compliance), but has  not been implemented yet.
    - A much easier solution has been presented by Moetunes and should be implemented soon (20 Dec 2012).
- Crashing when running gimp or vboxsdl (but virtualbox works).
    - Should be fixed as of ~18 Dec, let me know if this persists.
- Any others you can tell me about!

Last edited by Trilby (2012-12-20 13:38:15)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#2 2012-12-09 22:32:51

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I already had a go at it and must say I'm really interested in this. I won't see myself using it for longer periods though, because as you said alot of features are still missing.

What I'd like is some sort of tiling of a group of windows (tag) into a viewport and being able to move the viewport to another tag (which is already built in, sans the tiling of windows in a tag). So basically just DWM without the bar and a viewport added tongue Some sort of a bar would be nice to have though, with some status into it and an indicator showing where exactly you are in your large desktop.

I'm really curious to see where this would go!

EDIT: Also, an option to "zoom out" and get a nice overview of all the tags in the desktop would be nice to have to. Kind of like how one can zoom out in Windows 8's "Metro" interface to get a quick overview of all the tiles.

Last edited by Unia (2012-12-09 22:49:02)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#3 2012-12-09 23:12:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I was planning a zoom function - I already have one in another concept WM I played with that never went anywhere.  But I've never used Windows 8 so I have no idea what theirs looks like.

A status bar would be pretty easy.  In fact any current status bar tool that creates an override_redirect widow would work as is and scrollwm will not move it.

EDIT: zooming is up on git.  Zoom with MOD+scrollwheel  Note that content isn't scaled only window dimensions are.  Content scaling would require a much heavier function using openGL or Cairo and would lead to nasty side effects of content never really showing at it's intended size unless you zoomed perfectly back to 1.0 scaling.  Instead zooming only modifies window geometries.  This is fast and easy, and window content always remains at it's intended size ... though it may get quite "squished" at some zoom levels.

EDIT2: I see my overly simple zoom function will crash if you zoom way to far out.  This only happens when a windows dimension is scaled so low that it is set to zero (with rounding error).  I'll put it in a check for this and keep a couple pixels as the smallest possible size regardless of scale, but I'm not doing that tonight yet.  For now, just don't try to break it.

Last edited by Trilby (2012-12-09 23:28:04)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2012-12-10 01:05:22

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Hey, I was trying to do the same thing earlier this evening! I guess great minds think alike. wink But unfortunately my design-fu is still quite weak.

Anyway I'd be glad to help out. Maybe I'll try adding something. (Like keybindings?)

Edit: Hmm. The most immediately obvious problem I can see, is that the virtual desktop is of enormous size. This could easily get out of control, and I think it might cause crashes if you keep scrolling in one direction (IIRC window coordinates are 16 bit).

Also I see some weird rendering glitches (in Xephyr at least). If I:
- Open two gnome-terminal sessions
- Zoom out
- Zoom back in
- Move terminal #1 over terminal #2
then the obscured parts of terminal #2 will turn gray, and stay gray until I move terminal #2.

.. And looking at the source code I have no idea how to add keybindings. Sorry, I am really not familiar with xlib.

Last edited by Gullible Jones (2012-12-10 01:28:16)

Offline

#5 2012-12-10 01:14:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Sure.  I have all the code for keybindings though.  I just haven't plopped it into scrollwm yet.  I have been making improvements to the zoom function - but testing has been cut short by a pet-parrot-induced keyboard tragedy.  I am limping along on a severely trashed keyboard which really hinders any coding.  So I'm off for the evening.  I'll push to zoom improvements to git torrow night - and I'll throw in the framework for key bindings too.

For now this could be run with XBindKeys to be able to launch some apps.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2012-12-10 01:31:01

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Right, thanks. I really need to read up on xlib. (And see my edited post above.)

Offline

#7 2012-12-10 01:55:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I've considered the issue with coordinates overflowing the data structures - and I have a plan for that.  At least a plan to push it back by using a larger data structure - but of course at some extreme any structure will overflow, so I'll just cap the zoom/moving at that point.  64-bit coordinates, however, should be plenty large for any sane use.

I suspect the zoom issue you describe will be fixed by the zoom improvements I've made - but they will not be pushed to git until tomorrow night.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2012-12-10 14:30:28

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I just updated my local code with your new changes. I'm questioning the way you've implemented zooming:

When I have one client open, lets say Firefox, and I zoom out, obviously the window gets smaller. When I then open a new client, urxvtc, that client is not zoomed out; it's big. So now I have two different zoom levels: Firefox zoomed out, urxvtc zoomed in. If I'd zoom in on Firefox now, the urxvtc client is getting really big.

What I meant by zooming out and in, was to get a quick overview of the current windows (in tags or single), for example how Windows 8 does it as seen here at 1.09:
https://www.youtube.com/watch?v=YqDbPIH6aL8

Also I think more mature functions will come (like borders, shortcuts to close applications, kill the wm and whatnot) so I won't nag you about those tongue

EDIT: Also, since this WM is mostly mouse-based, how about hotcorner functions? I don't know if these are hard to do or require alot of code, but they would be a nice feature.

Last edited by Unia (2012-12-10 14:33:14)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#9 2012-12-10 15:19:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

There will be key bindings for most functions, they just haven't been implemented yet.  Hotcorners type things could be done - they really wouldn't take much code.

A static zoom level just would never be very practical though.  Zooming just scales window geometry, that's it - it does not scale content and there is no "current zoom level".  If the current zoom level were saved somewhere and applied to every newly mapped window there would need to be some mechanism to determine *where* new windows should be positioned.  Size can be scaled, but where should they be positioned?  If we go with the default position but custom geometry, it could have odd side effects.

Another way of looking at it, imagine you start an application that starts with default coordinates of (0,0).  Then you move it to the right half of the screen so it has coordinates - for example - (512,0).  Then you zoom out which icreases the apparent coordinates to (800,0).  Now, while zoomed out, you start another application.  The new window could be scaled equivalently to the first, but then where should it be placed?  At the original (0,0)?  The same place as the current window?  Or at the new (0,0)?  If it's placed at the new (0,0) and scaled equivalently to the currently running program, then the space between (or overlap of) the two windows will depend entirely on the current zoom level rather than on the intended size of the new application.  As you added more windows this would just get more and more odd.  Potentially you could even launch some applications and you wouldn't even notice the tiny window show up.

EDIT: from what I've seen on ads and video clips, Windows 8 scales all window content.  If you want something like this you should check out compiz-based window managers.

Last edited by Trilby (2012-12-10 15:30:22)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2012-12-10 15:26:33

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Trilby wrote:

There will be key bindings for most functions, they just haven't been implemented yet.  Hotcorners type things could be done - they really wouldn't take much code.

Awesome! Looking forward to that!

Trilby wrote:

A static zoom level just would never be very practical though.  Zooming just scales window geometry, that's it - it does not scale content and there is no "current zoom level".  If the current zoom level were saved somewhere and applied to every newly mapped window there would need to be some mechanism to determine *where* new windows should be positioned.  Size can be scaled, but where should they be positioned?  If we go with the default position but custom geometry, it could have odd side effects

EDIT: from what I've seen on ads and video clips, Windows 8 scales all window content.  If you want something like this you should check out compiz-based window managers.

I see. Is there another way in which we can enable a quick overview off the whole desktop?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#11 2012-12-10 15:32:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

There is no "whole desktop" in the way you are thinking.

"Desktop" is just a conceptual metaphor we use.  You are always viewing the whole desktop as far as X is concerned.

Evidence of this can be seen by trying to do an "XCopyWindow" from a window that is currently not visable because it is at a different part of the "dekstop".  X will give you an empy buffer ... there is no graphic data to copy from.

Last edited by Trilby (2012-12-10 15:34:04)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2012-12-10 15:33:52

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Trilby wrote:

There is no "whole desktop" in the way you are thinking.

"Desktop" is just a conceptual metaphor we use.  You are always viewing the whole desktop as far as X is concerned.

I'm dizzy tongue I thought we had like a "desktop wall" and we "zoom in" on a part of that (e.g. our zooming glass is the desktop; a viewport) and so we can move that zooming glass over the wall. How exactly does it work, then?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#13 2012-12-10 15:35:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

From the user's perspective that is how it works.  But it is, essentially, an illusion.

As indicated above, compositing mangers do this without an illusion: they'll render the a large pane, and you will only see certain parts of it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2012-12-10 15:37:54

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

You know I had to try this.  Very interesting and I'll keep an eye on this one but can't see it taking over from ttwm...yet. wink

I see scrollwm doesn't like numlock either...yet.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#15 2012-12-10 15:39:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Ha, not yet.  I'm not sure I'd ever really use scrollwm either.  It's a fun toy, but it just doesn't seem practical.

But I've gained many useful bits of code from tinkering with impractical "toys" that can be used in more functional projects.

Toy projects allow for a type of creativity that breeds innovation.

EDIT: for anyone keeping track, I'm actually finding ScrollWM to be much more practical for use than I orignally thought it would be.

Last edited by Trilby (2012-12-12 04:10:14)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#16 2012-12-10 15:43:42

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

^ Plus it's really cool to show off to friends big_smile Imagine using this on a larger touch screen monitor..


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#17 2012-12-10 15:45:20

bladdo
Member
From: Blacksburg, VA
Registered: 2008-05-05
Posts: 111
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

This is quite awesome. I had an idea similar to this but never got around to it.

I'm gonna hack around on this WM for a while when my finals are over. I have a few ideas.


bladdo / mil / Miles
userbound.com - blog and projects

Offline

#18 2012-12-10 15:46:25

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

What it really needs, for me, is some sort of ALT+Tab function to switch between windows as I find with scrollwm I'm always moving windows out of the way to get at others--or I'm not used to the concept yet.  Aerosuidae has a program called simpleswitcher that might do the trick.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#19 2012-12-10 16:13:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I'm actually laying the groundwork to build in a openbox-style window switcher that will not only focus a window, but move the scroll and zoom to a suitable level to interact with that window.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#20 2012-12-10 20:58:51

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Wowza, this is cool... I'm using it right now actually. Trying to add some window manipulation keybindings to it at the moment.

Some more bugs:
- Rendering issues in GVim. Scrollbars are not rendering properly, and text is not display when scrolling down. This might be an issue with the Oxygen GTK engine though.
- Some windows start at the wrong size. xterms in particular start out way too small, only a dozen pixels across or so.

Offline

#21 2012-12-10 21:48:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

ScrollWM doesn't touch default window sizes.  All programs will start at exactly the size their program requests.  Xterm can have geometry set in .Xresources right?

FYI I implemented some tag stuff in what's currently on git, but don't get used to the current behavior.  I'm going to reverse some of the logic.  What's up now allows you to have active and inactive tags, and only the active tag is moved when you scroll.  I'm going to change this to Normal tags which all scroll, or some tags can be Pinned so they don't scroll or zoom, and Hidden tags will be (hopefully obviously) hidden.  Any window will be able to to assigned to any or many tags - but each tag will be set to one of Normal, Pinned, or Hidden.  If a single window has tags with different settings the priority will be Pinned > Normal > Hidden.

If that makes no sense yet, standby and a version of this will be up soon.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#22 2012-12-11 00:29:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I've just done a bunch of junk with this.  Check out the github README for a very concise overview.

Windows now have tags, tags can be given names in config.h, tags can be Normal, Sticky, or Hidden.  Windows on hidden tags are not seen.  Windows on Sticky tags are not moved (zoomed or scrolled).  All other windows zoom and scroll as before.

There is not a statusbar with tags, a current tag indicator, and colors for sticky/hidden/normal/unoccupied.

The status bar also shows the current window title, and the tags the current window is on.

Tomorrow I will make the title update as the application changes the window title.  I'll also make the title and assigned tag regions a bit more elegant looking.  Soon I'll add a stdin reader for status information (a bit like dwm's, but better wink )


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#23 2012-12-11 11:22:04

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I'm typing this from Scrollwm with all the new updates. It's quickly growing! Actually, it's growing so fast it's going to take me a while to get even close to using it to it's full potential. Right now I just feel as if I'm in a maze tongue

What more features are going to be added?

Oh and I have the same issue as Gullible Jones; Firefox always starts in the top left corner in a small window.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#24 2012-12-11 13:11:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

I've found this with my other window manager too: firefox requires a fully ICCM compliant window manager as it foolishly creates windows at the wrong and sets size hints (and the wrong size hints BTW) requiring the window manager to scan through all of the ATOMs it sets looking for where it hide the intended size.

Whenever a window is created in X11, the client program specifies a width and height for the window.  Firefox sets a ridiculously small width and height.  I may or may not build in the WM_HINTS needed to compensate for this.  Until I do, feel free to report this as a bug to mozilla.

EDIT:  This explains why I've seen comments in other WM's saying a block of code is just to deal with firefox's quirks.

Last edited by Trilby (2012-12-11 13:12:28)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#25 2012-12-11 18:14:09

bladdo
Member
From: Blacksburg, VA
Registered: 2008-05-05
Posts: 111
Website

Re: ScrollWM - floating WM with scrolling workspace (and tiling!)

Any plans for EWMH active&resizing support in the near future? I think this would be an awesome WM to pair with a tiling tool I made for floating wms that's based on xdotool:
http://userbound.com/projects/keyboard-tiler/


bladdo / mil / Miles
userbound.com - blog and projects

Offline

Board footer

Powered by FluxBB