Rethinking Virtual Desktops

First of all: This is my first blog-post on planetkde. So I’ll introduce myself:
My name is Anton Kreuzkamp, I am 15 years old and am from Germany (near Frankfurt). I am using KDE for about 3 years now and am developer for about 1½ years. I’m kind of a migrant worker in KDE, I do some feature here, some patch there, but no fix project (so far I’ve contributed to Plasma, KWin and Rekonq but I have plans for Calligra, Kontact and other projects as well).

So let’s come to the real topic of this post.
There were times when people used virtual desktops (VD) to seperate their different activities on the computer. Now KDE has Activities ‒ a much more powerful way to seperate different tasks than VD. So why do we still need virtual desktops? Why do we have two different concepts doing the same? The answer is easy and has been given a dozen times before: Because they are NOT the same, but are made for different kind of tasks. Activities are about… well, activities, a logical separation of different tasks. VD are about extending the available space of  the desktop, where the windows are to many to fit on the screen nicely.

I have never used VD. My windows use to be more than half of my screen in size, so I can’t have multiple windows shown completely on the screen, and even VD don’t help there. But wouldn’t it be nice if you could combine the free space of two virtual desktops? Then a window would fit in that space. But of course you can’t have one half of a window on one VD and the other half on the another VD and still use it. So I implemented this idea in form of a kwin effect:
The Workspace Strap
The Workspace Strap Effect
It allows you to organize your windows on a linear strap, either horizontally or vertically, that supports stepless scrolling. When you press Alt+Meta (configurable) you get a preview of the strap (see above) and can easily scroll by dragging.

But as a picture says more than 1000 words and a screencast is made of a thousand pictures, here’s one for explanation:

http://www.youtube.com/watch?v=lm2z-V7zhus

This implementation is just a kind of experiment to see whether it’s a satisfying experience, to integrate it upstream, it will probably need to be rewritten deeper in Kwin (like virtual desktops or window tiling), but if it’s coming over well I will try to find the time for it.

The code can be found at kde-apps.org or in my personal scratch-repo: git://anongit.kde.org/scratch/akreuzkamp/workspacestrap.git

I appreciate feedback of all kinds.
Have fun.

PS: I tried half a dozen screencast applications and none of it worked. I finally managed to make the screencast using an application not made for taking screencasts but to display videos: VLC media player. Real time encoding, full HD-quality with 20fps, no performance regressions (on my machine), without crashes. Thanks a lot to the VLC team.

62 thoughts on “Rethinking Virtual Desktops

  1. Nuno Bento

    I’m intrigued. The concept looks great but I can’t really say if I could get used to it instead of VDs (which I still use in conjunction with Activities).

    More importantly though: how would this work for multi-display setups? One strap per display? One strap spanning multiple displays? The latter seems better to me, but there could be issues with display orientation and different resolutions.

    1. Anton Kreuzkamp Post author

      Thanks alot.
      It is thought as an experiment to get out exactly that ;)

      I don’t have a multi-display setup, so I haven’t tested it, but I think the second option should work without any further development, but it will probably need further investigation.

      1. Anonymous

        For some multi-display setups, it might cause issues. Say you have some windows on the far right of the strap that you want to display on your left monitor. You’d have to reposition the window so that it can fit on the left monitor. One solution would be to allow you to scroll further than your last window, but then there’d be nothing on your right monitor. So how about adding an option to make the strap loop around? It’d be sort of like the Compiz 3D cube, but a flattened belt instead.

        1. Anton Kreuzkamp Post author

          This is quite a corner-case that I honestly don’t think is worth it to explicitely take care of. But I already thought of making the strap loop. This will be one of the things I’ll discuss on plasma-devel when I do a new implementation for upstream use.

  2. Paulo Dias

    very nice, liked it a lot… hope this gets into main soon. also this might be a good fit for plasma live too.

    keep up the good work

  3. Bartosz T.

    I like it. It’s better than: xrandr –output DVI-0 –mode 1920×1200 –panning 3840×1200

  4. YoYo

    Isn’t this the same as viewports / large desktops from EWMH spec (the same spec that defines virtual desktops etc: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#largedesks) ?

    I think kwin used to support this some time ago… but I’m not sure, I don’t use kwin that much… But there’s a lot of wms that support it, though some of them don’t allow to move the viewport to any arbitrary position, but only support “paging” similar to virtual desktop…
    IIRC enlightenment might be one of the more “recent” wms that supports it nicely…

    Compiz also used to use viewports to emulate VDs (ie there was actually only one virtual desktop of a WxD size and it moved the viewport to simulate different virt. desktops) which was really bad, because it didn’t play well with non-gnome pagers (compiz and gnome apps were thinking you are on the 2nd VD while non-gnome apps were thinking you are on the first VD with a moved viewport ;)

    Though I haven’t used viewports / large desktops for a long time… since I used to use enlightenment…. maybe because fluxbox and kwin (which I used most for the last few years) didn’t support them very well or I couldn’t find a usable pager… (I think the kde 3.x pager did show them properly, but wasn’t able to move the viewport or something similar….)

    Anyway it would be great to see it again with some visual improvements, as long as it is compatible with ewmh specs.. ;)

    1. Anton Kreuzkamp Post author

      Thanks for the hint, yes in fact it’s exactly that.
      So if I appear to reimplement it for upstream use, I’ll pay attention to the ewmh specs.

  5. Ivan

    Hi,

    A very nice idea that warrants even entering my real e-mail into the above box :)

    The main downside to this that I see is that it doesn’t relax the number of items in the task-bar as VDs do. My VDs are 1) web stuff 2) code editing, compiling 3) art applications 4) other – and the main purpose I use them is not to have 20 different apps in the task bar at one time.

    Cheerio!

    1. Anton Kreuzkamp Post author

      Thanks alot :)
      Infact it does. All you have to do is to activate the option “Only show tasks from the current screen” in the taskbar settings. Windows that are completely outside the view are considered to be on another screen and as such not displayed.

      1. Ivan

        Ok, nice, although it might get tricky to have the taskbar items change when you move 1cm to the right/left… Though I’m considering this more of a taskbar-concept fault than your idea’s.

        This thing of yours could even make a nicer type of the task-manager… If I get the time, I’ll do some mock-ups.

        Will have to test it in reality to be able to give any more suggestions. :)

        BTW, I guess this could be done with kwin scripting. If it is possible, it would be more awesome than burying it deep into kwin itself.

        1. TheBlackCat

          If you were willing to make more modifications to the task manager (or make a fork of it), it would be cool if the items were laid out in the task manager in order of their horizontal position on the strip, and they slide or fade on or off the ends of the task manager as they appear or disappear off the corresponding side of the screen.

  6. Craig Magina

    I like it and it might be more “usable” for those that have never come across VDs before.

  7. Pau Garcia i Quiles

    Yoyo: Isn’t this the same as viewports / large desktops from EWMH spec (the same spec that defines virtual desktops etc: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#largedesks) ?
    Anton: Thanks for the hint, yes in fact it’s exactly that.

    And here we have, once more, proof that software patents are evil. A smart 15-year old independently discovers the Virtual keyword from xorg.conf and implements it himself.

    Had this been “protected” by a software patent, Anton would now be the subject of a patent trial.

    qed

  8. Geoff

    I have to say, this is a wonderful idea. Very, smooth, very sleek. It would be nice to see this implemented into KDE at some point, even if it is not the default VD.

    Silly, question; what themes are you using for the windows and panel?

      1. Geoff

        Awesome. Also, just a little thing, maybe you could put in there an option to have the background move along with but independent of the windows (a la scrolling between screens on Android). Just a thought. :D

    1. plaristote

      Must admit this oxygen theme really plays in favor of your screencast :) !

      Really neat idea. I imagine this triggerable with a gesture on a very large touchsreen. Awesome.

  9. Dennis Veatch

    That looks like a great idea. I usually have at least eight VDs running but I can feel their limitations. Like needing to look down at the task bar to fine the one I want, or mouse wheel scroll on a empty desktop area or throw the mouse point to the upper right corner. Overall still KDEs implementation of VDs is not all that bad.

    But your idea has me really intrigued and if the screen cast is anything like real life use, I would certainly switch.

  10. Silver

    I personally have never used either VDs nor activities, because I tend to close these 1 or 2 or 3 applications that I currently need, and it does not seem like much trouble to launch again the application that I currently need.

    So usually I have a few apps opened, but I mostly like them being either fullscreen or totally fullscreen. It somewhat bothers me indeed that I have to switch applications one-by-one by alt+tab or by clicking on task bar (the latter is currently especially annoying because of some bug keeping entries there sometimes unresponsive etc).

    The point I’m trying to make is that I for sure would be one of the users of this concept as really like the idea of being able to move my visible rectangle around my huuuuge desktop space to switch to or peek other windows currently opened :)

  11. Pascal Pieters

    Nice work!

    I’ve just got one question: – it’s just a detail, but – what happens when you maximize a window and then move along the strap?

    1. Anton Kreuzkamp Post author

      Thanks.
      By default nothing, it simply doesn’t move. But in the configuration of the effect you can trigger a global kwin-option to make maximized movable, if you set it the window will move like any other window. For technical reasons I can’t set it as default (because it’s a option of kwin itself and not the effect).

  12. sarko

    Maybe is intersting, but why not simply closing bugs on KDE?
    New ideas are good but… on top of something that works :-(

    1. Anton Kreuzkamp Post author

      There are two different goals of developing software.
      1. To sell it and make money with it.
      2. To use yourself.
      The second one is the concept of free software. So every developer does what helps him to use the software. If somebody fixes a bug that doesn’t annoy himself, it is nothing natural but a nice gesture to others.
      I also do things that help me use my computer more easily. This includes such features as well as bugfixes.

      1. sarko

        Maybe it’s funnie developing software, but most people won’t use a broken software. Neither if it’s a FOSS.
        We are not forced to use KDE: there are many DE more stable and many OS with more features.
        Maye KDE is losing users because of poor-bugfix attitude of developers?

        Maybe bugfixing is a nice gesture but before, is a great disappointment.

        I think you are young but very smart, so take it as a challenge: develope something that works for all, not only on your machine ;-)
        Thanks for sharing your point of vue.

    2. Anarky

      Maybe reading and commenting blogs is interesting but why not simply close bugs on the bugzilla instead ?

    3. Fri13

      Open Source (and Free Software) does not mean that someone else does software freely to you. BUT it does not either mean that developers do it just for themselfs. They like to do it, it is their hobby and their social network for teamwork and wish to improve the world.

      The basic form of Open Source is that someone adds a patch or even starts new project to fill own demands. But it is just basic. Then there are lots of people who want to help and improve with others existing software behalf of the users or with their friends, with different parts of the project. LIke some one is interested about window management, other likes graphics (themes) and third wants to make wallpapers and icons or translate languages and write code documents.

      Teamwork is the power, you are not forcing anyone when in project management. You simply place post to wall that something needs to be done and those who are interested, takes that notes and implements it.

      Some people likes to improve their skills by reading others codes, they hunt bugs and learn to improve others written code. That way they learn to be better developers and they develop understanding what they like and can help themselfs and community.

  13. fxrh

    Frankfurt/Main or Frankfurt/Oder? I’m living in Frankfurt/Main and you would be the first other KDE developer I’ve heard of living around here :)

    1. Anton Kreuzkamp Post author

      Frankfurt/Main, Friedberg to be exact. Cool to hear that there are other KDE-developers here :)

      1. Martin Gräßlin

        If a consider Mannheim to be close to Frankfurt than there are even more developers. I know of some living in Darmstadt for example.

        Btw there is a release party in Karlsruhe – it’s not that far from Frankfurt :-) Hope to see you two there

  14. illissius

    This is awesome. I was thinking of basically this same concept as my preferred successor to virtual desktops (though I think I got the idea from someone else), and now you’ve gone and implemented it. So, three cheers, and I hope this gets into upstream — as the default. :)

  15. TheBlackCat

    This is a great idea, and I agree it would be very natural especially for people who aren’t used to virtual desktop.

    I do have a few ideas:

    1. I think it would be particularly useful with some sort of loose tiling, so windows automatically adjust to not overlap but don’t automatically form the tight tiling pattern used in the existing tiling systems

    2. Does this implement mouse wheel scrolling?

    3. It would be nice if this was implemented as a command to execute when scrolling on the desktop, so you can just scroll on the desktop to move along the

    4. Similarly, it would be nice to have a plasma applet to trigger it, perhaps like the pager but with something to drag, a button that you could just use your scroll wheel on, or a popup button applet where you could use your scroll wheel on the button or click to pop up a full preview

    5. This might also be nice for a tablet or netbook interface, especially if it is tied into two-finger scrolling (if X11 ever gets it). You should see if the plasma-active people have any use for it.

    1. Anton Kreuzkamp Post author

      First of all: Thanks :)

      2: It currently doesn’t. Shouldn’t be too difficult to implement, though.

      Everything else (including the idea concerning the taskbar) needs an implementation inside kwin. But as the feedback is fantastic, I will take the time to do this implementation asap (which is probably not quite soon…)

  16. Maxi

    Wow, your demonstration looks fantastic! I’m using 3D cubes for six years but this could make me switch. Not a totally new idea for sure, even Windows programs are there for this, but your approach looks more natural and fits better for touchscreens. Congratulations for your work!
    BTW: Ich habe auf meinem Blog einen Ausblick auf den Kurs des Linux-Desktops, im Speziellen mit der Berücksichtigung von Touch-Geräten veröffentlicht. Könnte für manchen hier vielleicht interessant sein.

  17. Jeffery MacEachern

    Anton: As others have said, I would have to try this personally (later!) to get a good feel for the practical usability of it, but I am very impressed with the concept and execution.
    One thought, in response to TheBlackCat’s taskbar suggestion: could you make it something similar to the “thumb-scroll” strip found on the WeTab/ExoPC? Also, assuming the Strap has some size constraints rather than an infinite-canvas design (which would fit if you wanted to make it a loop), perhaps it could function – optionally – as an extension of the current VD behaviour. That is to say, if the Strap is 6-desktop-widths long, it would respect the Ctrl+F[1-6] shortcuts to skip between discrete (virtual?-)virtual-desktops, while still allowing continuous scroll as desired.

  18. Hans

    Hi Anton, nice to finally see you on the Planet; I’ve found many of your patches useful.

    I don’t think this is for me, I like the clear separation between virtual desktops (my windows are usually maximized). However, I can see people liking it, and it’s very cool that you’ve already gone ahead and implemented it as a KWin effect. A custom taskbar as suggested above would only add to the neatness.

    Personally I think the implementation of virtual desktops in GNOME Shell would make a lot of sense together with activities, with different number of VDs per activity, but most likely this requires rewrites deep in KWin’s codebase.

  19. Davide

    Hi, you had quite a nice idea!
    I was wondering if there is a kind of snap feature so that the strap “snaps” to some points, like window borders, window center, … I’m thinking that these points/lines may be highlighted by an overlay when the strap is moved, in a way similar to how kwin draw an overlay when you try to maximize a window by dragging it along the borders of the screen. That may be helpful is managing the strap and quickly changing between its parts, bu maybe it needs some thought..

    Nice work!

  20. the_madman

    I love it. I’d thought of this myself ages ago and it just seems to make sense.

    It especially feels like it makes more sense on a tablet than traditional VDs do.

    A small interaction that I was considering to make this more discoverable – similar to how one can set VDs to switch to a different VD when dragging a window to the screen edge, I thought this could work well if one allowed the user to set it so that they can, “nudge” the edge of the screen with a window, moving the whole viewport ~3-5cm in that direction.

    One more consideration – how do maximised windows work? Ideally they’d just be one screen’s-worth of height and width and shift around naturally depending on where you move the viewport.

  21. Daniel Schulz

    Hi Anton.

    this is a breakthrough concept. I really like it. It is far better than virtual desktops – and because people are mostly used to Windows the majority even did not know VD’s. Thanks for this amazing implementation. I hope this will become the default in KDE’s next major release. So I will switch back to KDE now.

    Thanks for your great effort on that, Daniel.

  22. Fractallyte

    Viewports have been long been a feature of FVWM, Enlightenment E16 and PekWM. Of course, it’s nice to have this in KDE now!

  23. Chani

    awesome! :) :)

    I’ve always wanted to see how well something like this could work. I’ll have to test it out on my multiscreen setup…

    as my screens have very different dimensions, I don’t think they could easily share the same strip… it’ll definitely take some work to find a nice solution to that. hmmm..

  24. freiheit statt apple

    hi, getting an error:

    Make Error at CMakeLists.txt:38 (message):
    No kactivityconsumer.h found.

    ‘find /usr/include -name *consumer.h’ says:

    /usr/include/kde4/kworkspace/kactivityconsumer.h

    cheers

    1. Anton Kreuzkamp Post author

      Hi, sorry for not replying earlier, real life caught me ;)
      I’ve pushed a fix to the git-repo, it’s not yet in the archive on kde-apps.org, I will be able to update it just tomorrow.

  25. Darryl

    While the activities development is a great idea and will no doubt become used more and more, it needs to mature some more. I still have to rely on virtual desktops when I’m playing full-screen games under Wine, because right now virtual desktops work better.

  26. KenP

    As a pure user of KDE, I love it! It is also a ‘new’ concept which is not borrowed or copied from any other desktop, free or commercial. Worth implementing, IMO.

  27. Pingback: The Workspace Trap: convierte tu escritorio KDE en un escritorio lineal | La mirada del replicante

  28. smihael

    First of all I’m glad that someone finally started working on all this mess around activities v. virtual desktops :D And a really nice implementation!

    I think that the biggest drawback from using activities is the lack of option to “attach” windows to them – you can switch the activity, but u are still on the same old virtual desktop with all windows from previous activity. Think of a student using laptop in school wanting to browse in the breaks and then when the professor comes into class to simply switch to “taking notes” activity without the need to closing/minimizing their browser. So what I am lacking is kind of a concept implemented with Google Chrome browsing profiles (Incognito Window etc.).

    I haven’t read all the comments, so maybe someone else has already mentioned it…. but better repeat the same thing twice, than to skip it :D

    So, the way I see how to resolve the problem would be to allow virtual desktops to turn into “real” desktops, when on multiple display setup.

    Or the other way around: maybe I’m a bit old-fashioned here since I’ve been using Linux since I first got my computer, but IMO the only good use of activities would be when one would be able to prepare their activities in advance, e.g. for a public presentation etc…

    Genug für heute :D

    1. Anton Kreuzkamp Post author

      Sorry for answering so late, I simply forgot that I hadn’t answered yet…

      I don’t exactly get what you mean.
      First of all, it is possible to attach windows to activities for a few releases already, simply right-click on the window-deco (or click on the window-icon) and choose Activities. There you can attach it to the activities you wish.

      “So, the way I see how to resolve the problem would be to allow virtual desktops to turn into “real” desktops, when on multiple display setup.”
      I must admit, I don’t understand this sentence at all…

      And yes, (currently) activities need to be prepared manually before they have a real benefit, but I think it is thought to be done while using the activity. Have a look at Plasma Active, there the concept is already implemented quite well (for example while using e.g. a file you can connect it easily with your activity through SLC and it appears automatically on the homescreen). I hope it will find it’s way to the desktop soon, as it simplifies using activities massively.

      1. smihael

        Well I must admit too, that I didn’t express my opinion well.

        “So, the way I see how to resolve the problem would be to allow virtual desktops to turn into “real” desktops, when on multiple display setup.”

        With real desktops (perhaps not a really good phrasing) I was thinking of something you would see in large control centres (multiples screens, each of them displaying another picture). So by allowing user to select which virtual desktop to display on which screen, virtual desktops would get a really good function.

        I didn’t know about the possibility you’ve mentioned. Thanks!

      2. smihael

        (Currently virtual-desktops get expanded (width is the sum of widths of separate screens, height has the value of height of the biggest screen) on a multi-desktop configuration… and you get them all on every screen)

        1. Anton Kreuzkamp Post author

          I’m not sure if this isn’t possible too already… What I know is that there are quite a few different possibilities how to organize multiple screens, but I haven’t researched further. Maybe this could be a nice feature, nothing for me to spend my time on though, as I don’t have a multiscreen setup. You should probably investigate a bit more on it and post your idea again somewhere where the real kwin-devs sit, or implement it yourself (mostly easier than convincing someone else to do it) ;)

  29. Pingback: Latino » Blog Archive » The Workspace Strap: convierte tu escritorio KDE en un escritorio lineal

  30. Pingback: Enabling Others to do Awesome | Martin’s Blog

Comments are closed.