dreamcat4 / skippy-xd

A full-screen Exposé-style standalone task switcher for X11.
GNU General Public License v2.0
100 stars 12 forks source link

Desktop pager #56

Closed felixfung closed 1 year ago

felixfung commented 1 year ago

Currently, identical algorithm and presentation is used for single virtual desktop and all desktop mode, so that windows from all virtual desktops are lumped into the same layout. This may or may not be desirable for users.

An "enhanced" desktop mode is where when invoked, skippy presents different virtual desktops distinctly, and the thumbnails of windows within them. It is possible to implement this in skippy without too much work:

  1. Make sure the algorithms in layout.c does not depend on the virtual desktops.
  2. In init_layout(), rather than feeding in mw->cod into layout_run(), create dlist's of ClientWin*, one for each virtual desktop, and feed these into layout_run(). This performs calculations of the window layout within each virtual desktop.
  3. Offset each ClientWin by their virtual desktop.
  4. The user supplies a positive integer in the config file for the number of rows x number of columns of virtual desktops. For example, the user has 4 virtual desktops, and supplies 2; then the virtual desktops will be arranged in 2x2 alignment. The number of rows and columns should be the same, because the aspect ratio of each virtual desktop and that of the screen is the same.
  5. In terms of visual presentation, the background is tinted, while each virtual desktop presentation is not.
  6. Animation, and how the user input scrolls through the virtual desktops (e.g. when there are 6 virtual desktops and the user supplies 2x2 alignment), I don't have good idea on top of my head.
felixfung commented 1 year ago

I thought a bit more about the design of the feature: it should be a simple desktop pager, i.e. show the overview of the virtual desktops with the window thumbnails within, where of course the thumbnails show live preview whenever applicable. Within each virtual desktop, the windows thumbnails should NOT expand in layout as in expose style. Then, the user selects the virtual desktop via mouse and/or keyboard, the key bindings identical with simple expose mode.

I have been working on this, the window movement and display is simple to implement, and the boost in productivity for me personally is great. I am quite looking forward to fully implementing this feature. With a little bit of coding, skippy-xd can naturally extend to give live preview "virtual desktop paging", from a quick google check, the unix world does not really have this?!

felixfung commented 1 year ago

PR #66 implements the first part of this functionality, without proper desktop selection. Also @vredesbyyrd found that current paging does not work properly under xinerama, and he is happy to test future code on that.

felixfung commented 1 year ago

Opening #108, #109, #110 and closing this issue for trackability.