Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Latest commit

 

History

History
265 lines (147 loc) · 15.9 KB

README.md

File metadata and controls

265 lines (147 loc) · 15.9 KB

Catts (Calmer Alt-Tab Task Switcher)

Catts is a calmer alt + tab task switcher for elementary OS 6 (Odin).

For elementary OS versions 5.x, please use Gala Alt Tab Plus.

Screenshot of Catts in action. The switcher contains three icons: Tasks, AppCenter, and Calculator. AppCenter is selected. The switcher is in dark mode. The wallpaper behind the switcher is an illustration of cats on a roof. One (pink) looks out into the distance, a tiny blue one is about to paw its tail playfully, and a green one watches the scene.

Want the wallpaper?

Catts is now part of elementary OS

November 30, 2021

With the elementary OS November updates, Catts is now baked into Gala – the window and compositing manager for elementary OS – and so comes pre-installed with elementary OS.

A big thank-you to David M. Hewitt for taking the initiative to integrate Catts into Gala and Cassidy and Dani for their support and input throughout the process.

You can read more about the backstory of the project in my three-month-long elementary OS 6 upgrade adventure (Part 1).

While Catts is now part of elementary OS, I am not deprecating it until the version that’s in elementary OS is made accessible. (This is currently set as a high priority issue so hopefully, it won’t be long.)

Version details

  • 1.0.2 (2021-11-08) Adds basic accessibility.

    Announces: “window, task switcher, N items, panel” when launched and the title of the window when an item is selected.

    Given there is next to no usable information about accessibility in the GNOME/Gtk/Vala/elementary OS documentation, I had to cobble together whatever pieces I could find to get this together. It is not ideal but it is way better than having the task switcher be entirely inaccessible, which has been the case with the previous one for the first six releases of elementary OS.

    I hope that this will spur others with greater experience in the platform to improve this essential feature going forward.

    If you care about accessibility and inclusivity and you want to see it reflected as a core tenet of elementary OS, please make your voice heard in this discussion thread: elementary/hig#51

  • 1.0.1 (2021-08-29) Pressing escape now properly cancels the task switch without changing the focussed window. (Fix by David M. Hewitt.)

  • 1.0.0 (2021-08-28) Initial release.

For full notes, please see the change log.

To upgrade, please follow the installation instructions, below, to reinstall the latest binary.

Install

The following instructions download and install the Catts shared library binary. If you want to build it yourself instead, please see the for developers section.

Open up a Terminal session (press + T) and copy and paste the following commands to install Catts on your system.

Please use the copy/clipboard button that appears when you hover over a code snippet to ensure that you copy the whole command instead of just a portion of it by mistake.

  1. Download Catts shared library binary (libgala-catts.so) from small-tech.org to the temporary directory on your computer (/tmp):

    wget https://small-tech.org/downloads/catts/1.0.2/libgala-catts.so -O /tmp/libgala-catts.so
  2. Verify the downloaded file is what you expect:

    bash -lic "test \"\$(sha256sum /tmp/libgala-catts.so)\" = '6bb9fd8d79b553d66d3b5f83e79040a7ca55a97231004df546549c7f31c828bb  /tmp/libgala-catts.so' && echo 'Download OK.' || echo '🛑 STOP. Security error. File has been tampered with. DO NOT PROCEED.'"

    Unless you see Download OK, do NOT proceed to Step 3. (Instead, open an issue here and let us know what happened.)

  3. Install the downloaded file as a Gala plugin:

    (Terminal will warn you that you are trying to paste a command that requires administrative privileges. When you press return to execute it, the command will prompt you to allow it administrative privileges by entering your system password.)

    sudo mv /tmp/libgala-catts.so /usr/lib/x86_64-linux-gnu/gala/plugins/; sudo chown root:root /usr/lib/x86_64-linux-gnu/gala/plugins/libgala-catts.so
  4. Reboot.

    If you don’t want to restart your computer, you can also start using Catts right away by issuing the following command:

    gala --replace &

    But it’s cleaner if you reboot. And less to type too:

    reboot

You can now Alt + Tab in peace.

If Alt + Shift + Tab doesn't work…

Elementary ships with Alt + Shift bound to switch keyboard layout. Go to SettingsKeyboardLayout and either set Switch layout to Disabled (if you don’t have multiple keyboard layouts) or to a different key combination. Elementary should really ship with this setting set to Disabled by default.

Uninstall

To uninstall, run the following command in Terminal and reboot your computer:

sudo rm /usr/lib/x86_64-linux-gnu/gala/plugins/libgala-catts.so

Why Catts?

A quick visual demonstration should suffice (if it doesn’t, please read on for the various reasons outlined below.)

Elementary OS stock task switcher:

Screen recording of the default elementary OS task switcher: windows animate in and out while switching between apps and the dock is repurposed as the task switcher view and morphs from the dock icons to the active app icons during the task switching process.

Catts:

Screen recording of the Catts task switcher for elementary OS. It resembles the task switchers found in other operating systems like macOS, Windows, and many other Linux flavours. The active apps are shown as a row of icons and an indicator shows which app will be active when you release the alt key. The window title of the selected app is also shown. Nothing animates.

In other words, because:

  • alt + tab is a hidden, shortcut gesture for quickly switching between the various windows you have open.

  • There is already a graphically-heavy, slower alternative with the “Show Desktop” ( + ) gesture that gives you an overview of the windows within a workspace with window previews that can be used if differentiating windows based on their contents is important.

In elementary OS, however, the task switcher:

  • Overloads the dock (the dock is transformed to include icons of windows and the icons there used to indicate which window you’re switching to). This breaks the physicality of the dock and overloads its meaning. That said, due to the amount of other animation going on, willing myself to concentrate on the dock is the only way I can use it at all.

  • Has excessive motion (animates windows backwards or forwards while dimming them in/out every time you press alt + tab). Imagine that happening with maximized or half-screen windows on a 24" monitor. I don’t normally have issues with motion and it makes me feel seasick after a few uses.

  • Gets stuck. Sometimes it will just get stuck in a state where no window is selected. Pressing alt + tab again gets you out of it.

  • Is one-way (shift + alt + tab) doesn’t do anything.

Basically, the task switcher in elementary OS is unusable.

This one, despite its limitations, at least fixes the above issues.

Catts:

  • Is calm. It does not animate my windows. I don’t want cognitive complexity when I’m fast switching between apps. I want to select the app I want to switch to and switch to it. That’s it.

  • Uses icons. There is very little cognitive load to recognising an icon. There’s a reason we use icons of applications in menus, etc., instead of tiny thumbnails of them. The same principles apply here.

  • Enables you to tell apart different windows of the same app (simply, by displaying the window title in the switcher alongside the icon).

  • Uses the system colour scheme. Love Dark Mode? Catts does too.

I feel elementary OS would be far more usable in general – not to mention more familiar for folks just coming over from macOS or Windows – if we were to replace the default task switcher with Catts.

In fact, I’ve opened a feature request on the elementary OS Gala to do just that. If you agree, please give it a thumbs up to show your support.

Limitations

Catts implements the bare minimum functionality for a calm task switching experience and nothing more.

It currently has the following major limitations:

  • Drag and drop does not work. You should be able to both (a) continue a drag and drop that you started prior to activating the task switcher (e.g., you want to drag a photo from Photos into the app you’re working in) and (b) you should be able to drag and drop onto the icons which should act as proxies for the apps/windows themselves.

    Workaround: if you stop at the item before the one you want, you can start dragging something, press alt + tab quickly, and continue dragging. This only appears to work when switching to the next app.

  • Only includes apps in the current workspace. You should be able to switch to apps in any workspace.

  • Cannot exit app with Ctrl + Q while selected. It is a productivity boost to be able to use the task switcher to close and app by quickly selecting its icon and, while continuing to hold down Alt, pressing Ctrl + Q to quit the selected app (especially when you want to quit several apps together). This is currently not supported by Catts. The workaround is to switch to the app first and then press Ctrl + Q.

If you’d like to help us implement any of these features, please say hello on Discussions and tell us which of these limitations you’d like to help overcome.

Get the wallpaper

The wallpaper you see in the screenshot was commissioned for Catts from the singular Margo de Weerdt. And you’re welcome to download and use it in all its 4K glory on your own computer if you like.

There are three versions: The one you see in the header has a very shallow depth of field (what the cool kids call “bokeh”) and a pink-purple gradient filter applied for the sake of keeping the focus on the task switcher. There is also one with less bokeh as well as the original illustration by Margo without any of Aral’s meddling.

All three are released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please credit Margo de Weerdt and Catts by Small Technology Foundation.

Original

An illustration of cats on a roof with a cityscape behind them. One (pink) sits by a chimney and looks out into the distance, a tiny blue one is about to paw its tail playfully, and a green one watches the scene. There are a couple of birds by the chimney you are also looking out into the distance. The city is a mix of modern and classical buildings and there are a couple of zeppelins flying in the distance.

Shallower depth of field

The same illustration as described in the original one, above, but with the background blurred and with a pink to purple gradient applied to the background.

Even shallower depth of field (did someone say bokeh?)

The same illustration as described in the shallower depth of field version, above, but with even shallower depth of field.

Like this? Fund us!

Small Technology Foundation is a tiny, independent not-for-profit.

We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.


For developers

The following are technical details for developers who want to manually compile or hack on Catts.

Dependencies

  • elementary-sdk
  • libclutter-1.0-dev
  • libwnck-3-dev

Make sure you apt install all of the above requirements before trying to build.

Build

mkdir build
cd build
cmake ..
make
sudo make install

Test

Modifying the primary gala instance can result in a broken desktop that requires a restart to fix.

After following the Installation instructions, stop before the ‘Restart Gala’ step and, instead, use xephyr to create a separate session:

sudo apt install xserver-xephyr

# Running the test script starts up a new session using
# xephyr and launches the Calculator, and Tasks apps.
./test.sh

When the xephyr window appears, give it focus by pressing ctrl + shift and test out the new alt-tab behaviour.

Note: Don’t have the Calculator or Tasks apps running in your primary session before running the test script as that will lead to the app not launching in your test session.

Once you're done testing you can remove the plugin with.

sudo ./cleanup.sh

Replace Gala

After you’ve built Catts, you can replace the task switcher in your main session by running:

# Restart Gala
gala --replace &

Like this? Fund us!

Small Technology Foundation is a tiny, independent not-for-profit.

We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.

Version details, history, and credits

Catts is only for elementary OS 6 (Odin).

For elementary OS versions 5.x, please use Gala Alt Tab Plus.

Catts is based on Gala Alt Tab Plus by Mark Story which is based on Gala Window Manager Alternative Window Switcher by Tom Beckmann.

License

Portions copyright ⓒ 2021 Aral Balkan, Small Technology Foundation

Licensed under GNU GPL 3.0