Foresight is a GNOME Shell Extension that automagically opens the activities view on empty workspaces. It uses callbacks to monitor windows and workspaces (instead of actively checking on them on certain time intervals), which makes it very efficient and responsive.
foresight-switch-to-empty-workspace.mp4
foresight-close-all-windows.mp4
You can install Foresight using the GNOME Extensions website.
Alternatively, you can install it using the Extension Manager app.
Simply keep using your desktop ‒ the magic will happen once you get to an empty workspace! There are no preferences to tweak.
Foresight will open the activities view when all windows in a workspace are closed, but also when you switch to an already empty workspace. In case the activities view was activated by Foresight, it will deactivate it once you open a window (that's GNOME default behavior) or switch to a non-empty workspace. Foresight will never deactivate the activities view if it was activated by you.
Foresight adds callbacks to certain GNOME Shell signals, like window-removed and workspace-switched. It also keeps track of whether the activities view was activated by itself or by the user. These callbacks then check for the conditions to activate (or deactivate) the overview if needed, for example if the workspace is empty or not.
If you wish to make changes to the Foresight codebase, you will likely want to build it and install it from source. Foresight's source code on hosted on GitHub. Your first step is cloning Foresight's repository with:
git clone https://github.com/pesader/gnome-shell-extension-foresight.gitYou can then build and install the extension with:
cd gnome-shell-extension-foresight
make build && make installYou can run a nested session of GNOME Shell to test the extension out with:
make runBefore submitting a pull request, make sure you install and run the linter with:
make lint-install # install the linter
make lint # run the linterYou can also have the linter attempt to fix the errors it found with:
make lint-fix- Codebase: forked from "Show Application View When Workspace Empty" by fawtytoo
- Logo: based on Snapshot, Snowglobe, and art from gnome.org
- Banner: inspired by the banners at Flathub's home page
- Extension logo in banner: is the symbolic icon from Extension Manager
- EGO banner: modified from Just Perfection's work
- Makefile: inspired by the Makefiles of Caffeine and Blocker
- GitHub Actions workflow for linting: again, inspired Caffeine and Blocker
This project would not exist if it weren't for "Show Application View When Workspace Empty" by fawtytoo, so I thank its maintainer and all its contributors. I'm also grateful to everyone in the GNOME Extensions matrix room, who kindly answered the many questions that came up while I was writing this program.
This project is licensed under the terms of the GPLv3.
