Skip to content

Repository files navigation

Blocker banner

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.

Showcase

Switching to an empty workspace

foresight-switch-to-empty-workspace.mp4

Closing all windows in a workspace

foresight-close-all-windows.mp4

Getting started

Installation

You can install Foresight using the GNOME Extensions website.

Alternatively, you can install it using the Extension Manager app.

Usage

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.

FAQ

How does it work?

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.

Contributing

Building and installing from source

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.git

You can then build and install the extension with:

cd gnome-shell-extension-foresight
make build && make install

You can run a nested session of GNOME Shell to test the extension out with:

make run

Before submitting a pull request, make sure you install and run the linter with:

make lint-install # install the linter
make lint         # run the linter

You can also have the linter attempt to fix the errors it found with:

make lint-fix

Attribution

Code

Assets

Build system

Gratitude

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.

License

This project is licensed under the terms of the GPLv3.

About

A GNOME Shell Extension that automagically opens the activities view on empty workspaces

Resources

Stars

35 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages